From: Akihiko Odaki <akihiko.odaki@daynix.com>
To: Phil Dennis-Jordan <phil@philjordan.eu>, qemu-devel@nongnu.org
Cc: richard.henderson@linaro.org, philmd@linaro.org,
thuth@redhat.com, zhao1.liu@intel.com, imammedo@redhat.com
Subject: Re: [PATCH 6/6] hw/vmapple: XHCI controller's interrupt mapping workaround for macOS
Date: Mon, 9 Dec 2024 15:26:44 +0900 [thread overview]
Message-ID: <df6847f5-11d0-4c69-bfac-ec2281279841@daynix.com> (raw)
In-Reply-To: <20241208191646.64857-7-phil@philjordan.eu>
On 2024/12/09 4:16, Phil Dennis-Jordan wrote:
> 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.
I think docs/system/arm/vmapple.rst also needs to be updated.
>
> 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);
Use compat_props to change the global default for this machine.
By the way, this unconditionally adds xHCI and USB devices, but that
should be avoided so that users can customize the configuration. Use
defaults_enabled() as a condition.
Regards,
Akihiko Odaki
> qdev_realize_and_unref(usb_controller, BUS(pci->bus), &error_fatal);
>
> usb_bus = USB_BUS(object_resolve_type_unambiguous(TYPE_USB_BUS,
next prev parent reply other threads:[~2024-12-09 6:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-08 19:16 [PATCH 0/6] hw/usb/hcd-xhci: Fixes, improvements, and macOS workaround Phil Dennis-Jordan
2024-12-08 19:16 ` [PATCH 1/6] hw/usb/hcd-xhci-pci: Don't trigger MSI on higher vector than allocated Phil Dennis-Jordan
2024-12-08 19:16 ` [PATCH 2/6] hw/usb/hcd-xhci-pci: Moves msi/msix properties from NEC to superclass Phil Dennis-Jordan
2024-12-09 6:27 ` Akihiko Odaki
2024-12-08 19:16 ` [PATCH 3/6] hw/usb/hcd-xhci-pci: Use event ring 0 if mapping unsupported Phil Dennis-Jordan
2024-12-09 6:28 ` Akihiko Odaki
2024-12-08 19:16 ` [PATCH 4/6] hw/usb/hcd-xhci-pci: Adds property for disabling mapping in IRQ mode Phil Dennis-Jordan
2024-12-09 6:19 ` Akihiko Odaki
2024-12-09 9:53 ` Phil Dennis-Jordan
2024-12-08 19:16 ` [PATCH 5/6] hw/usb/hcd-xhci-pci: Indentation fix Phil Dennis-Jordan
2024-12-08 19:16 ` [PATCH 6/6] hw/vmapple: XHCI controller's interrupt mapping workaround for macOS Phil Dennis-Jordan
2024-12-09 6:26 ` Akihiko Odaki [this message]
2024-12-09 11:14 ` Phil Dennis-Jordan
2024-12-09 11:47 ` Akihiko Odaki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=df6847f5-11d0-4c69-bfac-ec2281279841@daynix.com \
--to=akihiko.odaki@daynix.com \
--cc=imammedo@redhat.com \
--cc=phil@philjordan.eu \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
--cc=zhao1.liu@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).