qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 04/13] accel/tcg: Move @plugin_state from CPUState to TCG


From: Richard Henderson
Subject: Re: [PATCH v2 04/13] accel/tcg: Move @plugin_state from CPUState to TCG AccelCPUState
Date: Mon, 29 Apr 2024 16:59:20 -0700
User-agent: Mozilla Thunderbird

On 4/29/24 14:30, Philippe Mathieu-Daudé wrote:
@plugin_state is specific to TCG accelerator, move it to
its AccelCPUState.

Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
TODO: check dubious include of "accel/tcg/vcpu-state.h" in
       hw/core/cpu-common.c.


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


diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
index f2826d0409..0e5ebbe050 100644
--- a/hw/core/cpu-common.c
+++ b/hw/core/cpu-common.c
@@ -31,6 +31,7 @@
  #include "hw/qdev-properties.h"
  #include "trace.h"
  #ifdef CONFIG_PLUGIN
+#include "accel/tcg/vcpu-state.h" // ???
  #include "qemu/plugin.h"
  #endif
@@ -215,7 +216,7 @@ static void cpu_common_realizefn(DeviceState *dev, Error **errp)
      /* Plugin initialization must wait until the cpu start executing code */
  #ifdef CONFIG_PLUGIN
      if (tcg_enabled()) {
-        cpu->plugin_state = qemu_plugin_create_vcpu_state();
+        cpu->accel->plugin_state = qemu_plugin_create_vcpu_state();

How about

    qemu_plugin_create_vcpu_state(cpu);

and move the store inside.


r~



reply via email to

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