[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] IOMMU page-tables
On 18.07.2019 12:13, Andrew Cooper wrote: > On 18/07/2019 10:49, Paul Durrant wrote: >> Hi, >> >> Before I get too far into this I want to get some opinions from the wider >> community... >> >> At the moment when the first PCI device is assigned to a domain (i.e. >> passed through) this will trigger construction of IOMMU page tables for that >> domain. Similarly when the last PCI device is de-assigned the tables are >> torn down again. Both of these operations can be quite expensive if the >> domain is a large amount for RAM, and if the IOMMU does not support sharing >> the second level CPU page tables (or the domain is PV). Moreover, the guest >> could simultaneously be ballooning or doing other operations that affect its >> page types and so the process of building the tables has to take into >> account such races. >> If we were instead to say that giving a domain IOMMU page tables is an >> option that needs to be selected at domain create time then it makes the >> code significantly simpler and there is no need to deal with page type >> change/ballooning races any more. I hacked together a test patch and it gets >> rid of roughly 200 lines of code (and there may be more that I missed). >> Does anyone think that deciding whether a domain should get IOMMU page >> tables is not a reasonable thing to have to do at create time? > > To be absolutely clear here, I don't see any evidence for the current > behaviour to be a commonly used feature in practice. > > If anyone has a counterexample, please speak up urgently. I don't have a counterexample, nor am I outright opposed to the suggested change. Nevertheless I'd like to point out that "just in case" setting to IOMMU-enabled of a domain is a waste of memory if no device ever gets assigned to it. And if there are people relying on being able to attach a device on demand, then they may be caught by surprise when they upgrade (and we all know how much documentation people read when they think they know what they're doing, which is to say: Adding a respective note to the release notes is not very likely to help.). > Furthermore, the complexity and (best-we-can-manage-security-wise) > livelocks in the hypervisor/toolstack is justification alone to > seriously consider dropping it moving forwards. The complexity in > particular is an impediment to several aspects of IOMMU development work > which are in progress. > > In particular, I do not see it as an unreasonable burden for > admins/guests to specify whether they want an IOMMU at domain creation > time. I expect that the overwhelming majority of cases already know at > creation time which PCI devices want assigning. > > As far as I'm concerned, this feature/corner case wants ripping out. > Whatever the original intention, hindsight has demonstrated that it > really isn't clever idea. FAOD - I agree with all the technical aspects here. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |