[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [RFC PATCH v2 0/4] Enable spapr-pci-vfio-host-bridge controllers for VFIO passthrough support



The following series of patches enable spapr-pci-vfio-host-bridge
controllers on PPC64-pseries machine which is required for supporting
host device passthrough using VFIO.

There were some initial enablement work on the same at
http://www.redhat.com/archives/libvir-list/2013-September/msg00838.html.

On pseries(ppc64), the vfio host devices(will refer as
hostdevs here on) cannot be assigned to the default emulated pci-host-bus(phb)
controller(like the default pci.0). The hostdevs goto spapr-pci-vfio-host-bridge.
The hostdevs belonging to the same iommu group share the same
spapr-pci-vfio-host-bridge. Henceforth, new spapr-pci-host-bridge needs to be
added for every hostdev belonging to any new iommu group. The hostdevs should 
be attached to their respective spapr-pci-vfio-host-bridge.

Libvirt today adds all the devices to the default pci domain. The patch series
take care to add the new controller. A new pci domain in the guest per
controller is created. The hostdevs get their pci address in the respective
domain. The patch series taskes care of device addressing in vfio hostdevs, 
SR-IOV interfaces and network interfaces from SRIOV virtual function pools.

Reference:
======
v1: http://www.redhat.com/archives/libvir-list/2014-October/msg00500.html

Changes Since v1:
* Some minor code clean up and rebase to latest code base after review with Prerna
* Patch 2 : Added logic to remove redundant spapr-vfio controllers.
*         : Moved domaincommon.rng from Patch 4 to Patch 2.

---

Shivaprasad G Bhat (4):
      qemu: Add SPAPR_VFIO_HOST_BRIDGE capability for PPC platform
      qemu: parse spapr-vfio-pci controller from xml
      qemu: assign addresses for spapr vfio hostdevices and generate cli
      qemu: add test case for spapr-pci-vfio-host-bridge


 docs/schemas/domaincommon.rng                      |   28 ++
 src/bhyve/bhyve_domain.c                           |    2 
 src/conf/domain_addr.c                             |    8 -
 src/conf/domain_addr.h                             |    2 
 src/conf/domain_conf.c                             |  165 +++++++++++-
 src/conf/domain_conf.h                             |   19 +
 src/libvirt_private.syms                           |    2 
 src/qemu/qemu_capabilities.c                       |    2 
 src/qemu/qemu_capabilities.h                       |    1 
 src/qemu/qemu_command.c                            |  276 +++++++++++++++++++-
 src/qemu/qemu_command.h                            |   17 +
 src/qemu/qemu_domain.c                             |   12 -
 src/qemu/qemu_driver.c                             |    6 
 tests/qemuhotplugtest.c                            |    2 
 .../qemuxml2argv-hostdev-spapr-vfio.args           |   20 +
 .../qemuxml2argv-hostdev-spapr-vfio.xml            |   75 +++++
 tests/qemuxml2argvtest.c                           |    8 +
 17 files changed, 609 insertions(+), 36 deletions(-)
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-spapr-vfio.args
 create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-spapr-vfio.xml

-- 
Signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]