[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 21/29] hw/usb/hcd-xhci-pci: Move msi/msix properties from NEC to s
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 21/29] hw/usb/hcd-xhci-pci: Move msi/msix properties from NEC to superclass |
Date: |
Tue, 31 Dec 2024 21:22:20 +0100 |
From: Phil Dennis-Jordan <phil@philjordan.eu>
The NEC XHCI controller exposes the underlying PCI device's msi and
msix properties, but the superclass and thus the qemu-xhci device do
not. There does not seem to be any obvious reason for this limitation.
This change moves these properties to the superclass so they are
exposed by both PCI XHCI device variants.
Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20241227121336.25838-3-phil@philjordan.eu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/usb/hcd-xhci-nec.c | 2 --
hw/usb/hcd-xhci-pci.c | 6 ++++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/hw/usb/hcd-xhci-nec.c b/hw/usb/hcd-xhci-nec.c
index b1df95b52a5..1df518baf59 100644
--- a/hw/usb/hcd-xhci-nec.c
+++ b/hw/usb/hcd-xhci-nec.c
@@ -37,8 +37,6 @@ struct XHCINecState {
};
static const Property nec_xhci_properties[] = {
- DEFINE_PROP_ON_OFF_AUTO("msi", XHCIPciState, msi, ON_OFF_AUTO_AUTO),
- DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO),
DEFINE_PROP_UINT32("intrs", XHCINecState, intrs, XHCI_MAXINTRS),
DEFINE_PROP_UINT32("slots", XHCINecState, slots, XHCI_MAXSLOTS),
};
diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c
index e110840c7a0..a069b423388 100644
--- a/hw/usb/hcd-xhci-pci.c
+++ b/hw/usb/hcd-xhci-pci.c
@@ -197,6 +197,11 @@ static void xhci_instance_init(Object *obj)
qdev_alias_all_properties(DEVICE(&s->xhci), obj);
}
+static const Property xhci_pci_properties[] = {
+ DEFINE_PROP_ON_OFF_AUTO("msi", XHCIPciState, msi, ON_OFF_AUTO_AUTO),
+ DEFINE_PROP_ON_OFF_AUTO("msix", XHCIPciState, msix, ON_OFF_AUTO_AUTO),
+};
+
static void xhci_class_init(ObjectClass *klass, void *data)
{
PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
@@ -208,6 +213,7 @@ static void xhci_class_init(ObjectClass *klass, void *data)
k->realize = usb_xhci_pci_realize;
k->exit = usb_xhci_pci_exit;
k->class_id = PCI_CLASS_SERIAL_USB;
+ device_class_set_props(dc, xhci_pci_properties);
}
static const TypeInfo xhci_pci_info = {
--
2.47.1
- [PULL 12/29] hw/net/xilinx_ethlite: Remove unuseful debug logs, (continued)
- [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é, 2024/12/31
- [PULL 21/29] hw/usb/hcd-xhci-pci: Move msi/msix properties from NEC to superclass,
Philippe Mathieu-Daudé <=
- [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