From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: qemu-devel@nongnu.org
Cc: qemu-arm@nongnu.org,
"Mohamed Mediouni" <mohamed@unpredictable.fr>,
"Phil Dennis-Jordan" <phil@philjordan.eu>,
"Roman Bolshakov" <rbolshakov@ddn.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Alexander Graf" <agraf@csgraf.de>,
"Mads Ynddal" <mads@ynddal.dk>,
"Cameron Esfahani" <dirty@apple.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: [PATCH-for-10.1 v4 2/4] accel/hvf: Add hvf_arch_cpu_realize() stubs
Date: Wed, 23 Jul 2025 15:51:54 +0200 [thread overview]
Message-ID: <20250723135156.85426-3-philmd@linaro.org> (raw)
In-Reply-To: <20250723135156.85426-1-philmd@linaro.org>
Implement HVF AccelOpsClass::cpu_target_realize() hook as
empty stubs. Target implementations will come separately.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
---
include/system/hvf_int.h | 2 ++
accel/hvf/hvf-accel-ops.c | 2 ++
target/arm/hvf/hvf.c | 5 +++++
target/i386/hvf/hvf.c | 5 +++++
4 files changed, 14 insertions(+)
diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h
index a3b06a3e75b..cbd59525e87 100644
--- a/include/system/hvf_int.h
+++ b/include/system/hvf_int.h
@@ -111,4 +111,6 @@ void hvf_arch_update_guest_debug(CPUState *cpu);
*/
bool hvf_arch_supports_guest_debug(void);
+bool hvf_arch_cpu_realize(CPUState *cpu, Error **errp);
+
#endif
diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c
index d488d6afbac..6c9369388b8 100644
--- a/accel/hvf/hvf-accel-ops.c
+++ b/accel/hvf/hvf-accel-ops.c
@@ -373,6 +373,8 @@ static void hvf_accel_ops_class_init(ObjectClass *oc, const void *data)
{
AccelOpsClass *ops = ACCEL_OPS_CLASS(oc);
+ ops->cpu_target_realize = hvf_arch_cpu_realize;
+
ops->create_vcpu_thread = hvf_start_vcpu_thread;
ops->kick_vcpu_thread = hvf_kick_vcpu_thread;
ops->handle_interrupt = generic_handle_interrupt;
diff --git a/target/arm/hvf/hvf.c b/target/arm/hvf/hvf.c
index bd6b5d11de8..7de770da4f3 100644
--- a/target/arm/hvf/hvf.c
+++ b/target/arm/hvf/hvf.c
@@ -1081,6 +1081,11 @@ int hvf_arch_init_vcpu(CPUState *cpu)
return 0;
}
+bool hvf_arch_cpu_realize(CPUState *cs, Error **errp)
+{
+ return true;
+}
+
void hvf_kick_vcpu_thread(CPUState *cpu)
{
cpus_kick_thread(cpu);
diff --git a/target/i386/hvf/hvf.c b/target/i386/hvf/hvf.c
index 818b50419f4..a24786c8c35 100644
--- a/target/i386/hvf/hvf.c
+++ b/target/i386/hvf/hvf.c
@@ -367,6 +367,11 @@ int hvf_arch_init_vcpu(CPUState *cpu)
return 0;
}
+bool hvf_arch_cpu_realize(CPUState *cs, Error **errp)
+{
+ return true;
+}
+
static void hvf_store_events(CPUState *cpu, uint32_t ins_len, uint64_t idtvec_info)
{
X86CPU *x86_cpu = X86_CPU(cpu);
--
2.49.0
next prev parent reply other threads:[~2025-07-23 13:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-23 13:51 [PATCH-for-10.1 v4 0/4] target/arm/hvf: Correctly set Generic Timer frequency Philippe Mathieu-Daudé
2025-07-23 13:51 ` [PATCH-for-10.1 v4 1/4] accel: Introduce AccelOpsClass::cpu_target_realize() hook Philippe Mathieu-Daudé
2025-07-23 15:49 ` Peter Maydell
2025-07-23 16:18 ` Philippe Mathieu-Daudé
2025-07-23 13:51 ` Philippe Mathieu-Daudé [this message]
2025-07-23 16:06 ` [PATCH-for-10.1 v4 2/4] accel/hvf: Add hvf_arch_cpu_realize() stubs Peter Maydell
2025-07-23 13:51 ` [PATCH-for-10.1 v4 3/4] target/arm: Create GTimers *after* features finalized / accel realized Philippe Mathieu-Daudé
2025-07-23 16:00 ` Peter Maydell
2025-07-23 16:19 ` Philippe Mathieu-Daudé
2025-07-23 13:51 ` [PATCH-for-10.1 v4 4/4] target/arm/hvf: Really set Generic Timer counter frequency Philippe Mathieu-Daudé
2025-07-23 16:06 ` Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250723135156.85426-3-philmd@linaro.org \
--to=philmd@linaro.org \
--cc=agraf@csgraf.de \
--cc=dirty@apple.com \
--cc=mads@ynddal.dk \
--cc=mohamed@unpredictable.fr \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=phil@philjordan.eu \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rbolshakov@ddn.com \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).