[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 Tue, 2016-02-02 at 06:42 +0000, Tian, Kevin wrote: > > From: Kay, Allen M > > Sent: Tuesday, February 02, 2016 8:04 AM > > > > > > 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, I haven't ever successfully assigned an IGD device to a VM myself, but my understanding was that it *has* been done. So when the code was changed to prevent assignment of devices afflicted by RMRRs (except USB where we know it's OK), I just added the integrated graphics to that same exception as USB, to preserve the status quo ante. > I don't think stolen memory should be handled explicitly. If yes, it should be > listed as a RMRR region so general RMRR setup will cover it. But as Allen > pointed out, the whole RMRR becomes unnecessary if we target only secondary > device for IGD. Perhaps the best option is *not* to have special cases in the IOMMU code for "those devices which can safely be assigned despite RMRRs". Instead, let's let the device driver â or whatever â tell the IOMMU code when it's *stopped* the firmware from (ab)using the device's DMA facilities. So when the USB code does the handoff thing to quiesce the firmware's access to USB and take over in the OS, it would call the IOMMU function to revoke the RMRR for the USB controller. And if/when the graphics driver resets its device into a state where it's no longer accessing stolen memory and can be assigned to a VM, it can also call that 'RMRR revoke' function. Likewise, if we teach device drivers to cancel whatever abominations the HP firmware tends to set up behind the OS's back on other PCI devices, we can cancel the RMRRs for those too. Then the IOMMU code has a simple choice and no special cases â we can assign a device iff it has no active RMRR. -- David Woodhouse Open Source Technology Centre David.Woodhouse@xxxxxxxxx Intel Corporation Attachment:
smime.p7s _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |