@samitouri / QOSamiQemu / commits / 89b624a9f7

whpx: i386: do not enable nested virt when kernel-irqchip=off

This combination is not allowed as of build 26300.7939 and results in: qemu-system-x86_64.exe: WHPX: Failed to setup partition, hr=c0350005 qemu-system-x86_64.exe: failed to initialize whpx: Invalid argument Signed-off-by: Mohamed Mediouni <mohamed@unpredictable.fr> Link: https://lore.kernel.org/r/20260307181856.2209-5-mohamed@unpredictable.fr Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

Mohamed Mediouni committed Mar 7, 2026 at 19:18 UTC 89b624a9f72194d1cf4412fa25ec7f1d84014b73
1 file changed +1 -1
target/i386/whpx/whpx-all.c
+1 -1
@@ -2160,7 +2160,7 @@ int whpx_accel_init(AccelState *as, MachineState *ms)
2160 goto error;
2161 }
2162
2163 - if (processor_features.Bank1.NestedVirtSupport) {
2163 + if (whpx_irqchip_in_kernel() && processor_features.Bank1.NestedVirtSupport) {
2164 memset(&prop, 0, sizeof(WHV_PARTITION_PROPERTY));
2165 prop.NestedVirtualization = 1;
2166 hr = whp_dispatch.WHvSetPartitionProperty(