From nobody Wed May 14 19:56:01 2025 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