[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [v7][RFC][PATCH 11/13] xen:vtd: create RMRR mapping
intel_iommu_map_page() does nothing if VT-d shares EPT page table. So rmrr_identity_mapping() never create RMRR mapping but in some cases like some GFX drivers it still need to access RMRR. Here we will create those RMRR mappings even in shared EPT case. Signed-off-by: Tiejun Chen <tiejun.chen@xxxxxxxxx> --- xen/drivers/passthrough/vtd/iommu.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c index efd3390..07136df 100644 --- a/xen/drivers/passthrough/vtd/iommu.c +++ b/xen/drivers/passthrough/vtd/iommu.c @@ -1856,10 +1856,15 @@ static int rmrr_identity_mapping(struct domain *d, bool_t map, while ( base_pfn < end_pfn ) { - int err = intel_iommu_map_page(d, base_pfn, base_pfn, - IOMMUF_readable|IOMMUF_writable); - - if ( err ) + int err = 0; + if ( iommu_use_hap_pt(d) ) + { + ASSERT(!iommu_passthrough || !is_hardware_domain(d)); + if ( (err = set_identity_p2m_entry(d, base_pfn, p2m_access_rw)) ) + return err; + } + else if ( (err = intel_iommu_map_page(d, base_pfn, base_pfn, + IOMMUF_readable|IOMMUF_writable)) ) return err; base_pfn++; } -- 1.9.1 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |