qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 6/9] cpus: Call hotplug handlers in DeviceWire()


From: Richard Henderson
Subject: Re: [PATCH 6/9] cpus: Call hotplug handlers in DeviceWire()
Date: Tue, 28 Jan 2025 12:53:34 -0800
User-agent: Mozilla Thunderbird

On 1/28/25 06:21, Philippe Mathieu-Daudé wrote:
To call the hotplug handlers with REALIZED vCPU, we can
use the DeviceWire handler.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
  hw/core/cpu-common.c | 11 ++++++-----
  1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
index 9ee44a00277..8a02ac146f6 100644
--- a/hw/core/cpu-common.c
+++ b/hw/core/cpu-common.c
@@ -211,16 +211,17 @@ static void cpu_common_realizefn(DeviceState *dev, Error 
**errp)
          }
      }
- if (dev->hotplugged) {
-        cpu_synchronize_post_init(cpu);
-        cpu_resume(cpu);
-    }
-
      /* NOTE: latest generic point where the cpu is fully realized */
  }
static void cpu_common_wire(DeviceState *dev)
  {
+    CPUState *cpu = CPU(dev);
+
+    if (dev->hotplugged) {
+        cpu_synchronize_post_init(cpu);
+        cpu_resume(cpu);
+    }
  }
static void cpu_common_unwire(DeviceState *dev)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

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