qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 6/6] hw/vmapple: XHCI controller's interrupt mapping workaround f


From: Phil Dennis-Jordan
Subject: [PATCH 6/6] hw/vmapple: XHCI controller's interrupt mapping workaround for macOS
Date: Sun, 8 Dec 2024 20:16:46 +0100

This change enables the new conditional interrupt mapping support
property on the vmapple machine type's integrated XHCI controller.
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
or when only a single MSI vector is active.

Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
---
 hw/vmapple/vmapple.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/hw/vmapple/vmapple.c b/hw/vmapple/vmapple.c
index f607981bc40..156ea33ae79 100644
--- a/hw/vmapple/vmapple.c
+++ b/hw/vmapple/vmapple.c
@@ -453,6 +453,13 @@ static void create_pcie(VMAppleMachineState *vms)
     }
 
     usb_controller = qdev_new(TYPE_QEMU_XHCI);
+    /*
+     * macOS XHCI driver attempts to schedule events onto even rings 1 & 2
+     * even when (as here) there is no MSI-X support on this PCIe bus. 
Disabling
+     * interrupter mapping in the XHCI controller works around the problem.
+     */
+    object_property_set_bool(OBJECT(usb_controller),
+                             "conditional-intr-mapping", true, &error_fatal);
     qdev_realize_and_unref(usb_controller, BUS(pci->bus), &error_fatal);
 
     usb_bus = USB_BUS(object_resolve_type_unambiguous(TYPE_USB_BUS,
-- 
2.39.5 (Apple Git-154)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]