[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 22/29] hw/usb/hcd-xhci: Unimplemented/guest error logging for port
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 22/29] hw/usb/hcd-xhci: Unimplemented/guest error logging for port MMIO |
Date: |
Tue, 31 Dec 2024 21:22:21 +0100 |
From: Phil Dennis-Jordan <phil@philjordan.eu>
The XHCI device code uses tracing rather than logging on various code
paths that are so far unimplemented. In some cases, these code paths
actually indicate faulty guest software. This patch switches instances
in the read and write handlers for the port MMIO region to use
qemu_log_mask() with LOG_UNIMP or LOG_GUEST_ERROR, as appropriate in
each case.
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241227121336.25838-5-phil@philjordan.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/usb/hcd-xhci.c | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index 3719c0f190d..7dc0994c89c 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -2810,9 +2810,15 @@ static uint64_t xhci_port_read(void *ptr, hwaddr reg,
unsigned size)
case 0x08: /* PORTLI */
ret = 0;
break;
- case 0x0c: /* reserved */
+ case 0x0c: /* PORTHLPMC */
+ ret = 0;
+ qemu_log_mask(LOG_UNIMP, "%s: read from port register PORTHLPMC",
+ __func__);
+ break;
default:
- trace_usb_xhci_unimplemented("port read", reg);
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: read from port offset 0x%" HWADDR_PRIx,
+ __func__, reg);
ret = 0;
}
@@ -2881,9 +2887,22 @@ static void xhci_port_write(void *ptr, hwaddr reg,
}
break;
case 0x04: /* PORTPMSC */
+ case 0x0c: /* PORTHLPMC */
+ qemu_log_mask(LOG_UNIMP,
+ "%s: write 0x%" PRIx64
+ " (%u bytes) to port register at offset 0x%" HWADDR_PRIx,
+ __func__, val, size, reg);
+ break;
case 0x08: /* PORTLI */
+ qemu_log_mask(LOG_GUEST_ERROR, "%s: Write to read-only PORTLI
register",
+ __func__);
+ break;
default:
- trace_usb_xhci_unimplemented("port write", reg);
+ qemu_log_mask(LOG_GUEST_ERROR,
+ "%s: write 0x%" PRIx64 " (%u bytes) to unknown port "
+ "register at offset 0x%" HWADDR_PRIx,
+ __func__, val, size, reg);
+ break;
}
}
--
2.47.1
- [PULL 11/29] hw/net/xilinx_ethlite: Convert some debug logs to trace events, (continued)
- [PULL 11/29] hw/net/xilinx_ethlite: Convert some debug logs to trace events, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 12/29] hw/net/xilinx_ethlite: Remove unuseful debug logs, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 13/29] hw/net/xilinx_ethlite: Update QOM style, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 14/29] hw/net/xilinx_ethlite: Correct maximum RX buffer size, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 15/29] hw/net/xilinx_ethlite: Rename rxbuf -> port_index, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 16/29] fw_cfg: Don't set callback_opaque NULL in fw_cfg_modify_bytes_read(), Philippe Mathieu-Daudé, 2024/12/31
- [PULL 17/29] hw/misc/vmcoreinfo: Declare QOM type using DEFINE_TYPES macro, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 18/29] hw/misc/vmcoreinfo: Rename opaque pointer as 'opaque', Philippe Mathieu-Daudé, 2024/12/31
- [PULL 19/29] hw/i386/amd_iommu: Simplify non-KVM checks on XTSup feature, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 20/29] hw/block/virtio-blk: Replaces request free function with g_free, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 22/29] hw/usb/hcd-xhci: Unimplemented/guest error logging for port MMIO,
Philippe Mathieu-Daudé <=
- [PULL 21/29] hw/usb/hcd-xhci-pci: Move msi/msix properties from NEC to superclass, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 23/29] ui & main loop: Redesign of system-specific main thread event handling, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 24/29] hw/display/apple-gfx: Introduce ParavirtualizedGraphics.Framework support, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 25/29] hw/display/apple-gfx: Adds PCI implementation, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 26/29] hw/display/apple-gfx: Adds configurable mode list, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 27/29] MAINTAINERS: Add myself as maintainer for apple-gfx, reviewer for HVF, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 28/29] net/vmnet: Pad short Ethernet frames, Philippe Mathieu-Daudé, 2024/12/31
- [PULL 29/29] hw/display/qxl: Do not use C99 // comments, Philippe Mathieu-Daudé, 2024/12/31