qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC PATCH v2 00/13] spapr: vfio: Enable Dynamic DMA window


From: Alexey Kardashevskiy
Subject: [Qemu-devel] [RFC PATCH v2 00/13] spapr: vfio: Enable Dynamic DMA windows (DDW)
Date: Fri, 15 Aug 2014 20:12:22 +1000

At the moment sPAPR PHB supports only a single 32bit window
which is normally 1..2GB which is not enough for high performance devices.

PAPR spec enables creating an additional window(s) to support 64bit
DMA and bigger page sizes.

This patchset adds DDW support for pseries. The host kernel changes are
required.

This was tested on POWER8 system which allows one additional DMA window
which is mapped at 0x800.0000.0000.0000 and supports 16MB pages.
Existing guests check for DDW capabilities in PHB's device tree and if it
is present, they request for an additional window and map entire guest RAM
using H_PUT_TCE/... hypercalls once at boot time and switch to direct DMA
operations.

TCE tables still may be big enough for guests backed with 64K pages but they
are reasonably small for guests backed by 16MB pages.

Please comment. Thanks!

Changes:
v2:
* tested on emulated PHB
* removed "ddw" machine property, now it is PHB property
* disabled by default
* defined "pseries-2.2" machine which enables DDW by default
* fixed reset() and reference counting




Alexey Kardashevskiy (13):
  qom: Make object_child_foreach safe for objects removal
  spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows
  spapr_pci: Make find_phb()/find_dev() public
  spapr_iommu: Make spapr_tce_find_by_liobn() public
  spapr_pci: Introduce a liobn number generating macros
  spapr_iommu: Implement free_table() helper
  spapr_rtas: Add Dynamic DMA windows (DDW) RTAS calls support
  spapr_pci: Enable DDW
  spapr_pci_vfio: Call spapr_pci::reset on reset
  linux headers update for DDW
  spapr_pci_vfio: Enable DDW
  vfio: Enable DDW ioctls to VFIO IOMMU driver
  spapr: Add pseries-2.2 machine with default "ddw" option

 hw/misc/vfio.c              |   4 +
 hw/ppc/Makefile.objs        |   3 +
 hw/ppc/spapr.c              |  29 +++++
 hw/ppc/spapr_iommu.c        |  19 ++-
 hw/ppc/spapr_pci.c          | 125 +++++++++++++++++--
 hw/ppc/spapr_pci_vfio.c     |  88 +++++++++++++-
 hw/ppc/spapr_rtas_ddw.c     | 283 ++++++++++++++++++++++++++++++++++++++++++++
 include/hw/pci-host/spapr.h |  30 +++++
 include/hw/ppc/spapr.h      |  11 +-
 linux-headers/linux/vfio.h  |  37 +++++-
 qom/object.c                |   4 +-
 trace-events                |   4 +
 12 files changed, 611 insertions(+), 26 deletions(-)
 create mode 100644 hw/ppc/spapr_rtas_ddw.c

-- 
2.0.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]