This change enables the new conditional interrupt mapping support
property on the vmapple machine type's integrated XHCI controller
using compat_props.
The macOS guest driver attempts to use event rings 1 and 2 on the XHCI
controller, despite there being only one (PCI pin) interrupt channel
available. With conditional interrupt mapping enabled, the XHCI
controller will only schedule events on interrupter 0 in PCI pin mode.
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
v2:
* Set the "conditional-intr-mapping" property via compat_props, not
directly on the created XHCI controller object.
hw/vmapple/vmapple.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/vmapple/vmapple.c b/hw/vmapple/vmapple.c
index 66336942c8d..1732334c779 100644
@@ -641,8 +641,19 @@ static void machvmapple_machine_init(void)
}
type_init(machvmapple_machine_init);
+static GlobalProperty vmapple_compat_defaults[] = {
+ /*
+ * macOS XHCI driver attempts to schedule events onto even rings 1 & 2
+ * even when (as here) there is no MSI(-X) support. Disabling interrupter
+ * mapping in the XHCI controller works around the problem.
+ */
+ { TYPE_QEMU_XHCI, "conditional-intr-mapping", "on" },
+};
+
static void vmapple_machine_10_0_options(MachineClass *mc)
{
+ compat_props_add(mc->compat_props, vmapple_compat_defaults,
+ G_N_ELEMENTS(vmapple_compat_defaults));
}
DEFINE_VMAPPLE_MACHINE_AS_LATEST(10, 0)
--
2.39.5 (Apple Git-154)