From nobody Mon Feb 9 02:50:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1503526644369144.80083831128138; Wed, 23 Aug 2017 15:17:24 -0700 (PDT) Received: from localhost ([::1]:45834 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkdxj-00074L-4O for importer@patchew.org; Wed, 23 Aug 2017 18:17:23 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59564) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkdvh-0005dW-8K for qemu-devel@nongnu.org; Wed, 23 Aug 2017 18:15:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dkdvf-00023w-Hj for qemu-devel@nongnu.org; Wed, 23 Aug 2017 18:15:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58886) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dkdvf-000238-80 for qemu-devel@nongnu.org; Wed, 23 Aug 2017 18:15:15 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3C492883B6 for ; Wed, 23 Aug 2017 22:15:14 +0000 (UTC) Received: from localhost (ovpn-116-4.gru2.redhat.com [10.97.116.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0A71567C9C; Wed, 23 Aug 2017 22:15:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 3C492883B6 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=ehabkost@redhat.com From: Eduardo Habkost To: qemu-devel@nongnu.org Date: Wed, 23 Aug 2017 19:14:43 -0300 Message-Id: <20170823221445.15243-4-ehabkost@redhat.com> In-Reply-To: <20170823221445.15243-1-ehabkost@redhat.com> References: <20170823221445.15243-1-ehabkost@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 23 Aug 2017 22:15:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 3/5] pci: Add INTERFACE_PCIE_DEVICE to all PCIe devices X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marcel Apfelbaum , Laine Stump , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Change all devices that set is_express=3D1 to implement INTERFACE_PCIE_DEVICE. Signed-off-by: Eduardo Habkost Reviewed-by: Alistair Francis --- hw/block/nvme.c | 4 ++++ hw/net/e1000e.c | 4 ++++ hw/pci-bridge/pcie_root_port.c | 4 ++++ hw/pci-bridge/xio3130_downstream.c | 4 ++++ hw/pci-bridge/xio3130_upstream.c | 4 ++++ hw/pci-host/xilinx-pcie.c | 4 ++++ hw/scsi/megasas.c | 6 ++++++ hw/usb/hcd-xhci.c | 4 ++++ 8 files changed, 34 insertions(+) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 6071dc1..26d58b6 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -1110,6 +1110,10 @@ static const TypeInfo nvme_info =3D { .instance_size =3D sizeof(NvmeCtrl), .class_init =3D nvme_class_init, .instance_init =3D nvme_instance_init, + .interfaces =3D (InterfaceInfo[]) { + { INTERFACE_PCIE_DEVICE }, + { } + }, }; =20 static void nvme_register_types(void) diff --git a/hw/net/e1000e.c b/hw/net/e1000e.c index 6c42b44..81f7934 100644 --- a/hw/net/e1000e.c +++ b/hw/net/e1000e.c @@ -708,6 +708,10 @@ static const TypeInfo e1000e_info =3D { .instance_size =3D sizeof(E1000EState), .class_init =3D e1000e_class_init, .instance_init =3D e1000e_instance_init, + .interfaces =3D (InterfaceInfo[]) { + { INTERFACE_PCIE_DEVICE }, + { } + }, }; =20 static void e1000e_register_types(void) diff --git a/hw/pci-bridge/pcie_root_port.c b/hw/pci-bridge/pcie_root_port.c index 4d588cb..9b6e4ce 100644 --- a/hw/pci-bridge/pcie_root_port.c +++ b/hw/pci-bridge/pcie_root_port.c @@ -161,6 +161,10 @@ static const TypeInfo rp_info =3D { .class_init =3D rp_class_init, .abstract =3D true, .class_size =3D sizeof(PCIERootPortClass), + .interfaces =3D (InterfaceInfo[]) { + { INTERFACE_PCIE_DEVICE }, + { } + }, }; =20 static void rp_register_types(void) diff --git a/hw/pci-bridge/xio3130_downstream.c b/hw/pci-bridge/xio3130_dow= nstream.c index e706f36..7d2f762 100644 --- a/hw/pci-bridge/xio3130_downstream.c +++ b/hw/pci-bridge/xio3130_downstream.c @@ -195,6 +195,10 @@ static const TypeInfo xio3130_downstream_info =3D { .name =3D "xio3130-downstream", .parent =3D TYPE_PCIE_SLOT, .class_init =3D xio3130_downstream_class_init, + .interfaces =3D (InterfaceInfo[]) { + { INTERFACE_PCIE_DEVICE }, + { } + }, }; =20 static void xio3130_downstream_register_types(void) diff --git a/hw/pci-bridge/xio3130_upstream.c b/hw/pci-bridge/xio3130_upstr= eam.c index a052224..227997c 100644 --- a/hw/pci-bridge/xio3130_upstream.c +++ b/hw/pci-bridge/xio3130_upstream.c @@ -166,6 +166,10 @@ static const TypeInfo xio3130_upstream_info =3D { .name =3D "x3130-upstream", .parent =3D TYPE_PCIE_PORT, .class_init =3D xio3130_upstream_class_init, + .interfaces =3D (InterfaceInfo[]) { + { INTERFACE_PCIE_DEVICE }, + { } + }, }; =20 static void xio3130_upstream_register_types(void) diff --git a/hw/pci-host/xilinx-pcie.c b/hw/pci-host/xilinx-pcie.c index 4613dda..7659253 100644 --- a/hw/pci-host/xilinx-pcie.c +++ b/hw/pci-host/xilinx-pcie.c @@ -317,6 +317,10 @@ static const TypeInfo xilinx_pcie_root_info =3D { .parent =3D TYPE_PCI_BRIDGE, .instance_size =3D sizeof(XilinxPCIERoot), .class_init =3D xilinx_pcie_root_class_init, + .interfaces =3D (InterfaceInfo[]) { + { INTERFACE_PCIE_DEVICE }, + { } + }, }; =20 static void xilinx_pcie_register(void) diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c index 734fdae..3641c30 100644 --- a/hw/scsi/megasas.c +++ b/hw/scsi/megasas.c @@ -2451,6 +2451,7 @@ typedef struct MegasasInfo { int osts; const VMStateDescription *vmsd; Property *props; + InterfaceInfo *interfaces; } MegasasInfo; =20 static struct MegasasInfo megasas_devices[] =3D { @@ -2480,6 +2481,10 @@ static struct MegasasInfo megasas_devices[] =3D { .is_express =3D true, .vmsd =3D &vmstate_megasas_gen2, .props =3D megasas_properties_gen2, + .interfaces =3D (InterfaceInfo[]) { + { INTERFACE_PCIE_DEVICE }, + { } + }, } }; =20 @@ -2531,6 +2536,7 @@ static void megasas_register_types(void) type_info.parent =3D TYPE_MEGASAS_BASE; type_info.class_data =3D (void *)info; type_info.class_init =3D megasas_class_init; + type_info.interfaces =3D info->interfaces; =20 type_register(&type_info); } diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c index 204ea69..d95ed4f 100644 --- a/hw/usb/hcd-xhci.c +++ b/hw/usb/hcd-xhci.c @@ -3670,6 +3670,10 @@ static const TypeInfo xhci_info =3D { .instance_size =3D sizeof(XHCIState), .class_init =3D xhci_class_init, .abstract =3D true, + .interfaces =3D (InterfaceInfo[]) { + { INTERFACE_PCIE_DEVICE }, + { } + }, }; =20 static void qemu_xhci_class_init(ObjectClass *klass, void *data) --=20 2.9.4