[0/2] vfio: change spapr DMA window sizing operation
mbox series

Message ID 20200429232931.87233-1-drc@linux.vnet.ibm.com
Headers show
  • vfio: change spapr DMA window sizing operation
Related show


David Christensen April 29, 2020, 11:29 p.m. UTC
The SPAPR v2 IOMMU used on bare-metal PowerNV systems requires that a DMA window
be defined before mapping/unmapping memory.  The current VFIO code dynamically
resizes this DMA window every time a new memory request is made, which requires
that all existing memory be unmapped/remapped.  While this strategy worked in
DPDK 17.11 and earlier where memory was statically allocated during startup, it
is potentially dangerous in DPDK 18.11 and later where memory can be allocated
during runtime, temporarily invalidating IOVA memory used by hardware.

This new code statically sizes the DMA window at startup, based on the amount of
memory installed in the system, avoiding the need to unmap memory during

David Christensen (2):
  vfio: use ifdef's for ppc64 spapr code
  vfio: modify spapr iommu support to use static window sizing

 lib/librte_eal/linux/eal_vfio.c | 396 +++++++++++++++-----------------
 1 file changed, 187 insertions(+), 209 deletions(-)