03/11/2020 23:05, David Christensen: > The SPAPR IOMMU requires that a DMA window size be defined before memory > can be mapped for DMA. Current code dynamically modifies the DMA window > size in response to every new memory allocation which is potentially > dangerous because all existing mappings need to be unmapped/remapped in > order to resize the DMA window, leaving hardware holding IOVA addresses > that are temporarily unmapped. The new SPAPR code statically assigns > the DMA window size on first use, using the largest physical memory > memory address when IOVA=PA and the highest existing memseg virtual > address when IOVA=VA. > > Signed-off-by: David Christensen <d...@linux.vnet.ibm.com> > Acked-by: Anatoly Burakov <anatoly.bura...@intel.com> > --- > -#ifdef VFIO_IOMMU_SPAPR_INFO_DDW > - /* try possible page_shift and levels for workaround */ > + /* if at first we don't succeed, try more levels */ > uint32_t levels; > > - for (levels = create->levels + 1; > + for (levels = create.levels + 1; > ret && levels <= info.ddw.levels; levels++) {
There is a compilation failure with ppc64le-power8-linux-gcc: error: ‘struct vfio_iommu_spapr_tce_info’ has no member named ‘ddw’