|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH v7 14/18] cpu: Call plugin hooks only when ready |
Date: | Tue, 12 Sep 2023 10:46:05 +0200 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 |
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, ...) tcg_flush_jmp_cache(cpu) -> qatomic_set(&cpu->tb_jmp_cache->array[i].tb, ...) ?
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 <akihiko.odaki@daynix.com> --- cpu.c | 11 ----------- hw/core/cpu-common.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 11 deletions(-)
[Prev in Thread] | Current Thread | [Next in Thread] |