Re: [PATCH v7 14/18] cpu: Call plugin hooks only when ready

2023-09-12 Thread Akihiko Odaki
On 2023/09/12 17:46, Philippe Mathieu-Daudé wrote: Hi Akihiko, On 12/9/23 09:12, Akihiko Odaki wrote: The initialization and exit hooks will not affect the state of vCPU, What about:  qemu_plugin_vcpu_init_hook()    -> plugin_cpu_update__locked()   -> plugin_cpu_update__async()  

Re: [PATCH v7 14/18] cpu: Call plugin hooks only when ready

2023-09-12 Thread Philippe Mathieu-Daudé
Hi Akihiko, On 12/9/23 09:12, Akihiko Odaki wrote: The initialization and exit hooks will not affect the state of vCPU, What about: qemu_plugin_vcpu_init_hook() -> plugin_cpu_update__locked() -> plugin_cpu_update__async() -> bitmap_copy(cpu->plugin_mask, ...) tc

[PATCH v7 14/18] cpu: Call plugin hooks only when ready

2023-09-12 Thread Akihiko Odaki
The initialization and exit hooks will not affect the state of vCPU, but they may depend on the state of vCPU. Therefore, it's better to call plugin hooks after the vCPU state is fully initialized and before it gets uninitialized. Signed-off-by: Akihiko Odaki --- cpu.c| 11 --