@samitouri / QOSamiQemu / commits / e4f7a825cd

whpx: i386: disable enlightenments and LAPIC for isapc

The isapc machine doesn't have an APIC. And Hyper-V enlightenments don't sound too useful to have there so disable those. Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr> Link: https://lore.kernel.org/r/20260422214225.2242-13-mohamed@unpredictable.fr Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Mohamed Mediouni committed Apr 22, 2026 at 23:42 UTC e4f7a825cd291df10456685cead370492927c269
1 file changed +8
target/i386/whpx/whpx-all.c
+8
@@ -2546,6 +2546,14 @@ int whpx_accel_init(AccelState *as, MachineState *ms)
2546 goto error;
2547 }
2548
2549 + /* for isapc, disable Hyper-V enlightenments and LAPIC */
2550 + if (!strcmp(MACHINE_GET_CLASS(ms)->name, "isapc")) {
2551 + whpx->kernel_irqchip_allowed = false;
2552 + whpx->kernel_irqchip_required = false;
2553 + whpx->hyperv_enlightenments_allowed = false;
2554 + whpx->hyperv_enlightenments_required = false;
2555 + }
2556 +
2557 whpx->mem_quota = ms->ram_size;
2558
2559 hr = whp_dispatch.WHvGetCapability(