accel/whpx: Fix NULL dereference in whpx_init_vcpu()
When mechanically moving the @dirty field to AccelCPUState in commit9ad49538c7
, we neglected cpu->accel is still NULL when we want to dereference it. Fixes:9ad49538c7
("accel/whpx: Use accel-specific per-vcpu @dirty field") Reported-by: Volker Rümelin <vr_qemu@t-online.de> Suggested-by: Volker Rümelin <vr_qemu@t-online.de> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20240429091918.27429-2-philmd@linaro.org>
This commit is contained in:
parent
61653b4a97
commit
083367dbbf
@ -2236,7 +2236,7 @@ int whpx_init_vcpu(CPUState *cpu)
|
||||
}
|
||||
|
||||
vcpu->interruptable = true;
|
||||
cpu->accel->dirty = true;
|
||||
vcpu->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);
|
||||
|
Loading…
Reference in New Issue
Block a user