[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 44/49] hw/usb/hcd-xhci-pci: Use event ring 0 if mapping unsupporte
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 44/49] hw/usb/hcd-xhci-pci: Use event ring 0 if mapping unsupported |
Date: |
Sun, 12 Jan 2025 23:17:20 +0100 |
From: Phil Dennis-Jordan <phil@philjordan.eu>
The XHCI specification, section 4.17.1 specifies that "If the
Number of Interrupters (MaxIntrs) field is greater than 1, then
Interrupter Mapping shall be supported." and "If Interrupter
Mapping is not supported, the Interrupter Target field shall be
ignored by the xHC and all Events targeted at Interrupter 0."
QEMU's XHCI device has so far not specially addressed this case,
so we add a check to xhci_event() to redirect to event ring and
interrupt 0 if mapping is disabled.
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241227121336.25838-4-phil@philjordan.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/usb/hcd-xhci.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 7dc0994c89c..00d5bc37792 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -644,6 +644,10 @@ static void xhci_event(XHCIState *xhci, XHCIEvent *event,
int v)
dma_addr_t erdp;
unsigned int dp_idx;
+ if (xhci->numintrs == 1) {
+ v = 0;
+ }
+
if (v >= xhci->numintrs) {
DPRINTF("intr nr out of range (%d >= %d)\n", v, xhci->numintrs);
return;
--
2.47.1
- [PULL 34/49] hw/gpio/imx_gpio: Turn DPRINTF() into trace events, (continued)
- [PULL 34/49] hw/gpio/imx_gpio: Turn DPRINTF() into trace events, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 36/49] tests: Add functional tests for HPPA machines, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 30/49] tests/qtest/libqos: Reuse TYPE_IMX_I2C define, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 37/49] target/hppa: Convert hppa_cpu_init() to ResetHold handler, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 38/49] hw/hppa: Reset vCPUs calling resettable_reset(), Philippe Mathieu-Daudé, 2025/01/12
- [PULL 39/49] target/hppa: Only set PSW 'M' bit on reset, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 40/49] target/hppa: Set PC on vCPU reset, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 41/49] target/hppa: Speed up hppa_is_pa20(), Philippe Mathieu-Daudé, 2025/01/12
- [PULL 42/49] hw/loongarch/virt: Checkpatch cleanup, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 43/49] backends/cryptodev-vhost-user: Fix local_error leaks, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 44/49] hw/usb/hcd-xhci-pci: Use event ring 0 if mapping unsupported,
Philippe Mathieu-Daudé <=
- [PULL 45/49] hw/tricore/triboard: Remove unnecessary use of &first_cpu, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 46/49] MAINTAINERS: remove myself from sbsa-ref, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 47/49] MAINTAINERS: Add me as the maintainer for ivshmem-flat, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 48/49] MAINTAINERS: Update path to coreaudio.m, Philippe Mathieu-Daudé, 2025/01/12
- [PULL 49/49] Add a b4 configuration file, Philippe Mathieu-Daudé, 2025/01/12
- Re: [PULL 00/49] Misc HW patches for 2025-01-12, Philippe Mathieu-Daudé, 2025/01/13