Am 26.04.24 um 21:41 schrieb Philippe Mathieu-Daudé:
> WHPX has a specific use of the CPUState::vcpu_dirty field
> (CPUState::vcpu_dirty is not used by common code).
> To make this field accel-specific, add and use a new
> @dirty variable in the AccelCPUState structure.
>
> Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org>
> Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
> Message-Id: <20240424174506.326-2-phi...@linaro.org>
> ---
>  target/i386/whpx/whpx-all.c | 23 ++++++++++++-----------
>  1 file changed, 12 insertions(+), 11 deletions(-)
>
> diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c
> index 31eec7048c..b08e644517 100644
> --- a/target/i386/whpx/whpx-all.c
> +++ b/target/i386/whpx/whpx-all.c

> @@ -2235,7 +2236,7 @@ int whpx_init_vcpu(CPUState *cpu)
>      }
>  
>      vcpu->interruptable = true;
> -    cpu->vcpu_dirty = true;

Hi Philippe,

cpu->accel is NULL here. You probably wanted to write

+    vcpu->dirty = true;

instead of

+    cpu->accel->dirty = true;

I think your patch for nvmm_init_vcpu() in target/i386/nvmm/nvmm-all.c
has the same issue.

With best regards,
Volker

> +    cpu->accel->dirty = true;
>      cpu->accel = vcpu;
>      max_vcpu_index = max(max_vcpu_index, cpu->cpu_index);
>      qemu_add_vm_change_state_handler(whpx_cpu_update_state, env);


Reply via email to