qemu-devel
[Top][All Lists]
Advanced

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

Re: [PULL 20/38] accel/whpx: Use accel-specific per-vcpu @dirty field


From: Volker Rümelin
Subject: Re: [PULL 20/38] accel/whpx: Use accel-specific per-vcpu @dirty field
Date: Sun, 28 Apr 2024 22:12:59 +0200
User-agent: Mozilla Thunderbird

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é <philmd@linaro.org>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Message-Id: <20240424174506.326-2-philmd@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

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