From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55184) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ynzjm-0003MX-Qn for qemu-devel@nongnu.org; Thu, 30 Apr 2015 21:27:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ynzjj-0006hN-JR for qemu-devel@nongnu.org; Thu, 30 Apr 2015 21:27:30 -0400 Received: from e18.ny.us.ibm.com ([129.33.205.208]:56938) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ynzjj-0006hA-G0 for qemu-devel@nongnu.org; Thu, 30 Apr 2015 21:27:27 -0400 Received: from /spool/local by e18.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 30 Apr 2015 21:27:27 -0400 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Michael Roth In-Reply-To: <554237D6.6000401@redhat.com> References: <1430335224-6716-1-git-send-email-mdroth@linux.vnet.ibm.com> <554237D6.6000401@redhat.com> Message-ID: <20150501012720.25451.48397@loki> Date: Thu, 30 Apr 2015 20:27:20 -0500 Subject: Re: [Qemu-devel] [RFC PATCH 00/15] spapr: add support for PHB hotplug List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: aik@ozlabs.ru, nfont@linux.vnet.ibm.com, david@gibson.dropbear.id.au, qemu-ppc@nongnu.org, bharata@linux.vnet.ibm.com Quoting Paolo Bonzini (2015-04-30 09:10:30) > = > = > On 29/04/2015 21:20, Michael Roth wrote: > > These patches are based on latest spapr-hotplug-pci patches, and > > can also be obtained from: > > = > > https://github.com/mdroth/qemu/commits/spapr-hotplug-phb > > = > > These patches implement support for hotplug/unplug of PCI host-bridges. > > The main use cases are: > > = > > - allowing for VFIO PCI hotplug for host kernels that still require a > > 1:1 mapping between guest PHB/TCE table and an iommu group (a > > requirement that will be relaxed with Alexey Kardashevskiy's VFIO > > rework for DDW support) > > - allocating new PHBs/TCE tables for hotplugging/distributing VFIO > > devices that have different NUMA affinities associated with them > > for performance reason > > - expanding hotplug capacity for passthrough/emulated PCI devices > > = > > With these patches we support the following: > > = > > (qemu) device_add spapr-pci-host-bridge,index=3D2,id=3Dphb2 > > (qemu) device_add virtio-net-pci,id=3Dhp2.0,bus=3Dphb2.0 > > (qemu) device_del hp2.0 > > (qemu) device_del phb2 > > = > > Automatic add/remove of PHBs based on EPOW event mechanism require > > updated versions of powerpc-utils, rtas_errd, and librtas. Patches > > are forthcoming and will be available in future versions, but for now > > we can add them manually by executing the following in the guest > > after/before hotplug/unplug, respectively: > > = > > # add PHB > > drmgr -c PHB -s "PHB 2" -a -n > > = > > # remove PHB > > drmgr -c PHB -s "PHB 2" -r -n > > = > > Feedback/comments are very much appreciated. > = > I reviewed the QOM/qdev/memory parts. Don't know much about the rest, > sorry. :) No problem, those seemed to be the scarier bits for me :) Thanks! > = > Paolo > = > > hw/core/qdev.c | 24 ++++++++++++------ > > hw/pci/pci.c | 33 +++++++++++++++++++++++++ > > hw/ppc/spapr.c | 183 ++++++++++++++++++++++++++++++++++++= +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++= +++++++++++++++++++++++- > > hw/ppc/spapr_drc.c | 1 + > > hw/ppc/spapr_events.c | 5 ++++ > > hw/ppc/spapr_iommu.c | 1 + > > hw/ppc/spapr_pci.c | 66 ++++++++++++++++++++++++++++++++++++= ++++++++++--- > > include/hw/pci-host/spapr.h | 3 ++- > > include/hw/pci/pci.h | 3 +++ > > include/hw/ppc/spapr.h | 1 + > > include/hw/qdev-core.h | 3 +++ > > 11 files changed, 310 insertions(+), 13 deletions(-) > > = > > = > > = >=20