[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v2 16/20] [incomplete] remove INTERFACE_LEGACY_PCI_DEV
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [RFC v2 16/20] [incomplete] remove INTERFACE_LEGACY_PCI_DEVICE from PCIe-only devices |
Date: |
Fri, 25 Nov 2016 20:05:52 -0200 |
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 <address@hidden>
---
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
- Re: [Qemu-devel] [RFC v2 06/20] qdev: Add 'accepted-device-types' property to BusClass, (continued)
- [Qemu-devel] [RFC v2 08/20] virtio-pci: Set PCIDeviceClass::is_express=1, Eduardo Habkost, 2016/11/25
- [Qemu-devel] [RFC v2 07/20] qmp: Add 'always-available-buses' field to 'query-machines', Eduardo Habkost, 2016/11/25
- [Qemu-devel] [RFC v2 09/20] vmxnet3: Set PCIDeviceClass::is_express=1, Eduardo Habkost, 2016/11/25
- [Qemu-devel] [RFC v2 10/20] pvscsi: Set PCIDeviceClass::is_express=1, Eduardo Habkost, 2016/11/25
- [Qemu-devel] [RFC v2 11/20] pci: INTERFACE_LEGACY_PCI_DEVICE and INTERFACE_PCIE_DEVICE interfaces, Eduardo Habkost, 2016/11/25
- [Qemu-devel] [RFC v2 13/20] [trivial] edu: Move edu_info outside function, Eduardo Habkost, 2016/11/25
- [Qemu-devel] [RFC v2 12/20] pci: Replace is_express with INTERFACE_PCIE_DEVICE, Eduardo Habkost, 2016/11/25
- [Qemu-devel] [RFC v2 15/20] eepro100: Add INTERFACE_LEGACY_PCI_DEVICE, Eduardo Habkost, 2016/11/25
- [Qemu-devel] [RFC v2 16/20] [incomplete] remove INTERFACE_LEGACY_PCI_DEVICE from PCIe-only devices,
Eduardo Habkost <=
- [Qemu-devel] [RFC v2 17/20] pci: Set device_type on bus classes, Eduardo Habkost, 2016/11/25
- [Qemu-devel] [RFC v2 14/20] [automated] Add INTERFACE_LEGACY_PCI_DEVICE to all PCI device subclasses, Eduardo Habkost, 2016/11/25
- [Qemu-devel] [RFC v2 18/20] q35: Hack to make root bus accept legacy PCI devices, Eduardo Habkost, 2016/11/25
- [Qemu-devel] [RFC v2 19/20] pci: validate interfaces on base_class_init, Eduardo Habkost, 2016/11/25
- [Qemu-devel] [RFC v2 20/20] pc: Initialize default bus lists, Eduardo Habkost, 2016/11/25
- Re: [Qemu-devel] [libvirt] [RFC v2 00/20] qmp: Report bus information on 'query-machines', no-reply, 2016/11/29
- Re: [Qemu-devel] [libvirt] [RFC v2 00/20] qmp: Report bus information on 'query-machines', no-reply, 2016/11/29
- Re: [Qemu-devel] [RFC v2 00/20] qmp: Report bus information on 'query-machines', Eduardo Habkost, 2016/11/29