[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v8 4/6] remove late (on-demand) construction of IOMMU page tables
> -----Original Message----- > From: Jan Beulich <jbeulich@xxxxxxxx> > Sent: 05 September 2019 15:30 > To: Paul Durrant <Paul.Durrant@xxxxxxxxxx> > Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; Julien Grall <julien.grall@xxxxxxx>; > Alexandru Isaila > <aisaila@xxxxxxxxxxxxxxx>; PetrePircalabu <ppircalabu@xxxxxxxxxxxxxxx>; > Razvan Cojocaru > <rcojocaru@xxxxxxxxxxxxxxx>; Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>; Roger > Pau Monne > <roger.pau@xxxxxxxxxx>; Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>; > George Dunlap > <George.Dunlap@xxxxxxxxxx>; Ian Jackson <Ian.Jackson@xxxxxxxxxx>; Stefano > Stabellini > <sstabellini@xxxxxxxxxx>; Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>; > Tamas K Lengyel > <tamas@xxxxxxxxxxxxx>; Tim (Xen.org) <tim@xxxxxxx>; Wei Liu <wl@xxxxxxx> > Subject: Re: [PATCH v8 4/6] remove late (on-demand) construction of IOMMU > page tables > > On 02.09.2019 16:50, Paul Durrant wrote: > > Now that there is a per-domain IOMMU-enable flag, which should be set if > > any device is going to be passed through, stop deferring page table > > construction until the assignment is done. Also don't tear down the tables > > again when the last device is de-assigned; defer that task until domain > > destruction. > > > > This allows the has_iommu_pt() helper and iommu_status enumeration to be > > removed. Calls to has_iommu_pt() are simply replaced by calls to > > is_iommu_enabled(). Remaining open-coded tests of iommu_hap_pt_share can > > also be replaced by calls to iommu_use_hap_pt(). > > The arch_iommu_populate_page_table() and iommu_construct() functions become > > redundant, as does the 'strict mode' dom0 page_list mapping code in > > iommu_hwdom_init(), and iommu_teardown() can be made static is its only > > remaining caller, iommu_domain_destroy(), is within the same source > > module. > > > > All in all, about 220 lines of code are removed from the hypervisor. > > > > NOTE: This patch will cause a small amount of extra resource to be used > > to accommodate IOMMU page tables that may never be used, since the > > per-domain IOMMU-enable flag is currently set to the value of the > > global iommu_enable flag. A subsequent patch will add an option to > > the toolstack to allow it to be turned off if there is no intention > > to assign passthrough hardware to the domain. > > To account for the extra resource, 'iommu_memkb' has been added to > > domain_build_info. This patch sets it unconditionally to a value > > calculated based on the domain's maximum memory but, when the > > toolstack option mentioned above is added, it can be set to zero > > if the per-domain IOMMU-enable flag is turned off. > > > > Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> > > I've just stumbled across our earlier discussion on the still not > sufficiently "x86/HVM: p2m_ram_ro is incompatible with device > pass-through" of mine, and I wonder whether the implication from > the change here is that people wanting p2m_ram_ro used on a guest > would then need to force the IOMMU off for that guest (which aiui > isn't possible until patch 6). You wouldn't be able to force IOMMU off on a per-domain basis until patch #6 but it could still be done globally. Paul > > 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 |