Re: [PATCH 4/5] plugins: remove special casing for cpu->realized

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

 



On 30/5/24 21:42, Alex Bennée wrote:
Now the condition variable is initialised early on we don't need to go
through hoops to avoid calling async_run_on_cpu.

Signed-off-by: Alex Bennée <alex.bennee@xxxxxxxxxx>
---
  plugins/core.c | 6 +-----
  1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/plugins/core.c b/plugins/core.c
index 0726bc7f25..badede28cf 100644
--- a/plugins/core.c
+++ b/plugins/core.c
@@ -65,11 +65,7 @@ static void plugin_cpu_update__locked(gpointer k, gpointer v, gpointer udata)
      CPUState *cpu = container_of(k, CPUState, cpu_index);
      run_on_cpu_data mask = RUN_ON_CPU_HOST_ULONG(*plugin.mask);
- if (DEVICE(cpu)->realized) {

We could assert() this to protect future refactors.

Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>

-        async_run_on_cpu(cpu, plugin_cpu_update__async, mask);
-    } else {
-        plugin_cpu_update__async(cpu, mask);
-    }
+    async_run_on_cpu(cpu, plugin_cpu_update__async, mask);
  }
void plugin_unregister_cb__locked(struct qemu_plugin_ctx *ctx,





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux