@@ -981,7 +981,6 @@ static const TypeInfo nvme_info = {
.instance_init = nvme_instance_init,
.interfaces = (InterfaceInfo[]) {
{ INTERFACE_PCIE_DEVICE },
- { INTERFACE_LEGACY_PCI_DEVICE },
{ }
},
};
@@ -702,7 +702,6 @@ static const TypeInfo e1000e_info = {
.instance_init = e1000e_instance_init,
.interfaces = (InterfaceInfo[]) {
{ INTERFACE_PCIE_DEVICE },
- { INTERFACE_LEGACY_PCI_DEVICE },
{ }
},
};
@@ -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 },
{ }
},
@@ -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 },
{ }
},
@@ -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 },
{ }
},
@@ -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);
}
@@ -3963,7 +3963,6 @@ static const TypeInfo xhci_info = {
.class_init = xhci_class_init,
.interfaces = (InterfaceInfo[]) {
{ INTERFACE_PCIE_DEVICE },
- { INTERFACE_LEGACY_PCI_DEVICE },
{ }
},
};
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 <ehabkost@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(-)