[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [iGVT-g] [vfio-users] [PATCH v3 00/11] igd passthrough chipset tweaks



On Sat, 2016-01-30 at 01:18 +0000, Kay, Allen M wrote:
>Â
> > -----Original Message-----
> > From: iGVT-g [mailto:igvt-g-bounces@xxxxxxxxxxxx] On Behalf Of Alex
> > Williamson
> > Sent: Friday, January 29, 2016 10:00 AM
> > To: Gerd Hoffmann
> > Cc: igvt-g@xxxxxxxxxxx; xen-devel@xxxxxxxxxxxxxxxxxxx; Eduardo Habkost;
> > Stefano Stabellini; qemu-devel@xxxxxxxxxx; Cao jin; vfio-
> > users@xxxxxxxxxx
> > Subject: Re: [iGVT-g] [vfio-users] [PATCH v3 00/11] igd passthrough chipset
> > tweaks
>
> > Do guest drivers depend on IGD appearing at 00:02.0?ÂÂI'm currently testing
> > for any Intel VGA device, but I wonder if I should only be enabling anything
> > opregion if it also appears at a specific address.
>
>Â
> No.ÂÂBoth Windows and Linux IGD driver should work at any PCI slot.ÂÂWe have 
> seen 0:5.0 in the guest and the driver works.

Thanks Allen.ÂÂAnother question, when I boot a VM with an assigned HD
P4000 GPU, my console stream with IOMMU faults, like:

DMAR: DMAR:[DMA Write] Request device [00:02.0] fault addr 9fa30000Â
DMAR: DMAR:[DMA Write] Request device [00:02.0] fault addr 9fa30000Â
DMAR: DMAR:[DMA Write] Request device [00:02.0] fault addr 9fa30000Â
DMAR: DMAR:[DMA Write] Request device [00:02.0] fault addr 9fa30000Â
DMAR: DMAR:[DMA Write] Request device [00:02.0] fault addr 9fa30000Â

All of these fall within the host RMRR range for the device:

DMAR: Setting RMRR:
DMAR: Setting identity map for device 0000:00:02.0 [0x9f800000 - 0xaf9fffff]

A while back, we excluded devices using RMRRs from participating in
IOMMU API domains because they may continue to DMA to these reserved
regions after assignment, possibly corrupting VM memory
(c875d2c1b808).ÂÂIntel later decided this exclusion shouldn't apply to
graphics devices (18436afdc11a).ÂÂDon't the above IOMMU faults reveal
that exactly the problem we're trying to prevent by general exclusion of
RMRR encumbered devices from the IOMMU API is actually occuring?ÂÂIf I
were to have VM memory within the RMRR address range, I wouldn't be
seeing these faults, I'd be having the GPU corrupt my VM memory.

David notes in the latter commit above:

"We should be able to successfully assign graphics devices to guests
too, as long as the initial handling of stolen memory is reconfigured
appropriately."

What code is supposed to be doing that reconfiguration when a device is
assigned?ÂÂClearly we don't have it yet, making assignment of these
devices very unsafe.ÂÂIt seems like vfio or IOMMU code  in the kernel
needs device specific code to clear these settings to make it safe for
userspace, then perhaps VM BIOS support to reallocate.ÂÂIs there any
consistency across IGD revisions for doing this?  Is there a spec?
Thanks,

Alex


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.