Received: from eggs.gnu.org ([2001:4830:134:3::10]:50708) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cAOdn-0006el-Qc for qemu-devel@nongnu.org; Fri, 25 Nov 2016 17:06:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cAOdm-0000Ml-Mm for qemu-devel@nongnu.org; Fri, 25 Nov 2016 17:06:43 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43902) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cAOdm-0000LF-Da for qemu-devel@nongnu.org; Fri, 25 Nov 2016 17:06:42 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AB4F791C31 for ; Fri, 25 Nov 2016 22:06:41 +0000 (UTC) From: Eduardo Habkost Date: Fri, 25 Nov 2016 20:05:52 -0200 Message-Id: <1480111556-32586-17-git-send-email-ehabkost@redhat.com> In-Reply-To: <1480111556-32586-1-git-send-email-ehabkost@redhat.com> References: <1480111556-32586-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [RFC v2 16/20] [incomplete] remove INTERFACE_LEGACY_PCI_DEVICE from PCIe-only devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Markus Armbruster , Marcel Apfelbaum , "Michael S. Tsirkin" 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 --- 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