From nobody Fri May 3 11:11:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1489684461709744.1617512399525; Thu, 16 Mar 2017 10:14:21 -0700 (PDT) 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 12419624B1; Thu, 16 Mar 2017 17:14:21 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D7CB817D8E; Thu, 16 Mar 2017 17:14:20 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id BDEEF4E9BC; Thu, 16 Mar 2017 17:14:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2GHEJP8018180 for ; Thu, 16 Mar 2017 13:14:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 29ADD1801D; Thu, 16 Mar 2017 17:14:19 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.34.129.229]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7B84318016 for ; Thu, 16 Mar 2017 17:14:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 12419624B1 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 12419624B1 From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 16 Mar 2017 18:14:08 +0100 Message-Id: <1489684451-9274-2-git-send-email-abologna@redhat.com> In-Reply-To: <1489684451-9274-1-git-send-email-abologna@redhat.com> References: <1489684451-9274-1-git-send-email-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/4] qemu: Add support for generic PCIe Root Ports X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@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.39]); Thu, 16 Mar 2017 17:14:21 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" QEMU 2.9 introduces the pcie-root-port device, which is a generic version of the existing ioh3420 device. Make the new device available to libvirt users. --- docs/schemas/domaincommon.rng | 1 + src/conf/domain_conf.c | 4 +++- src/conf/domain_conf.h | 1 + src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + src/qemu/qemu_command.c | 18 +++++++++++++++--- tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 1 + 7 files changed, 24 insertions(+), 4 deletions(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 8be5e08..24d1edb 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -1904,6 +1904,7 @@ i82801b11-bridge ioh3420 + pcie-root-port x3130-upstream diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 11fde50..eaf46b2 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -338,7 +338,9 @@ VIR_ENUM_IMPL(virDomainControllerPCIModelName, "x3130-upstream", "xio3130-downstream", "pxb", - "pxb-pcie") + "pxb-pcie", + "pcie-root-port", +); =20 VIR_ENUM_IMPL(virDomainControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SC= SI_LAST, "auto", diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 826afb4..8e6d874 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -694,6 +694,7 @@ typedef enum { VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_XIO3130_DOWNSTREAM, VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PXB, VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PXB_PCIE, + VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_ROOT_PORT, =20 VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST } virDomainControllerPCIModelName; diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 5200b39..b85ca71 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -360,6 +360,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, "virtio-net.host_mtu", "spice-rendernode", "nvdimm", + "pcie-root-port", ); =20 =20 @@ -1621,6 +1622,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "ivshmem-doorbell", QEMU_CAPS_DEVICE_IVSHMEM_DOORBELL }, { "vhost-scsi", QEMU_CAPS_DEVICE_VHOST_SCSI }, { "nvdimm", QEMU_CAPS_DEVICE_NVDIMM }, + { "pcie-root-port", QEMU_CAPS_DEVICE_PCIE_ROOT_PORT }, }; =20 static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBalloon[]= =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 1b4bcfb..ca8a517 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -395,6 +395,7 @@ typedef enum { QEMU_CAPS_VIRTIO_NET_HOST_MTU, /* virtio-net-*.host_mtu */ QEMU_CAPS_SPICE_RENDERNODE, /* -spice rendernode */ QEMU_CAPS_DEVICE_NVDIMM, /* -device nvdimm */ + QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, /* -device pcie-root-port */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 61d9eb9..878d088 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2874,20 +2874,32 @@ qemuBuildControllerDevStr(const virDomainDef *domai= nDef, def->opts.pciopts.modelName); goto error; } - if (def->opts.pciopts.modelName - !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_IOH3420) { + if ((def->opts.pciopts.modelName !=3D + VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_IOH3420) && + (def->opts.pciopts.modelName !=3D + VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_ROOT_PORT)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("PCI controller model name '%s' " "is not valid for a pcie-root-port"), modelName); goto error; } - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_IOH3420)) { + if ((def->opts.pciopts.modelName =3D=3D + VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_IOH3420) && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_IOH3420)) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", _("the pcie-root-port (ioh3420) " "controller is not supported in this QEMU= binary")); goto error; } + if ((def->opts.pciopts.modelName =3D=3D + VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_ROOT_PORT) && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCIE_ROOT_PORT)= ) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("the pcie-root-port (pcie-root-port) " + "controller is not supported in this QEMU= binary")); + goto error; + } =20 virBufferAsprintf(&buf, "%s,port=3D0x%x,chassis=3D%d,id=3D%s", modelName, def->opts.pciopts.port, diff --git a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_2.9.0.x86_64.xml index 334f8e7..a397615 100644 --- a/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml @@ -202,6 +202,7 @@ + 2008050 0 (v2.8.0-1961-g5b10b94bd5) --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 11:11:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1489684463673745.7513684888207; Thu, 16 Mar 2017 10:14:23 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BD069C0467CB; Thu, 16 Mar 2017 17:14:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8B9BB60A99; Thu, 16 Mar 2017 17:14:22 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 41B6C1853D03; Thu, 16 Mar 2017 17:14:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2GHEKP5018185 for ; Thu, 16 Mar 2017 13:14:20 -0400 Received: by smtp.corp.redhat.com (Postfix) id F3A4317103; Thu, 16 Mar 2017 17:14:19 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.34.129.229]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 793A85C551 for ; Thu, 16 Mar 2017 17:14:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BD069C0467CB Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BD069C0467CB From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 16 Mar 2017 18:14:09 +0100 Message-Id: <1489684451-9274-3-git-send-email-abologna@redhat.com> In-Reply-To: <1489684451-9274-1-git-send-email-abologna@redhat.com> References: <1489684451-9274-1-git-send-email-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/4] qemu: Use generic PCIe Root Ports by default when available X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 16 Mar 2017 17:14:23 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" ioh3420 is emulated Intel hardware, so it always looked quite out of place in aarch64/virt guests. Even for x86/q35 guests, the recently-introduced pcie-root-port is a better choice because, unlike ioh3420, it doesn't require IO space (a farily constrained resource) to work. If pcie-root-port is available in QEMU, use it; ioh3420 is still used as fallback for when pcie-root-port is not available. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1408808 --- Changes from v1: * Always use pcie-root-port if available, regardless of machine type. src/qemu/qemu_domain_address.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 64aa4ef..6d3a627 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1846,13 +1846,15 @@ qemuDomainSupportsPCI(virDomainDefPtr def, =20 =20 static void -qemuDomainPCIControllerSetDefaultModelName(virDomainControllerDefPtr cont) +qemuDomainPCIControllerSetDefaultModelName(virDomainControllerDefPtr cont, + virQEMUCapsPtr qemuCaps) { int *modelName =3D &cont->opts.pciopts.modelName; =20 /* make sure it's not already set */ if (*modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE) return; + switch ((virDomainControllerModelPCI)cont->model) { case VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE: *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCI_BRIDGE; @@ -1861,7 +1863,12 @@ qemuDomainPCIControllerSetDefaultModelName(virDomain= ControllerDefPtr cont) *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_I82801B11_BRID= GE; break; case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT: - *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_IOH3420; + /* Use generic PCIe Root Ports if available, falling back to + * ioh3420 otherwise */ + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCIE_ROOT_PORT)) + *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_ROOT_= PORT; + else + *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_IOH3420; break; case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT: *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_X3130_UPSTREAM; @@ -2143,7 +2150,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def, * device in qemu) for any controller that doesn't yet * have it set. */ - qemuDomainPCIControllerSetDefaultModelName(cont); + qemuDomainPCIControllerSetDefaultModelName(cont, qemuCaps); =20 /* set defaults for any other auto-generated config * options for this controller that haven't been --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 11:11:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1489684470492898.9317620782142; Thu, 16 Mar 2017 10:14:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 978D97AE9E; Thu, 16 Mar 2017 17:14:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6AE7117F29; Thu, 16 Mar 2017 17:14:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1B8C34ED27; Thu, 16 Mar 2017 17:14:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2GHEL4Z018195 for ; Thu, 16 Mar 2017 13:14:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id F2B8817103; Thu, 16 Mar 2017 17:14:20 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.34.129.229]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4FF065C551 for ; Thu, 16 Mar 2017 17:14:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 978D97AE9E Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 978D97AE9E From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 16 Mar 2017 18:14:10 +0100 Message-Id: <1489684451-9274-4-git-send-email-abologna@redhat.com> In-Reply-To: <1489684451-9274-1-git-send-email-abologna@redhat.com> References: <1489684451-9274-1-git-send-email-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 3/4] tests: Test generic PCIe Root Ports X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 16 Mar 2017 17:14:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We want pcie-root-ports to be used when available in QEMU, but at the same time we need to ensure that hosts running older QEMU releases keep working and that the user can override the default at any time. Add a comment for the original pcie-root-port test cases to make it clear how these new test cases are different. --- Changes from v1: * Don't change existing test cases; * Only test the new feature once. .../qemuxml2argv-pcie-root-port-model-generic.args | 22 ++++++++++++ .../qemuxml2argv-pcie-root-port-model-generic.xml | 22 ++++++++++++ .../qemuxml2argv-pcie-root-port-model-ioh3420.args | 21 ++++++++++++ .../qemuxml2argv-pcie-root-port-model-ioh3420.xml | 19 ++++++++++ tests/qemuxml2argvtest.c | 14 ++++++++ ...qemuxml2xmlout-pcie-root-port-model-generic.xml | 40 ++++++++++++++++++= ++++ ...qemuxml2xmlout-pcie-root-port-model-ioh3420.xml | 35 +++++++++++++++++++ tests/qemuxml2xmltest.c | 14 ++++++++ 8 files changed, 187 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-mode= l-generic.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-mode= l-generic.xml create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-mode= l-ioh3420.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-mode= l-ioh3420.xml create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port-= model-generic.xml create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port-= model-ioh3420.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-model-gener= ic.args b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-model-generic.= args new file mode 100644 index 0000000..96239bd --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-model-generic.args @@ -0,0 +1,22 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name guest \ +-S \ +-M q35 \ +-m 2048 \ +-smp 2,sockets=3D2,cores=3D1,threads=3D1 \ +-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \ +-nographic \ +-nodefaults \ +-monitor unix:/tmp/lib/domain--1-guest/monitor.sock,server,nowait \ +-no-acpi \ +-boot c \ +-device pcie-root-port,port=3D0x10,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,\ +multifunction=3Don,addr=3D0x2 \ +-device pcie-root-port,port=3D0x11,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,add= r=3D0x2.0x1 \ +-device ioh3420,port=3D0x12,chassis=3D3,id=3Dpci.3,bus=3Dpcie.0,addr=3D0x2= .0x2 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-model-gener= ic.xml b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-model-generic.x= ml new file mode 100644 index 0000000..7acfb95 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-model-generic.xml @@ -0,0 +1,22 @@ + + guest + 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 + 2097152 + 2097152 + 2 + + hvm + + + /usr/bin/qemu-system-x86_64 + + + + + + + + + + + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-model-ioh34= 20.args b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-model-ioh3420.= args new file mode 100644 index 0000000..73f533b --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-model-ioh3420.args @@ -0,0 +1,21 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name guest \ +-S \ +-M q35 \ +-m 2048 \ +-smp 2,sockets=3D2,cores=3D1,threads=3D1 \ +-uuid 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 \ +-nographic \ +-nodefaults \ +-monitor unix:/tmp/lib/domain--1-guest/monitor.sock,server,nowait \ +-no-acpi \ +-boot c \ +-device ioh3420,port=3D0x10,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,multifunct= ion=3Don,\ +addr=3D0x2 \ +-device ioh3420,port=3D0x11,chassis=3D2,id=3Dpci.2,bus=3Dpcie.0,addr=3D0x2= .0x1 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-model-ioh34= 20.xml b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-model-ioh3420.x= ml new file mode 100644 index 0000000..4cba3f9 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-pcie-root-port-model-ioh3420.xml @@ -0,0 +1,19 @@ + + guest + 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 + 2097152 + 2097152 + 2 + + hvm + + + /usr/bin/qemu-system-x86_64 + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 5716509..4a66136 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2011,12 +2011,26 @@ mymain(void) QEMU_CAPS_DEVICE_QXL, QEMU_CAPS_HDA_DUPLEX, QEMU_CAPS_USB_REDIR); + + /* Test automatic and manual setting of pcie-root-port attributes */ DO_TEST("pcie-root-port", QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); + + /* Make sure the default model for PCIe Root Ports is picked correctly + * based on QEMU binary capabilities. We use x86/q35 for the test, but + * any PCIe machine type (such as aarch64/virt) will behave the same */ + DO_TEST("pcie-root-port-model-generic", + QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, + QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_PCI_MULTIFUNCTION); + DO_TEST("pcie-root-port-model-ioh3420", + QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_PCI_MULTIFUNCTION); + DO_TEST("autoindex", QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port-model-g= eneric.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port-model-g= eneric.xml new file mode 100644 index 0000000..0de0d3e --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port-model-generic.= xml @@ -0,0 +1,40 @@ + + guest + 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 + 2097152 + 2097152 + 2 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + + + +
+ + + + +
+ + +
+ + + + + + diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port-model-i= oh3420.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port-model-i= oh3420.xml new file mode 100644 index 0000000..3bbecf7 --- /dev/null +++ b/tests/qemuxml2xmloutdata/qemuxml2xmlout-pcie-root-port-model-ioh3420.= xml @@ -0,0 +1,35 @@ + + guest + 11dbdcdd-4c3b-482b-8903-9bdb8c0a2774 + 2097152 + 2097152 + 2 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + + + +
+ + +
+ + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index bf62dbb..7199175 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -884,12 +884,26 @@ mymain(void) QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); + + /* Test automatic and manual setting of pcie-root-port attributes */ DO_TEST("pcie-root-port", QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_ICH9_AHCI, QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_VIDEO_PRIMARY, QEMU_CAPS_DEVICE_QXL); + + /* Make sure the default model for PCIe Root Ports is picked correctly + * based on QEMU binary capabilities. We use x86/q35 for the test, but + * any PCIe machine type (such as aarch64/virt) will behave the same */ + DO_TEST("pcie-root-port-model-generic", + QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, + QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_PCI_MULTIFUNCTION); + DO_TEST("pcie-root-port-model-ioh3420", + QEMU_CAPS_DEVICE_IOH3420, + QEMU_CAPS_PCI_MULTIFUNCTION); + DO_TEST("pcie-switch-upstream-port", QEMU_CAPS_DEVICE_IOH3420, QEMU_CAPS_DEVICE_X3130_UPSTREAM, --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 11:11:33 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1489684474320289.46944732259647; Thu, 16 Mar 2017 10:14:34 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1343B80486; Thu, 16 Mar 2017 17:14:33 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CA2B86046C; Thu, 16 Mar 2017 17:14:32 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 80E551FF; Thu, 16 Mar 2017 17:14:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2GHEMLX018200 for ; Thu, 16 Mar 2017 13:14:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id 010AE17103; Thu, 16 Mar 2017 17:14:22 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.34.129.229]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7A5811801E for ; Thu, 16 Mar 2017 17:14:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1343B80486 Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 1343B80486 From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 16 Mar 2017 18:14:11 +0100 Message-Id: <1489684451-9274-5-git-send-email-abologna@redhat.com> In-Reply-To: <1489684451-9274-1-git-send-email-abologna@redhat.com> References: <1489684451-9274-1-git-send-email-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 4/4] news: Document support for generic PCIe Root Ports X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 16 Mar 2017 17:14:34 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" --- Changes from v1: * Include model names; * Reword slightly. docs/news.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 097a09a..3501f89 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -29,6 +29,16 @@ for QEMUs older than 2.9.0. + + + qemu: Introduce support for generic PCIe Root Ports + + + For new controllers, a generic device (pcie-root-port) will be u= sed + by default instead of the Intel-specific device (ioh3420), provi= ded + the QEMU binary supports it. + +
--=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list