sw64: iommu: work around iova mapping on pci bars
Sunway inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I5G5T3 -------------------------------- Since the RCs of SW64 chipset do not support Peer-to-Peer DMA, we used to return -EINVAL error on iova mampping on PCI BARs. However, it will cause driver loading errors when QEMU calls vfio module to passthrough PCI devices with this kind of BARs, shown as follows: > qemu-system-sw64: VFIO_MAP_DMA: -22 > qemu-system-sw64: vfio_dma_map(0x121c28020, 0x8800c0000000, 0x40000, 0x4165f21b2000) = -22 (Invalid argument) > qemu: hardware error: vfio: DMA mapping failed, unable to continue To fix this problem, this patch will return success on the iova mapping of PCI BARs that pretends to support this feature. Signed-off-by:Zhou Qihang <zhouqihang@wxiat.com> Signed-off-by:
Gu Zitao <guzitao@wxiat.com>
Loading
Please sign in to comment