@samitouri / QOSamiQemu / commits / 36efe34658

whpx: i386: set APIC ID only when APIC present

-M isapc doesn't have an APIC Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr> Link: https://lore.kernel.org/r/20260422214225.2242-31-mohamed@unpredictable.fr Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Mohamed Mediouni committed Apr 22, 2026 at 23:42 UTC 36efe34658834a48fb8474540261ff4693ddac53
1 file changed +1 -1
target/i386/whpx/whpx-all.c
+1 -1
@@ -2643,7 +2643,7 @@ int whpx_init_vcpu(CPUState *cpu)
2643 goto error;
2644 }
2645
2646 - if (!whpx_irqchip_in_kernel()) {
2646 + if (!whpx_irqchip_in_kernel() && x86_cpu->apic_state != NULL) {
2647 WHV_REGISTER_VALUE apic_id = {.Reg64 = x86_cpu->apic_state->initial_apic_id};
2648 whpx_set_reg(cpu, WHvX64RegisterInitialApicId, apic_id);
2649 }