Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-1061

[virtio-iommu] "VFIO_MAP_DMA failed: File exists" errors when VFIO devices are in the same guest iommu group

    • None
    • Moderate
    • rhel-sst-virtualization
    • ssg_virtualization
    • 5
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

      With the setup described in BZ https://bugzilla.redhat.com/show_bug.cgi?id=2103649

      where the 2 assigned PFs end up in the same iommu group on the guest (by mistake in that case due to the bug, but this can actually happen if the 2 assigned devices are pluged downstream to a PCIe to PCI bridge), we get spurious qemu errors:

      2022-12-07T13:47:03.661326Z qemu-system-x86_64: VFIO_MAP_DMA failed: File exists
      2022-12-07T13:47:03.661333Z qemu-system-x86_64: vfio_dma_map(0x556cc5e0acf0, 0xbfbd1000, 0x1000, 0x7f1692853000) = -17 (File exists)

      This is due to a bug in the QEMU virtio-iommu device where the replay and remap function only do MAP without prior UNMAP, causing this attempt dma map onto an existing mapping.

              virt-maint virt-maint
              eauger Eric Auger
              virt-maint virt-maint
              Jin Liu Jin Liu
              Votes:
              0 Vote for this issue
              Watchers:
              15 Start watching this issue

                Created:
                Updated: