amd-iommu: disable iommu_hap_pt_share with AMD IOMMUs

According to the comment in p2m.h, AMD IOMMUs don't work correctly
with page types different than p2m_ram_rw when the p2m is shared
between HAP and IOMMU, so disable this sharing when using AMD IOMMUs.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
This commit is contained in:
Roger Pau Monné authored and Jan Beulich committed 2014-08-11 14:57:09 +02:00
1 parent 3af450fd2d
commit c2ba3db31e
1 file changed
+8
+8
View File
@@ -1255,6 +1255,14 @@ int __init amd_iommu_init(void)
if ( iterate_ivrs_mappings(amd_iommu_setup_device_table) != 0 )
goto error_out;
/*
* Disable sharing HAP page tables with AMD IOMMU,
* since it only supports p2m_ram_rw, and this would
* prevent doing IO to/from mapped grant frames.
*/
iommu_hap_pt_share = 0;
printk(XENLOG_DEBUG "AMD-Vi: Disabled HAP memory map sharing with IOMMU\n");
/* per iommu initialization */
for_each_amd_iommu ( iommu )
if ( amd_iommu_init_one(iommu) != 0 )
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.