diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-04-29 11:10:53 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-05-03 14:37:51 +0200 |
commit | 083367dbbf6e5ac086c32e64db6701f493928e47 (patch) | |
tree | 5139dd8a1c208694b5330174de90f8f3bcc51064 /target/i386 | |
parent | 61653b4a97b1c08b0f1d090da1ed981362a3961a (diff) | |
download | qemu-083367dbbf6e5ac086c32e64db6701f493928e47.zip qemu-083367dbbf6e5ac086c32e64db6701f493928e47.tar.gz qemu-083367dbbf6e5ac086c32e64db6701f493928e47.tar.bz2 |
accel/whpx: Fix NULL dereference in whpx_init_vcpu()
When mechanically moving the @dirty field to AccelCPUState
in commit 9ad49538c7, 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>
Diffstat (limited to 'target/i386')
-rw-r--r-- | target/i386/whpx/whpx-all.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c index b08e644..a6674a8 100644 --- a/target/i386/whpx/whpx-all.c +++ b/target/i386/whpx/whpx-all.c @@ -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); |