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: 728735 Delivered-To: patch@linaro.org Received: by 2002:a5d:60c8:0:b0:31d:da82:a3b4 with SMTP id x8csp2115653wrt; Tue, 3 Oct 2023 05:31:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IESzuUgammUH9Lev6eBLkfY14KFRie4vUEE4IUyQB4Nuko5EgyNyhOXqnI/z5UPZLVU+zkb X-Received: by 2002:a0c:f54e:0:b0:647:406b:4b06 with SMTP id p14-20020a0cf54e000000b00647406b4b06mr11814060qvm.57.1696336273983; Tue, 03 Oct 2023 05:31:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696336273; cv=none; d=google.com; s=arc-20160816; b=HKwJ8PaiKIjIMv8u+He9MBFXfwTCr4V2pnqV1G6cAx75rFdx+MakyL9C8nR0NhqQSK A72xwlKm88NZgFkycyOXKqxCu+d8iIPjA0x57oJbV5b989ZYFWQLGN8ABpAc84uGdIVC AQWW8FpdAUZKxP6MO/01F+p0tW4xHsXmRTMUqeZbh5rvWeoVx4/obnk0OSU6n6uzG8hr eGXYwTWzsfVcv04IH4ujr/i9iPZ9vjAlFG5E2CTFMnUqIDTl34ObdU3OJ8jgL81pH9C4 ObLe2FoOFwXAePreUQkk9IXS0xlxpyN624D1rHL+JI6w54T3r7xZ/lbPe3pfSg/hXnch b0JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+r9kD/biBFamNwbYJdkWZ0i3n7hbuMnWH0aEsGJ6SFw=; fh=CVJQstyUWDliy7yeWt2k56tVqQKxFVNP1RtQ0M0BBPc=; b=HbpwTKq9fLuDwydgz/KICb23lynUhv6jzv0kbjtSI1374WokitLlxfo0ES/ZYkQ0vW nVJkDzPTjzsFkr5PaFBpMWJHDH/mT9atr51bgIclqlM9ssrt9cams065Y7Ewsd0mvAWb /rYxzYKkMoRn+EnAOUKWK6QVWnNwUQWjBAy3gyxHBZuQjkj2Pcd7eNvivk21lbER0CEu G3drQhToatNFoF/pLNAPXFBOQgOsrVyRS1N2PMveW2/JiG5nUfJv/P1suXYROh/kDU0g v40lA/DIqmt2t6NR2+HfalaAZuaxpJcv3uQ+RWDmUAI2h/m488kxhFD+OBNJ9VXjF/ZP Yxkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="U6W/nhEJ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id l19-20020a0ce513000000b0064f91de2ed8si446610qvm.551.2023.10.03.05.31.13 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Oct 2023 05:31:13 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="U6W/nhEJ"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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-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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.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 */