[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 3/6] remove late (on-demand) construction of IOMMU page tables
On 30.07.2019 16:44, Paul Durrant wrote: > Now that there is a per-domain IOMMU enable flag, which should be enabled 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-code 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 rmeoved. > > 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 flag 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. > > Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> For the vm_event part. Reviewed-by: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx> > --- > Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx> > Cc: Julien Grall <julien.grall@xxxxxxx> > Cc: Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx> > Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > Cc: George Dunlap <George.Dunlap@xxxxxxxxxxxxx> > Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> > Cc: Jan Beulich <jbeulich@xxxxxxxx> > Cc: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> > Cc: Tim Deegan <tim@xxxxxxx> > Cc: Wei Liu <wl@xxxxxxx> > Cc: "Roger Pau Monné" <roger.pau@xxxxxxxxxx> > Cc: Tamas K Lengyel <tamas@xxxxxxxxxxxxx> > Cc: George Dunlap <george.dunlap@xxxxxxxxxxxxx> > Cc: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx> > Cc: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx> > Cc: Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx> > --- > xen/arch/arm/p2m.c | 2 +- > xen/arch/x86/dom0_build.c | 2 +- > xen/arch/x86/hvm/mtrr.c | 5 +- > xen/arch/x86/mm/mem_sharing.c | 2 +- > xen/arch/x86/mm/paging.c | 2 +- > xen/arch/x86/x86_64/mm.c | 2 +- > xen/common/memory.c | 4 +- > xen/common/vm_event.c | 2 +- > xen/drivers/passthrough/device_tree.c | 11 --- > xen/drivers/passthrough/iommu.c | 134 ++++++-------------------- > xen/drivers/passthrough/pci.c | 12 --- > xen/drivers/passthrough/vtd/iommu.c | 10 +- > xen/drivers/passthrough/x86/iommu.c | 95 ------------------ > xen/include/asm-arm/iommu.h | 2 +- > xen/include/asm-x86/iommu.h | 2 +- > xen/include/xen/iommu.h | 16 --- > xen/include/xen/sched.h | 2 - > 17 files changed, 42 insertions(+), 263 deletions(-) > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |