With this, only vmxnet3, pvscsi, vfio-pci, virtio-pci kept both interfaces.
TODO: The pci-bridge classes still need to be redone, see FIXME comments. Signed-off-by: Eduardo Habkost <ehabk...@redhat.com> --- Changes series v1 -> v2: * (new patch added to series) --- hw/block/nvme.c | 1 - hw/net/e1000e.c | 1 - hw/pci-bridge/ioh3420.c | 1 + hw/pci-bridge/xio3130_downstream.c | 1 + hw/pci-bridge/xio3130_upstream.c | 1 + hw/scsi/megasas.c | 14 +++++++------- hw/usb/hcd-xhci.c | 1 - 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index eb85c1a..02cf1eb 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -981,7 +981,6 @@ static const TypeInfo nvme_info = { .instance_init = nvme_instance_init, .interfaces = (InterfaceInfo[]) { { INTERFACE_PCIE_DEVICE }, - { INTERFACE_LEGACY_PCI_DEVICE }, { } }, }; diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index ff905eb..e397d3f 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -702,7 +702,6 @@ static const TypeInfo e1000e_info = { .instance_init = e1000e_instance_init, .interfaces = (InterfaceInfo[]) { { INTERFACE_PCIE_DEVICE }, - { INTERFACE_LEGACY_PCI_DEVICE }, { } }, }; diff --git a/hw/pci-bridge/ioh3420.c b/hw/pci-bridge/ioh3420.c index 3ee2990..69ba16c 100644 --- a/hw/pci-bridge/ioh3420.c +++ b/hw/pci-bridge/ioh3420.c @@ -209,6 +209,7 @@ static const TypeInfo ioh3420_info = { .parent = TYPE_PCIE_SLOT, .class_init = ioh3420_class_init, .interfaces = (InterfaceInfo[]) { + /*FIXME: remove INTERFACE_LEGACY_PCI_DEVICE */ { INTERFACE_PCIE_DEVICE }, { } }, diff --git a/hw/pci-bridge/xio3130_downstream.c b/hw/pci-bridge/xio3130_downstream.c index 8320777..e9a0974 100644 --- a/hw/pci-bridge/xio3130_downstream.c +++ b/hw/pci-bridge/xio3130_downstream.c @@ -195,6 +195,7 @@ static const TypeInfo xio3130_downstream_info = { .parent = TYPE_PCIE_SLOT, .class_init = xio3130_downstream_class_init, .interfaces = (InterfaceInfo[]) { + /*FIXME: remove INTERFACE_LEGACY_PCI_DEVICE */ { INTERFACE_PCIE_DEVICE }, { } }, diff --git a/hw/pci-bridge/xio3130_upstream.c b/hw/pci-bridge/xio3130_upstream.c index b6361c3..77dfd16 100644 --- a/hw/pci-bridge/xio3130_upstream.c +++ b/hw/pci-bridge/xio3130_upstream.c @@ -166,6 +166,7 @@ static const TypeInfo xio3130_upstream_info = { .parent = TYPE_PCIE_PORT, .class_init = xio3130_upstream_class_init, .interfaces = (InterfaceInfo[]) { + /*FIXME: remove INTERFACE_LEGACY_PCI_DEVICE */ { INTERFACE_PCIE_DEVICE }, { } }, diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index d5c42b1..c30d3e6 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -2527,10 +2527,6 @@ static const TypeInfo megasas_info = { .instance_size = sizeof(MegasasState), .class_size = sizeof(MegasasBaseClass), .abstract = true, - .interfaces = (InterfaceInfo[]) { - { INTERFACE_LEGACY_PCI_DEVICE }, - { }, - }, }; static void megasas_register_types(void) @@ -2545,14 +2541,18 @@ static void megasas_register_types(void) { INTERFACE_PCIE_DEVICE }, { }, }; + InterfaceInfo legacy_interfaces[] = { + { INTERFACE_LEGACY_PCI_DEVICE }, + { }, + }; type_info.name = info->name; type_info.parent = TYPE_MEGASAS_BASE; type_info.class_data = (void *)info; type_info.class_init = megasas_class_init; - if (info->is_express) { - type_info.interfaces = pcie_interfaces; - } + type_info.interfaces = info->is_express ? + pcie_interfaces : + legacy_interfaces; type_register(&type_info); } diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index afbe889..1a47c9e 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -3963,7 +3963,6 @@ static const TypeInfo xhci_info = { .class_init = xhci_class_init, .interfaces = (InterfaceInfo[]) { { INTERFACE_PCIE_DEVICE }, - { INTERFACE_LEGACY_PCI_DEVICE }, { } }, }; -- 2.7.4