I have run in to a few problems with IGD passthrough with a linux guest. I am not running in legacy mode, so I guess that I might not be supported.
The first thing that I noticed was on some intel machines, when the VFIO IOMMU module was loaded from qemu I was getting a whole lot of DMAR faults. The address I found was the same as the one that was being set by the kernel here:
Jun 23 10:21:35 phys kernel: DMAR: Setting RMRR:
Jun 23 10:21:35 phys kernel: DMAR: Setting identity map for device 0000:00:02.0 [0xcb000000 - 0xcf1fffff]
This happened on two machines at different memory locations. I was able to fix this by hardcoding an entry thus:
diff --git a/drivers/vfio/vfio_iommu_type1.c b/drivers/vfio/vfio_iommu_type1.c
index a8a079ba9477..3c0f134c1669 100644
--- a/drivers/vfio/vfio_iommu_type1.c
+++ b/drivers/vfio/vfio_iommu_type1.c
@@ -1270,6 +1270,8 @@ static int vfio_iommu_type1_attach_group(void *iommu_data,
goto out_domain;
}
+ ret = iommu_map(domain->domain, 0xcb000000u,0xcb000000u , 0x4200000u, IOMMU_READ | IOMMU_WRITE);
and the machine because usable again. As this fixed my problem, I didn't bother checking what RMRR does, but should this be handled or should entries that doesn't apepar in the PCI configation space not be remove from the DMAR?
Anyhow, I tried to get the OpRegion working, adding an x-idg-opregion and overrring the VGA check in the vfio kernel module. But I noticed in the VM the OpRegion ins't mapped:
On the guest the region FC is zero whereas it contains a 32bit address from the host:
lspci -xxxx -s 00:2
00:02.0 Display controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
00: 86 80 12 04 07 04 90 00 06 00 80 03 00 00 80 00
....
f0: 00 00 00 00 00 00 00 00 00 00 06 00 00 00 00 00
lspci -xxxx -s 00:2
00:02.0 Display controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06)
00: 86 80 12 04 07 04 90 00 06 00 80 03 00 00 00 00
...
f0: 00 00 00 00 00 00 00 00 00 00 06 00 18 c0 d5 c8
How is the OpRegion mapped in the guest?
Cheers
JT
_______________________________________________ vfio-users mailing list vfio-users@redhat.com https://www.redhat.com/mailman/listinfo/vfio-users