From nobody Fri May 3 01:46:16 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.zohomail.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 1522245987164635.5958419588684; Wed, 28 Mar 2018 07:06:27 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DA4D67F3F5; Wed, 28 Mar 2018 14:06:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63E2665AC5; Wed, 28 Mar 2018 14:06:25 +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 243524CA9C; Wed, 28 Mar 2018 14:06:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SE6FTd027690 for ; Wed, 28 Mar 2018 10:06:15 -0400 Received: by smtp.corp.redhat.com (Postfix) id C000E215CDC7; Wed, 28 Mar 2018 14:06:15 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-126.brq.redhat.com [10.40.204.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 25646215CDC5 for ; Wed, 28 Mar 2018 14:06:14 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 28 Mar 2018 16:06:00 +0200 Message-Id: <20180328140610.8414-2-abologna@redhat.com> In-Reply-To: <20180328140610.8414-1-abologna@redhat.com> References: <20180328140610.8414-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 01/11] docs: Tweak PCI controller model documentation 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 28 Mar 2018 14:06:26 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Instead of first listing the models on their own, and then listing them again grouped by the libvirt release they were introduced in, have a single list. Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- docs/formatdomain.html.in | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 08dc74b6b9..299d7b9d42 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -3936,18 +3936,14 @@ =20

PCI controllers have an optional model attribute with - possible values pci-root, pcie-root, - pcie-root-port, pci-bridge, - dmi-to-pci-bridge, pcie-switch-upstream-port, - pcie-switch-downstream-port, pci-expander-bus, - or pcie-expander-bus. (pci-root and - pci-bridge since 1.0.5, pcie-root and - dmi-to-pci-bridge since 1.1.2, - pcie-root-port, pcie-switch-upstream-port, - pcie-switch-downstream-port since - 1.2.19, and pci-expander-bus and - pcie-expander-bus since 1.3.4) The - root controllers (pci-root + possible values pci-root and pci-bridge + (since 1.0.5), pcie-root a= nd + dmi-to-pci-bridge (since 1.1.2), + pcie-root-port, pcie-switch-upstream-port = and + pcie-switch-downstream-port (since + 1.2.19), pci-expander-bus and + pcie-expander-bus (since 1.3.4). + The root controllers (pci-root and pcie-root) have an optional pcihole64 element specifying how big (in kilobytes, or in the unit specified by pcihole64's --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 01:46:16 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.zohomail.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 1522245980239854.3242178452349; Wed, 28 Mar 2018 07:06:20 -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 C1CCB3AA1B; Wed, 28 Mar 2018 14:06:18 +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 49AA560BE7; Wed, 28 Mar 2018 14:06:18 +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 018CC181B9FF; Wed, 28 Mar 2018 14:06:18 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SE6GbB027704 for ; Wed, 28 Mar 2018 10:06:16 -0400 Received: by smtp.corp.redhat.com (Postfix) id B0EFA215CDC7; Wed, 28 Mar 2018 14:06:16 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-126.brq.redhat.com [10.40.204.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 304CE215CDC5 for ; Wed, 28 Mar 2018 14:06:15 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 28 Mar 2018 16:06:01 +0200 Message-Id: <20180328140610.8414-3-abologna@redhat.com> In-Reply-To: <20180328140610.8414-1-abologna@redhat.com> References: <20180328140610.8414-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 02/11] tests: Add aarch64-traditional-pci test 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.38]); Wed, 28 Mar 2018 14:06:19 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This test shows what happens when you add a traditional PCI device such as pci-serial to a pure PCIe machine type such as aarch64/virt. Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- .../qemuxml2argvdata/aarch64-traditional-pci.args | 26 +++++++++++++ tests/qemuxml2argvdata/aarch64-traditional-pci.xml | 19 ++++++++++ tests/qemuxml2argvtest.c | 8 ++++ .../qemuxml2xmloutdata/aarch64-traditional-pci.xml | 43 ++++++++++++++++++= ++++ tests/qemuxml2xmltest.c | 8 ++++ 5 files changed, 104 insertions(+) create mode 100644 tests/qemuxml2argvdata/aarch64-traditional-pci.args create mode 100644 tests/qemuxml2argvdata/aarch64-traditional-pci.xml create mode 100644 tests/qemuxml2xmloutdata/aarch64-traditional-pci.xml diff --git a/tests/qemuxml2argvdata/aarch64-traditional-pci.args b/tests/qe= muxml2argvdata/aarch64-traditional-pci.args new file mode 100644 index 0000000000..f10252f729 --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-traditional-pci.args @@ -0,0 +1,26 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-aarch64 \ +-name guest \ +-S \ +-M virt \ +-m 1024 \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 496d7ea8-9739-544b-4ebd-ef08be936e8b \ +-nographic \ +-nodefconfig \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-guest/monitor.s= ock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ +-no-acpi \ +-boot c \ +-device i82801b11-bridge,id=3Dpci.1,bus=3Dpcie.0,addr=3D0x1 \ +-device pci-bridge,chassis_nr=3D2,id=3Dpci.2,bus=3Dpci.1,addr=3D0x0 \ +-device pcie-root-port,port=3D0x10,chassis=3D3,id=3Dpci.3,bus=3Dpcie.0,add= r=3D0x2 \ +-chardev pty,id=3Dcharserial0 \ +-device pci-serial,chardev=3Dcharserial0,id=3Dserial0,bus=3Dpci.2,addr=3D0= x1 diff --git a/tests/qemuxml2argvdata/aarch64-traditional-pci.xml b/tests/qem= uxml2argvdata/aarch64-traditional-pci.xml new file mode 100644 index 0000000000..8c87a27f6e --- /dev/null +++ b/tests/qemuxml2argvdata/aarch64-traditional-pci.xml @@ -0,0 +1,19 @@ + + guest + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1 + + hvm + + + /usr/bin/qemu-system-aarch64 + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 308d71f725..9a0d01e4f4 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2705,6 +2705,14 @@ mymain(void) QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_PCIE_ROOT_PORT); + DO_TEST("aarch64-traditional-pci", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_OBJECT_GPEX, + QEMU_CAPS_PCI_MULTIFUNCTION, + QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCI_SERIAL); =20 /* Make sure all combinations of ACPI and UEFI behave as expected */ DO_TEST("aarch64-acpi-uefi", NONE); diff --git a/tests/qemuxml2xmloutdata/aarch64-traditional-pci.xml b/tests/q= emuxml2xmloutdata/aarch64-traditional-pci.xml new file mode 100644 index 0000000000..70664aa4f9 --- /dev/null +++ b/tests/qemuxml2xmloutdata/aarch64-traditional-pci.xml @@ -0,0 +1,43 @@ + + guest + 496d7ea8-9739-544b-4ebd-ef08be936e8b + 1048576 + 1048576 + 1 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-aarch64 + + + +

+ + + + +
+ + + + +
+ + + + + +
+ + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 0f560290a0..49b61d7647 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1117,6 +1117,14 @@ mymain(void) QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, QEMU_CAPS_DEVICE_PCIE_ROOT_PORT); + DO_TEST("aarch64-traditional-pci", + QEMU_CAPS_NODEFCONFIG, + QEMU_CAPS_OBJECT_GPEX, + QEMU_CAPS_PCI_MULTIFUNCTION, + QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, + QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCI_SERIAL); DO_TEST("aarch64-video-default", QEMU_CAPS_NODEFCONFIG, QEMU_CAPS_OBJECT_GPEX, --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 01:46:16 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.zohomail.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 152224598684192.93449462741148; Wed, 28 Mar 2018 07:06:26 -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 89916C0586AE; Wed, 28 Mar 2018 14:06:25 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 63F58600D2; Wed, 28 Mar 2018 14:06:25 +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 271844CA9D; Wed, 28 Mar 2018 14:06:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SE6HQu027711 for ; Wed, 28 Mar 2018 10:06:17 -0400 Received: by smtp.corp.redhat.com (Postfix) id A2388215CDC7; Wed, 28 Mar 2018 14:06:17 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-126.brq.redhat.com [10.40.204.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E29A215CDC5 for ; Wed, 28 Mar 2018 14:06:16 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 28 Mar 2018 16:06:02 +0200 Message-Id: <20180328140610.8414-4-abologna@redhat.com> In-Reply-To: <20180328140610.8414-1-abologna@redhat.com> References: <20180328140610.8414-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 03/11] conf: Remove dubious code from virDomainPCIAddressSetGrow() 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.31]); Wed, 28 Mar 2018 14:06:25 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" I haven't been able to come up with a single scenario in which the code in question would be executed; even if there was one, it would be due to the user specifying a *partial* PCI topology in the guest XML, which is of course entirely unsupportable and thus providing even the slightest hint that doing so is in any way a good idea is actively harmful. Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- src/conf/domain_addr.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 0c914fe25c..18b6f8d588 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -447,15 +447,6 @@ virDomainPCIAddressSetGrow(virDomainPCIAddressSetPtr a= ddrs, addr->bus++; } } - } else if (flags & VIR_PCI_CONNECT_TYPE_PCI_BRIDGE && - addrs->buses[0].model =3D=3D VIR_DOMAIN_CONTROLLER_MODEL_PC= IE_ROOT) { - /* NB: if the root bus is pci-root, and we couldn't find an - * open place to connect a pci-bridge, then there is nothing - * we can do (since the only way to gain a new slot that - * accepts a pci-bridge is to add *a pci-bridge* (which is the - * reason we're here in the first place!) - */ - model =3D VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE; } else if (flags & (VIR_PCI_CONNECT_TYPE_PCIE_DEVICE | VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT)) { model =3D VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT; --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 01:46:16 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.zohomail.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 152224598527440.15167882847891; Wed, 28 Mar 2018 07:06:25 -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 ACF40C05B02B; Wed, 28 Mar 2018 14:06:23 +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 69FBB6A05F; Wed, 28 Mar 2018 14:06:23 +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 D927B181BA07; Wed, 28 Mar 2018 14:06:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SE6IUu027742 for ; Wed, 28 Mar 2018 10:06:18 -0400 Received: by smtp.corp.redhat.com (Postfix) id 93393215CDC7; Wed, 28 Mar 2018 14:06:18 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-126.brq.redhat.com [10.40.204.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 15250215CDC5 for ; Wed, 28 Mar 2018 14:06:17 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 28 Mar 2018 16:06:03 +0200 Message-Id: <20180328140610.8414-5-abologna@redhat.com> In-Reply-To: <20180328140610.8414-1-abologna@redhat.com> References: <20180328140610.8414-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 04/11] conf: Rename virDomainPCIAddressSet.areMultipleRootsSupported 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]); Wed, 28 Mar 2018 14:06:24 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We're going to add a similarly-named attribute later, and we'd like to be consistent. Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- src/conf/domain_addr.c | 2 +- src/conf/domain_addr.h | 2 +- src/qemu/qemu_domain_address.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index 18b6f8d588..e02d7ac614 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -413,7 +413,7 @@ virDomainPCIAddressSetGrow(virDomainPCIAddressSetPtr ad= drs, */ =20 if (flags & VIR_PCI_CONNECT_TYPE_PCI_DEVICE) { - if (addrs->multipleRootsSupported) { + if (addrs->areMultipleRootsSupported) { /* Use a pci-root controller to expand the guest's PCI * topology if it supports having more than one */ model =3D VIR_DOMAIN_CONTROLLER_MODEL_PCI_ROOT; diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index d3541bab09..87986c2bb7 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -115,7 +115,7 @@ struct _virDomainPCIAddressSet { bool dryRun; /* on a dry run, new buses are auto-added and addresses aren't saved in device infos */ /* If true, the guest can have multiple pci-root controllers */ - bool multipleRootsSupported; + bool areMultipleRootsSupported; }; typedef struct _virDomainPCIAddressSet virDomainPCIAddressSet; typedef virDomainPCIAddressSet *virDomainPCIAddressSetPtr; diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 37473ebf13..40fb540adc 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1353,7 +1353,7 @@ qemuDomainPCIAddressSetCreate(virDomainDefPtr def, =20 /* pSeries domains support multiple pci-root controllers */ if (qemuDomainIsPSeries(def)) - addrs->multipleRootsSupported =3D true; + addrs->areMultipleRootsSupported =3D true; =20 for (i =3D 0; i < def->ncontrollers; i++) { virDomainControllerDefPtr cont =3D def->controllers[i]; --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 01:46:16 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.zohomail.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 1522245990215153.15795076861014; Wed, 28 Mar 2018 07:06:30 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 72D8AC01F29E; Wed, 28 Mar 2018 14:06:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 44E8F5D70A; Wed, 28 Mar 2018 14:06:28 +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 0E4524CAA2; Wed, 28 Mar 2018 14:06:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SE6Jot027855 for ; Wed, 28 Mar 2018 10:06:19 -0400 Received: by smtp.corp.redhat.com (Postfix) id 847A5215CDC7; Wed, 28 Mar 2018 14:06:19 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-126.brq.redhat.com [10.40.204.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E2790215CDC5 for ; Wed, 28 Mar 2018 14:06:18 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 28 Mar 2018 16:06:04 +0200 Message-Id: <20180328140610.8414-6-abologna@redhat.com> In-Reply-To: <20180328140610.8414-1-abologna@redhat.com> References: <20180328140610.8414-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 05/11] qemu: Add QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 28 Mar 2018 14:06:29 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This capability will be set when the pcie-pci-bridge device is available in the QEMU binary. Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml | 1 + 4 files changed, 5 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index e54dde69ab..840f520370 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -466,6 +466,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST, /* 285 */ "virtio-mouse-ccw", "virtio-tablet-ccw", + "pcie-pci-bridge", ); =20 =20 @@ -1705,6 +1706,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[= ] =3D { { "virtio-keyboard-ccw", QEMU_CAPS_DEVICE_VIRTIO_KEYBOARD_CCW }, { "virtio-mouse-ccw", QEMU_CAPS_DEVICE_VIRTIO_MOUSE_CCW }, { "virtio-tablet-ccw", QEMU_CAPS_DEVICE_VIRTIO_TABLET_CCW }, + { "pcie-pci-bridge", QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE }, }; =20 static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBalloon[]= =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 3f3c29f8fb..50f359857c 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -450,6 +450,7 @@ typedef enum { /* 285 */ QEMU_CAPS_DEVICE_VIRTIO_MOUSE_CCW, /* -device virtio-mouse-ccw */ QEMU_CAPS_DEVICE_VIRTIO_TABLET_CCW, /* -device virtio-tablet-ccw */ + QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, /* -device pcie-pci-bridge */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml b/tests/qem= ucapabilitiesdata/caps_2.12.0.aarch64.xml index ff48293656..5a42f951dc 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.aarch64.xml @@ -187,6 +187,7 @@ + 2011090 0 342346 diff --git a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml b/tests/qemu= capabilitiesdata/caps_2.12.0.x86_64.xml index 334296e213..800b250f3f 100644 --- a/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_2.12.0.x86_64.xml @@ -225,6 +225,7 @@ + 2011090 0 390060 --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 01:46:16 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.zohomail.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 1522245994439857.3309913135045; Wed, 28 Mar 2018 07:06:34 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C9E217EBAA; Wed, 28 Mar 2018 14:06:32 +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 A39745D759; Wed, 28 Mar 2018 14:06: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 61420180BAD9; Wed, 28 Mar 2018 14:06:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SE6KRx027916 for ; Wed, 28 Mar 2018 10:06:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id C2669215CDC7; Wed, 28 Mar 2018 14:06:20 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-126.brq.redhat.com [10.40.204.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E97D6215CDC5 for ; Wed, 28 Mar 2018 14:06:19 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 28 Mar 2018 16:06:05 +0200 Message-Id: <20180328140610.8414-7-abologna@redhat.com> In-Reply-To: <20180328140610.8414-1-abologna@redhat.com> References: <20180328140610.8414-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 06/11] qemu: Implement pcie-to-pci-bridge controller 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 28 Mar 2018 14:06:33 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The new controller will not yet be used automatically by libvirt, but at this point it's already possible to configure a guest to use it. Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- docs/formatdomain.html.in | 3 ++- docs/schemas/domaincommon.rng | 3 +++ src/conf/domain_addr.c | 25 ++++++++++++++++++++----- src/conf/domain_addr.h | 4 +++- src/conf/domain_conf.c | 3 +++ src/conf/domain_conf.h | 2 ++ src/qemu/qemu_command.c | 1 + src/qemu/qemu_domain.c | 17 +++++++++++++++++ src/qemu/qemu_domain_address.c | 4 ++++ 9 files changed, 55 insertions(+), 7 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 299d7b9d42..fa5a0fff8a 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -3942,7 +3942,8 @@ pcie-root-port, pcie-switch-upstream-port = and pcie-switch-downstream-port (since 1.2.19), pci-expander-bus and - pcie-expander-bus (since 1.3.4). + pcie-expander-bus (since 1.3.4), + pcie-to-pci-bridge (since 4.3.0). The root controllers (pci-root and pcie-root) have an optional pcihole64 element specifying how big (in diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 8165e699d6..85ba95d5f6 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -2102,6 +2102,8 @@ pci-bridge i82801b11-bridge + + pcie-pci-bridge ioh3420 pcie-root-port @@ -2172,6 +2174,7 @@ pci-bridge dmi-to-pci-bridge + pcie-to-pci-bridge pcie-root-port pcie-switch-upstream-port pcie-switch-downstream-port diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index e02d7ac614..b0709f8295 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -62,6 +62,9 @@ virDomainPCIControllerModelToConnectType(virDomainControl= lerModelPCI model) case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE: return VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE; =20 + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: + return VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE; + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT: return VIR_PCI_CONNECT_TYPE_PCIE_ROOT_PORT | VIR_PCI_CONNECT_AGGRE= GATE_SLOT; =20 @@ -160,6 +163,8 @@ virDomainPCIAddressFlagsCompatible(virPCIDeviceAddressP= tr addr, connectStr =3D "pci-switch-downstream-port"; } else if (devFlags & VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE) { connectStr =3D "dmi-to-pci-bridge"; + } else if (devFlags & VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE) { + connectStr =3D "pcie-to-pci-bridge"; } else if (devFlags & VIR_PCI_CONNECT_TYPE_PCI_EXPANDER_BUS) { connectStr =3D "pci-expander-bus"; } else if (devFlags & VIR_PCI_CONNECT_TYPE_PCIE_EXPANDER_BUS) { @@ -316,14 +321,24 @@ virDomainPCIAddressBusSetModel(virDomainPCIAddressBus= Ptr bus, bus->minSlot =3D 0; bus->maxSlot =3D VIR_PCI_ADDRESS_SLOT_LAST; break; + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: + /* Same as pci-bridge: 32 hotpluggable traditional PCI slots (0-31= ), + * the first of which is not usable because of the SHPC */ + bus->flags =3D (VIR_PCI_CONNECT_HOTPLUGGABLE | + VIR_PCI_CONNECT_TYPE_PCI_DEVICE | + VIR_PCI_CONNECT_TYPE_PCI_BRIDGE); + bus->minSlot =3D 1; + bus->maxSlot =3D VIR_PCI_ADDRESS_SLOT_LAST; + break; case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: /* provides one slot which is pcie, can be used by endpoint - * devices and pcie-switch-upstream-ports, and is hotpluggable - */ - bus->flags =3D VIR_PCI_CONNECT_TYPE_PCIE_DEVICE - | VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT - | VIR_PCI_CONNECT_HOTPLUGGABLE; + * devices, pcie-switch-upstream-ports or pcie-to-pci-bridges, + * and is hotpluggable */ + bus->flags =3D (VIR_PCI_CONNECT_HOTPLUGGABLE | + VIR_PCI_CONNECT_TYPE_PCIE_DEVICE | + VIR_PCI_CONNECT_TYPE_PCIE_SWITCH_UPSTREAM_PORT | + VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE); bus->minSlot =3D 0; bus->maxSlot =3D 0; break; diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index 87986c2bb7..87248a4fb8 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -49,6 +49,7 @@ typedef enum { VIR_PCI_CONNECT_TYPE_PCI_EXPANDER_BUS =3D 1 << 8, VIR_PCI_CONNECT_TYPE_PCIE_EXPANDER_BUS =3D 1 << 9, VIR_PCI_CONNECT_TYPE_PCI_BRIDGE =3D 1 << 10, + VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE =3D 1 << 11, } virDomainPCIConnectFlags; =20 /* a combination of all bits that describe the type of connections @@ -62,7 +63,8 @@ typedef enum { VIR_PCI_CONNECT_TYPE_DMI_TO_PCI_BRIDGE | \ VIR_PCI_CONNECT_TYPE_PCI_EXPANDER_BUS | \ VIR_PCI_CONNECT_TYPE_PCIE_EXPANDER_BUS | \ - VIR_PCI_CONNECT_TYPE_PCI_BRIDGE) + VIR_PCI_CONNECT_TYPE_PCI_BRIDGE | \ + VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE) =20 /* combination of all bits that could be used to connect a normal * endpoint device (i.e. excluding the connection possible between an diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index ae7c0d9b71..5a55d16d59 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -335,6 +335,7 @@ VIR_ENUM_IMPL(virDomainControllerModelPCI, VIR_DOMAIN_C= ONTROLLER_MODEL_PCI_LAST, "pcie-root", "pci-bridge", "dmi-to-pci-bridge", + "pcie-to-pci-bridge", "pcie-root-port", "pcie-switch-upstream-port", "pcie-switch-downstream-port", @@ -353,6 +354,7 @@ VIR_ENUM_IMPL(virDomainControllerPCIModelName, "pxb-pcie", "pcie-root-port", "spapr-pci-host-bridge", + "pcie-pci-bridge", ); =20 VIR_ENUM_IMPL(virDomainControllerModelSCSI, VIR_DOMAIN_CONTROLLER_MODEL_SC= SI_LAST, @@ -10188,6 +10190,7 @@ virDomainControllerDefParseXML(virDomainXMLOptionPt= r xmlopt, } case VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE: case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 61379e50fe..b2d2641b05 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -690,6 +690,7 @@ typedef enum { VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT, VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE, VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE, + VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE, VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT, VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT, VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT, @@ -710,6 +711,7 @@ typedef enum { VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PXB_PCIE, VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_ROOT_PORT, VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_SPAPR_PCI_HOST_BRIDGE, + VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_PCI_BRIDGE, =20 VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST } virDomainControllerPCIModelName; diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 89fd08b642..f1cf1cba5c 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -2800,6 +2800,7 @@ qemuBuildControllerDevStr(const virDomainDef *domainD= ef, break; case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: virBufferAsprintf(&buf, "%s,id=3D%s", modelName, def->info.ali= as); break; case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT: diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 580e0f830d..d96475b5c9 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -4355,6 +4355,8 @@ virDomainControllerPCIModelNameToQEMUCaps(int modelNa= me) return QEMU_CAPS_DEVICE_PCIE_ROOT_PORT; case VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_SPAPR_PCI_HOST_BRIDGE: return QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE; + case VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_PCI_BRIDGE: + return QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE; case VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE: return 0; case VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_LAST: @@ -4412,6 +4414,7 @@ qemuDomainDeviceDefValidateControllerPCI(const virDom= ainControllerDef *cont, case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: /* modelName should have been set automatically */ if (pciopts->modelName =3D=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME= _NONE) { virReportControllerMissingOption(cont, model, modelName, "mode= lName"); @@ -4516,6 +4519,13 @@ qemuDomainDeviceDefValidateControllerPCI(const virDo= mainControllerDef *cont, } break; =20 + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: + if (pciopts->modelName !=3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_P= CIE_PCI_BRIDGE) { + virReportControllerInvalidValue(cont, model, modelName, "model= Name"); + return -1; + } + break; + case VIR_DOMAIN_CONTROLLER_MODEL_PCI_DEFAULT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_LAST: default: @@ -4532,6 +4542,7 @@ qemuDomainDeviceDefValidateControllerPCI(const virDom= ainControllerDef *cont, case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: if (cont->idx =3D=3D 0) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("Index for '%s' controllers must be > 0"), @@ -4593,6 +4604,7 @@ qemuDomainDeviceDefValidateControllerPCI(const virDom= ainControllerDef *cont, case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: if (pciopts->targetIndex !=3D -1) { virReportControllerInvalidOption(cont, model, modelName, "targ= etIndex"); return -1; @@ -4626,6 +4638,7 @@ qemuDomainDeviceDefValidateControllerPCI(const virDom= ainControllerDef *cont, case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: if (pciopts->pcihole64 || pciopts->pcihole64size !=3D 0) { virReportControllerInvalidOption(cont, model, modelName, "pcih= ole64"); @@ -4657,6 +4670,7 @@ qemuDomainDeviceDefValidateControllerPCI(const virDom= ainControllerDef *cont, case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: if (pciopts->busNr !=3D -1) { virReportControllerInvalidOption(cont, model, modelName, "busN= r"); return -1; @@ -4701,6 +4715,7 @@ qemuDomainDeviceDefValidateControllerPCI(const virDom= ainControllerDef *cont, case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_DOWNSTREAM_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: if (pciopts->numaNode !=3D -1) { virReportControllerInvalidOption(cont, model, modelName, "numa= Node"); return -1; @@ -4731,6 +4746,7 @@ qemuDomainDeviceDefValidateControllerPCI(const virDom= ainControllerDef *cont, case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: if (pciopts->chassisNr !=3D -1) { virReportControllerInvalidOption(cont, model, modelName, "chas= sisNr"); return -1; @@ -4765,6 +4781,7 @@ qemuDomainDeviceDefValidateControllerPCI(const virDom= ainControllerDef *cont, case VIR_DOMAIN_CONTROLLER_MODEL_PCI_EXPANDER_BUS: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_EXPANDER_BUS: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: if (pciopts->chassis !=3D -1) { virReportControllerInvalidOption(cont, model, modelName, "chas= sis"); return -1; diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 40fb540adc..86d9807908 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -2171,6 +2171,9 @@ qemuDomainPCIControllerSetDefaultModelName(virDomainC= ontrollerDefPtr cont, case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE: *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_I82801B11_BRID= GE; break; + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: + *modelName =3D VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_PCIE_PCI_BRIDG= E; + break; case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT_PORT: /* Use generic PCIe Root Ports if available, falling back to * ioh3420 otherwise */ @@ -2582,6 +2585,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def, } break; case VIR_DOMAIN_CONTROLLER_MODEL_DMI_TO_PCI_BRIDGE: + case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_TO_PCI_BRIDGE: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_SWITCH_UPSTREAM_PORT: case VIR_DOMAIN_CONTROLLER_MODEL_PCIE_ROOT: case VIR_DOMAIN_CONTROLLER_MODEL_PCI_DEFAULT: --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 01:46:16 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.zohomail.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 1522245993267434.93072138984644; Wed, 28 Mar 2018 07:06:33 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A13708047B; Wed, 28 Mar 2018 14:06:31 +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 5FF1E5D70A; Wed, 28 Mar 2018 14:06:31 +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 08D82180BAD5; Wed, 28 Mar 2018 14:06:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SE6L82027949 for ; Wed, 28 Mar 2018 10:06:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id B3AEE215CDC7; Wed, 28 Mar 2018 14:06:21 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-126.brq.redhat.com [10.40.204.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 33521215CDC5 for ; Wed, 28 Mar 2018 14:06:20 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 28 Mar 2018 16:06:06 +0200 Message-Id: <20180328140610.8414-8-abologna@redhat.com> In-Reply-To: <20180328140610.8414-1-abologna@redhat.com> References: <20180328140610.8414-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 07/11] conf: Add virDomainPCIAddressSet.isPCIeToPCIBridgeSupported 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Wed, 28 Mar 2018 14:06:32 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Just like the existing areMultipleRootsSupported, this will allow us to change the results of the driver-agnostic PCI address allocation logic based on whether the QEMU binary supports certain features. Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- src/conf/domain_addr.h | 2 ++ src/qemu/qemu_domain_address.c | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/conf/domain_addr.h b/src/conf/domain_addr.h index 87248a4fb8..3236b7d6de 100644 --- a/src/conf/domain_addr.h +++ b/src/conf/domain_addr.h @@ -118,6 +118,8 @@ struct _virDomainPCIAddressSet { and addresses aren't saved in device infos */ /* If true, the guest can have multiple pci-root controllers */ bool areMultipleRootsSupported; + /* If true, the guest can use the pcie-to-pci-bridge controller */ + bool isPCIeToPCIBridgeSupported; }; typedef struct _virDomainPCIAddressSet virDomainPCIAddressSet; typedef virDomainPCIAddressSet *virDomainPCIAddressSetPtr; diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c index 86d9807908..7fe9d5926c 100644 --- a/src/qemu/qemu_domain_address.c +++ b/src/qemu/qemu_domain_address.c @@ -1338,6 +1338,7 @@ qemuDomainCollectPCIAddress(virDomainDefPtr def ATTRI= BUTE_UNUSED, =20 static virDomainPCIAddressSetPtr qemuDomainPCIAddressSetCreate(virDomainDefPtr def, + virQEMUCapsPtr qemuCaps, unsigned int nbuses, bool dryRun) { @@ -1355,6 +1356,9 @@ qemuDomainPCIAddressSetCreate(virDomainDefPtr def, if (qemuDomainIsPSeries(def)) addrs->areMultipleRootsSupported =3D true; =20 + if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE)) + addrs->isPCIeToPCIBridgeSupported =3D true; + for (i =3D 0; i < def->ncontrollers; i++) { virDomainControllerDefPtr cont =3D def->controllers[i]; size_t idx =3D cont->idx; @@ -2361,7 +2365,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def, =20 if (nbuses > 0) { /* 1st pass to figure out how many PCI bridges we need */ - if (!(addrs =3D qemuDomainPCIAddressSetCreate(def, nbuses, true))) + if (!(addrs =3D qemuDomainPCIAddressSetCreate(def, qemuCaps, nbuse= s, true))) goto cleanup; =20 if (qemuDomainValidateDevicePCISlotsChipsets(def, qemuCaps, @@ -2491,7 +2495,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def, addrs =3D NULL; } =20 - if (!(addrs =3D qemuDomainPCIAddressSetCreate(def, nbuses, false))) + if (!(addrs =3D qemuDomainPCIAddressSetCreate(def, qemuCaps, nbuses, f= alse))) goto cleanup; =20 if (qemuDomainSupportsPCI(def, qemuCaps)) { --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 01:46:16 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.zohomail.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 1522245996427874.393961702078; Wed, 28 Mar 2018 07:06:36 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 05C5EC05E753; Wed, 28 Mar 2018 14:06:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D15AE5D76A; Wed, 28 Mar 2018 14:06:34 +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 A05124CAA6; Wed, 28 Mar 2018 14:06:34 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SE6Mis028093 for ; Wed, 28 Mar 2018 10:06:22 -0400 Received: by smtp.corp.redhat.com (Postfix) id A53C1215CDC7; Wed, 28 Mar 2018 14:06:22 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-126.brq.redhat.com [10.40.204.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 24A53215CDC5 for ; Wed, 28 Mar 2018 14:06:21 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 28 Mar 2018 16:06:07 +0200 Message-Id: <20180328140610.8414-9-abologna@redhat.com> In-Reply-To: <20180328140610.8414-1-abologna@redhat.com> References: <20180328140610.8414-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 08/11] conf: Prefer pcie-to-pci-bridge to dmi-to-pci-bridge 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 28 Mar 2018 14:06:35 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Both pcie-to-pci-bridge and dmi-to-pci-bridge can be used to create a traditional PCI topology in a pure PCIe guest such as those using the x86_64/q35 or aarch64/virt machine type; however, the former should be preferred, as it doesn't need to obey limitation of real hardware and is completely architecture-agnostic. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1520821 Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- src/conf/domain_addr.c | 59 +++++++++++++++++++++++++++++++++++++++++-----= ---- 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/src/conf/domain_addr.c b/src/conf/domain_addr.c index b0709f8295..8964973e03 100644 --- a/src/conf/domain_addr.c +++ b/src/conf/domain_addr.c @@ -416,6 +416,7 @@ virDomainPCIAddressSetGrow(virDomainPCIAddressSetPtr ad= drs, size_t i; int model; bool needDMIToPCIBridge =3D false; + bool needPCIeToPCIBridge =3D false; =20 add =3D addr->bus - addrs->nbuses + 1; if (add <=3D 0) @@ -436,27 +437,41 @@ virDomainPCIAddressSetGrow(virDomainPCIAddressSetPtr = addrs, model =3D VIR_DOMAIN_CONTROLLER_MODEL_PCI_BRIDGE; =20 /* if there aren't yet any buses that will accept a - * pci-bridge, and the caller is asking for one, we'll need to - * add a dmi-to-pci-bridge first. + * pci-bridge, but we need one for the device's PCI address + * to make sense, it means the guest only has a PCIe topology + * configured so far, and we need to create a traditional PCI + * topology to accomodate the new device. */ needDMIToPCIBridge =3D true; + needPCIeToPCIBridge =3D true; for (i =3D 0; i < addrs->nbuses; i++) { if (addrs->buses[i].flags & VIR_PCI_CONNECT_TYPE_PCI_BRIDG= E) { needDMIToPCIBridge =3D false; + needPCIeToPCIBridge =3D false; break; } } - if (needDMIToPCIBridge && add =3D=3D 1) { + + /* Prefer pcie-to-pci-bridge, fall back to dmi-to-pci-bridge */ + if (addrs->isPCIeToPCIBridgeSupported) + needDMIToPCIBridge =3D false; + else + needPCIeToPCIBridge =3D false; + + if ((needDMIToPCIBridge || needPCIeToPCIBridge) && add =3D=3D = 1) { /* We need to add a single pci-bridge to provide the bus * our legacy PCI device will be plugged into; however, we * have also determined that there isn't yet any proper - * place to connect that pci-bridge we're about to add (on - * a system with pcie-root, that "proper place" would be a - * dmi-to-pci-bridge". So, to give the pci-bridge a place - * to connect, we increase the count of buses to add, - * while also incrementing the bus number in the address - * for the device (since the pci-bridge will now be at an - * index 1 higher than the caller had anticipated). + * place to connect that pci-bridge we're about to add, + * which means we're dealing with a pure PCIe guest. We + * need to create a traditional PCI topology, and for that + * we have two options: dmi-to-pci-bridge + pci-bridge or + * pcie-root-port + pcie-to-pci-bridge (the latter of which + * is pretty much a pci-bridge as far as devices attached + * to it are concerned and as such makes the pci-bridge + * unnecessary). Either way, there's going to be one more + * controller than initially expected, and the 'bus' part + * of the device's address will need to be bumped. */ add++; addr->bus++; @@ -525,6 +540,30 @@ virDomainPCIAddressSetGrow(virDomainPCIAddressSetPtr a= ddrs, } } =20 + if (needPCIeToPCIBridge) { + /* We need a pcie-root-port to plug pcie-to-pci-bridge into; howev= er, + * qemuDomainAssignPCIAddresses() will, in some cases, create a du= mmy + * PCIe device and reserve an address for it in order to leave the + * user with an empty pcie-root-port ready for hotplugging, and if + * we didn't do anything other than adding the pcie-root-port here + * it would be used for that, which we don't want. So we change the + * connect flags to make sure only the pcie-to-pci-bridge will be + * connected to the pcie-root-port we just added, and another one + * will be allocated for the dummy PCIe device later on. + */ + if (virDomainPCIAddressBusSetModel(&addrs->buses[i], + VIR_DOMAIN_CONTROLLER_MODEL_PCI= E_ROOT_PORT) < 0) { + return -1; + } + addrs->buses[i].flags =3D VIR_PCI_CONNECT_TYPE_PCIE_TO_PCI_BRIDGE; + i++; + + if (virDomainPCIAddressBusSetModel(&addrs->buses[i++], + VIR_DOMAIN_CONTROLLER_MODEL_PCI= E_TO_PCI_BRIDGE) < 0) { + return -1; + } + } + for (; i < addrs->nbuses; i++) { if (virDomainPCIAddressBusSetModel(&addrs->buses[i], model) < 0) return -1; --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 01:46:16 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.zohomail.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 1522245990973189.70447636553877; Wed, 28 Mar 2018 07:06:30 -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 AB3502F30B1; Wed, 28 Mar 2018 14:06:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8551B600C2; Wed, 28 Mar 2018 14:06: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 414114CAA3; Wed, 28 Mar 2018 14:06:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SE6NjR028116 for ; Wed, 28 Mar 2018 10:06:23 -0400 Received: by smtp.corp.redhat.com (Postfix) id B009A215CDC7; Wed, 28 Mar 2018 14:06:23 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-126.brq.redhat.com [10.40.204.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 162B2215CDC5 for ; Wed, 28 Mar 2018 14:06:22 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 28 Mar 2018 16:06:08 +0200 Message-Id: <20180328140610.8414-10-abologna@redhat.com> In-Reply-To: <20180328140610.8414-1-abologna@redhat.com> References: <20180328140610.8414-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 09/11] tests: Use pcie-to-pci-bridge for aarch64-traditional-pci 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.29]); Wed, 28 Mar 2018 14:06:30 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Now that support for the pcie-to-pci-bridge controller has been implemented, adding the QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE capability to the existing test is enough to cause the guest to use pcie-to-pci-bridge instead of dmi-to-pci-bridge. Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- tests/qemuxml2argvdata/aarch64-traditional-pci.args | 7 ++++--- tests/qemuxml2argvtest.c | 1 + tests/qemuxml2xmloutdata/aarch64-traditional-pci.xml | 16 ++++++++-------- tests/qemuxml2xmltest.c | 1 + 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/tests/qemuxml2argvdata/aarch64-traditional-pci.args b/tests/qe= muxml2argvdata/aarch64-traditional-pci.args index f10252f729..7ddd03e9e1 100644 --- a/tests/qemuxml2argvdata/aarch64-traditional-pci.args +++ b/tests/qemuxml2argvdata/aarch64-traditional-pci.args @@ -19,8 +19,9 @@ server,nowait \ -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ -no-acpi \ -boot c \ --device i82801b11-bridge,id=3Dpci.1,bus=3Dpcie.0,addr=3D0x1 \ --device pci-bridge,chassis_nr=3D2,id=3Dpci.2,bus=3Dpci.1,addr=3D0x0 \ --device pcie-root-port,port=3D0x10,chassis=3D3,id=3Dpci.3,bus=3Dpcie.0,add= r=3D0x2 \ +-device pcie-root-port,port=3D0x8,chassis=3D1,id=3Dpci.1,bus=3Dpcie.0,mult= ifunction=3Don,\ +addr=3D0x1 \ +-device pcie-pci-bridge,id=3Dpci.2,bus=3Dpci.1,addr=3D0x0 \ +-device pcie-root-port,port=3D0x9,chassis=3D3,id=3Dpci.3,bus=3Dpcie.0,addr= =3D0x1.0x1 \ -chardev pty,id=3Dcharserial0 \ -device pci-serial,chardev=3Dcharserial0,id=3Dserial0,bus=3Dpci.2,addr=3D0= x1 diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 9a0d01e4f4..94b82d82d3 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2711,6 +2711,7 @@ mymain(void) QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PCI_SERIAL); =20 diff --git a/tests/qemuxml2xmloutdata/aarch64-traditional-pci.xml b/tests/q= emuxml2xmloutdata/aarch64-traditional-pci.xml index 70664aa4f9..e0807308d9 100644 --- a/tests/qemuxml2xmloutdata/aarch64-traditional-pci.xml +++ b/tests/qemuxml2xmloutdata/aarch64-traditional-pci.xml @@ -18,19 +18,19 @@ /usr/bin/qemu-system-aarch64 - - -
+ + + +
- - - + +
- -
+ +
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 49b61d7647..3880c1d122 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -1123,6 +1123,7 @@ mymain(void) QEMU_CAPS_PCI_MULTIFUNCTION, QEMU_CAPS_DEVICE_PCIE_ROOT_PORT, QEMU_CAPS_DEVICE_DMI_TO_PCI_BRIDGE, + QEMU_CAPS_DEVICE_PCIE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PCI_BRIDGE, QEMU_CAPS_DEVICE_PCI_SERIAL); DO_TEST("aarch64-video-default", --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 01:46:16 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.zohomail.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 1522245997210215.78001305665555; Wed, 28 Mar 2018 07:06:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0F1927E9E2; Wed, 28 Mar 2018 14:06:36 +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 D8F565D793; Wed, 28 Mar 2018 14:06:35 +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 9CC08180BAE9; Wed, 28 Mar 2018 14:06:35 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SE6OPP028128 for ; Wed, 28 Mar 2018 10:06:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id BB1C5215CDC7; Wed, 28 Mar 2018 14:06:24 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-126.brq.redhat.com [10.40.204.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 20E35215CDC5 for ; Wed, 28 Mar 2018 14:06:23 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 28 Mar 2018 16:06:09 +0200 Message-Id: <20180328140610.8414-11-abologna@redhat.com> In-Reply-To: <20180328140610.8414-1-abologna@redhat.com> References: <20180328140610.8414-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 10/11] news: Add 4.3.0 release 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 28 Mar 2018 14:06:36 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani --- docs/news.xml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 1088895746..20524bf537 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -33,6 +33,14 @@ --> =20 + +
+
+
+
+
+
+
--=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 01:46:16 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.zohomail.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 1522245995175424.70233357217114; Wed, 28 Mar 2018 07:06:35 -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 0A4C37EBAD; Wed, 28 Mar 2018 14:06:33 +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 C36C118254; Wed, 28 Mar 2018 14:06: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 86131180BADA; Wed, 28 Mar 2018 14:06:32 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w2SE6PM2028137 for ; Wed, 28 Mar 2018 10:06:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id C60A2215CDC7; Wed, 28 Mar 2018 14:06:25 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-126.brq.redhat.com [10.40.204.126]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2BBF9215CDC5 for ; Wed, 28 Mar 2018 14:06:24 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 28 Mar 2018 16:06:10 +0200 Message-Id: <20180328140610.8414-12-abologna@redhat.com> In-Reply-To: <20180328140610.8414-1-abologna@redhat.com> References: <20180328140610.8414-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 11/11] news: Update for pcie-to-pci-bridge support 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.27]); Wed, 28 Mar 2018 14:06:33 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- docs/news.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index 20524bf537..f8b4584f70 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -35,6 +35,15 @@
+ + + qemu: Add support for the pcie-to-pci-bridge controller + + + Pure PCIe guests such as x86_64/q35 and aarch64/virt will now + add this controller when traditional PCI devices are in use. + +
--=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list