qemu-arm
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 01/11] hvf: Add facility for initialisation code prior to fir


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 01/11] hvf: Add facility for initialisation code prior to first vCPU run
Date: Wed, 5 Feb 2025 22:02:47 +0100
User-agent: Mozilla Thunderbird

+Igor

On 9/12/24 21:36, phil@philjordan.eu wrote:
From: Phil Dennis-Jordan <phil@philjordan.eu>

Some VM state required for fully configuring vCPUs is only available
after all devices have been through their init phase. This extra
function, called just before each vCPU makes its first VM entry,
allows us to perform such architecture-specific initialisation.

Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
---
  accel/hvf/hvf-accel-ops.c | 5 +++++
  include/sysemu/hvf_int.h  | 1 +
  target/arm/hvf/hvf.c      | 4 ++++
  target/i386/hvf/hvf.c     | 4 ++++
  4 files changed, 14 insertions(+)

diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c
index d60874d3e6..c17a9a10de 100644
--- a/accel/hvf/hvf-accel-ops.c
+++ b/accel/hvf/hvf-accel-ops.c
@@ -442,6 +442,11 @@ static void *hvf_cpu_thread_fn(void *arg)
      cpu_thread_signal_created(cpu);
      qemu_guest_random_seed_thread_part2(cpu->random_seed);
+ if (!cpu_can_run(cpu)) {
+        qemu_wait_io_event(cpu);
+    }
+    hvf_vcpu_before_first_run(cpu);

Could this be fixed by the cpu_list_add() split?
https://lore.kernel.org/qemu-devel/20250128142152.9889-1-philmd@linaro.org/

      do {
          if (cpu_can_run(cpu)) {
              r = hvf_vcpu_exec(cpu);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]