From nobody Sat May 4 16:03:01 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 1502972667906785.729408167365; Thu, 17 Aug 2017 05:24:27 -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 0AB2BAC92; Thu, 17 Aug 2017 12:24:26 +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 3D04888D7B; Thu, 17 Aug 2017 12:24: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 419711806106; Thu, 17 Aug 2017 12:24:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v7HCOLHi000815 for ; Thu, 17 Aug 2017 08:24:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id A74307DFFA; Thu, 17 Aug 2017 12:24:21 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-132.brq.redhat.com [10.40.204.132]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 75DA862499; Thu, 17 Aug 2017 12:24:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0AB2BAC92 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 17 Aug 2017 14:24:14 +0200 Message-Id: <20170817122414.25231-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: laine@laine.org Subject: [libvirt] [PATCH] docs: Improve PCI topology and hotplug guidelines 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.27]); Thu, 17 Aug 2017 12:24:26 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Address some minor flaws in the original document that were pointed out during review. Signed-off-by: Andrea Bolognani --- docs/pci-hotplug.html.in | 46 ++++++++++++++++++++++++++++++++------------= -- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/docs/pci-hotplug.html.in b/docs/pci-hotplug.html.in index 809e36f5d..a90d47bc3 100644 --- a/docs/pci-hotplug.html.in +++ b/docs/pci-hotplug.html.in @@ -13,10 +13,12 @@

The reason for this apparent limitation is the fact that each hotplugged PCI device might require additional PCI controllers to - be added to the guest, and libvirt has no way of knowing in advance - how many devices will be hotplugged during the guest's lifetime, - thus making it impossible to automatically provide the right amount - of PCI controllers: any arbitrary number would end up being too big + be added to the guest. Since most PCI controllers can't be + hotplugged, they need to be added before the guest is started; + however, libvirt has no way of knowing in advance how many devices + will be hotplugged during the guest's lifetime, thus making it + impossible to automatically provide the right amount of PCI + controllers: any arbitrary number would end up being too big for some users, and too small for others.

@@ -53,6 +55,14 @@ emulated or assigned from the host.

+ If you have a very specialized use case, such as the appliances + used by libguestfs behind + the scenes to access disk images, and this automatically-added + pcie-root-port controller ends up being a nuisance, + you can prevent libvirt from adding it by manually managing PCI + controllers and addresses according to you needs. +

+

Slots on the pcie-root controller do not support hotplug, so the device will be hotplugged into the pcie-root-port controller. If you plan to hotplug @@ -73,6 +83,12 @@ remaining details automatically.

+ Note that if you're adding PCI controllers to a guest at the + same time you're also adding PCI devices, some of the + controllers will be used for the newly-added devices and won't + be available for hotplug once the guest has been started. +

+

If you expect to hotplug legacy PCI devices, then you will need specialized controllers, since all those mentioned above are intended for PCI Express devices only: add @@ -84,7 +100,8 @@ =20

and you'll be able to hotplug up to 31 legacy PCI devices, - either emulated or assigned from the host. + either emulated or assigned from the host, in the slots + from 0x01 to 0x1f of the pci-bridge controller.

=20

i440fx (pc) machine type

@@ -98,9 +115,10 @@ <controller type=3D'pci' index=3D'0' model=3D'pci-root'/> =20

- where each of the 31 slots on the pci-root - controller is hotplug capable and can accept a legacy PCI - device, either emulated or assigned from the guest. + where each of the 31 slots (from 0x01 to 0x1f) on the + pci-root controller is hotplug capable and + can accept a legacy PCI device, either emulated or + assigned from the guest.

=20

ppc64 architecture

@@ -119,12 +137,12 @@ </controller> =20

- The 31 slots on a pci-root controller are all - hotplug capable and, despite the name suggesting otherwise, - starting with QEMU 2.9 all of them can accept PCI Express - devices in addition to legacy PCI devices; however, - libvirt will only place emulated devices on the default - pci-root controller. + The 31 slots, from 0x01 to 0x1f, on a pci-root + controller are all hotplug capable and, despite the name + suggesting otherwise, starting with QEMU 2.9 all of them + can accept PCI Express devices in addition to legacy PCI + devices; however, libvirt will only place emulated devices + on the default pci-root controller.

In order to take advantage of improved error reporting and --=20 2.13.5 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list