From patchwork Tue Oct 3 12:30:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 1842625 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=U6W/nhEJ; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=patchwork.ozlabs.org) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4S0HHR3XTtz26jS for ; Tue, 3 Oct 2023 23:31:15 +1100 (AEDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qneYI-0000EQ-Ep; Tue, 03 Oct 2023 08:31:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qneYF-0000B8-OW for qemu-devel@nongnu.org; Tue, 03 Oct 2023 08:30:59 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qneY8-0007jt-5p for qemu-devel@nongnu.org; Tue, 03 Oct 2023 08:30:59 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-32487efc319so896377f8f.1 for ; Tue, 03 Oct 2023 05:30:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696336249; x=1696941049; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+r9kD/biBFamNwbYJdkWZ0i3n7hbuMnWH0aEsGJ6SFw=; b=U6W/nhEJ8nFZJP6mbvqYq4rXK+KXQKCoZ90l3M82qX8G4jE0dST4PanB6lWoFCSGk5 XrJIoYSAc1QpjFQDxuIhAJk+4rnC6vxiJItm31Pi9/Q0dbIuODWP21RTCkhozDDwmy0R iv2KNMHf6wwVirQbuo5IismITclJsM//+oN3VjCfY/P6aVnGtJ+ULyKjct8pVjVJ7hKN EpRheYpXJevPEfL0CYhex9QhJecKyAawkya9uKD150dh1GtuoIuRB++c1L5OElRPv40K Pw5+1GnI88lpkHs0vz8CbiXh1vzX8qT2Sw+q3GkZT3vmOdhOYxTwAVppozgB3QeHYPpe 6vfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696336249; x=1696941049; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=+r9kD/biBFamNwbYJdkWZ0i3n7hbuMnWH0aEsGJ6SFw=; b=FWzdmN1U6RsJ5ojRcrf+f5RXKyb1l8ZeI5z8BBsB52K/wy2uNc3qGd+ScxoQDQO4Iz ne0A3F0timwm8eNASYROXl6DKn5/dk8stcQ9nrZCg/ggZlVJCwWD/UgqFXnK6u2sA/2o PiUr2WOcyBu5LKp/cgy+FCFJlYSZVEyzKle8i+rtTc1ft5ehbHesuufEf3h7S/EwzfbR VtM/6DbY2TKdIh2y7VJtB2+TOtIb3WKrL0tXN2YqBv1/lomxnlbKSJBcoY6z1ur03B9T 2a69O5eSzn7DUSwYAhCCYZq5GGBOMjua0dyytjxtX/SWgS1YkAE3CWPr9oGNYcXgYTWw zKaA== X-Gm-Message-State: AOJu0YwRc2LDXOYmn/4U4jiyZ8XQEgtO6iqCQpEYDZMMoi1DgPmOR3b9 j6QTVoTyytUlb7BqRB5Kcx1n7XLdmetfPzBIs+Ic2A== X-Google-Smtp-Source: AGHT+IHhblTpAoVK9JdeAoL6m9m3WTb9pwO1Prdgl3RZZc3YHqkdykddbrQQUTc7erRRAv19P/MBzw== X-Received: by 2002:a05:6000:186c:b0:327:d08a:1fa2 with SMTP id d12-20020a056000186c00b00327d08a1fa2mr4920150wri.36.1696336248049; Tue, 03 Oct 2023 05:30:48 -0700 (PDT) Received: from m1x-phil.lan (176-131-222-246.abo.bbox.fr. [176.131.222.246]) by smtp.gmail.com with ESMTPSA id c16-20020a7bc850000000b0040303a9965asm9309683wml.40.2023.10.03.05.30.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 03 Oct 2023 05:30:47 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Yanan Wang , Paolo Bonzini , kvm@vger.kernel.org, =?utf-8?q?Alex_Benn=C3=A9e?= , Claudio Fontana , Richard Henderson , Marcelo Tosatti , Roman Bolshakov , Fabiano Rosas , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Marcel Apfelbaum , Cameron Esfahani Subject: [PATCH v2 3/7] accel: Rename accel_cpu_realize() -> accel_cpu_common_realize() Date: Tue, 3 Oct 2023 14:30:21 +0200 Message-ID: <20231003123026.99229-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231003123026.99229-1-philmd@linaro.org> References: <20231003123026.99229-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philmd@linaro.org; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org accel_cpu_realize() is a generic function working with CPUs from any target. Rename it using '_common_' to emphasis it is not target specific. Suggested-by: Claudio Fontana Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h | 4 ++-- accel/accel-common.c | 2 +- cpu.c | 2 +- target/i386/kvm/kvm-cpu.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/qemu/accel.h b/include/qemu/accel.h index cb64a07b84..898159c001 100644 --- a/include/qemu/accel.h +++ b/include/qemu/accel.h @@ -90,11 +90,11 @@ void accel_setup_post(MachineState *ms); void accel_cpu_instance_init(CPUState *cpu); /** - * accel_cpu_realize: + * accel_cpu_common_realize: * @cpu: The CPU that needs to call accel-specific cpu realization. * @errp: currently unused. */ -bool accel_cpu_realize(CPUState *cpu, Error **errp); +bool accel_cpu_common_realize(CPUState *cpu, Error **errp); /** * accel_supported_gdbstub_sstep_flags: diff --git a/accel/accel-common.c b/accel/accel-common.c index 2e30b9d8f0..53cf08a89a 100644 --- a/accel/accel-common.c +++ b/accel/accel-common.c @@ -119,7 +119,7 @@ void accel_cpu_instance_init(CPUState *cpu) } } -bool accel_cpu_realize(CPUState *cpu, Error **errp) +bool accel_cpu_common_realize(CPUState *cpu, Error **errp) { CPUClass *cc = CPU_GET_CLASS(cpu); diff --git a/cpu.c b/cpu.c index 61c9760e62..1e2649a706 100644 --- a/cpu.c +++ b/cpu.c @@ -136,7 +136,7 @@ void cpu_exec_realizefn(CPUState *cpu, Error **errp) /* cache the cpu class for the hotpath */ cpu->cc = CPU_GET_CLASS(cpu); - if (!accel_cpu_realize(cpu, errp)) { + if (!accel_cpu_common_realize(cpu, errp)) { return; } diff --git a/target/i386/kvm/kvm-cpu.c b/target/i386/kvm/kvm-cpu.c index 9a5e105e4e..56c72f3c45 100644 --- a/target/i386/kvm/kvm-cpu.c +++ b/target/i386/kvm/kvm-cpu.c @@ -35,7 +35,7 @@ static bool kvm_cpu_realizefn(CPUState *cs, Error **errp) * x86_cpu_realize(): * -> x86_cpu_expand_features() * -> cpu_exec_realizefn(): - * -> accel_cpu_realize() + * -> accel_cpu_common_realize() * kvm_cpu_realizefn() -> host_cpu_realizefn() * -> check/update ucode_rev, phys_bits, mwait */