]> xenbits.xensource.com Git - xen.git/commit
iommu: fix usage of shared EPT/IOMMU page tables on PVH guests
authorRoger Pau Monné <roger.pau@citrix.com>
Mon, 9 Mar 2015 13:01:40 +0000 (14:01 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 9 Mar 2015 13:01:40 +0000 (14:01 +0100)
commit7978429727a9da328444749951005b595de41098
treeefb7b59edeafefea9067fc53776b4434e8f5ee92
parent92cf6c2456dc428694ed95b6b1dec5bb84319790
iommu: fix usage of shared EPT/IOMMU page tables on PVH guests

iommu_share_p2m_table should not prevent PVH guests from using a shared page
table between the IOMMU and EPT. Clean the code by removing the asserts in
the vendor specific implementations (amd_iommu_share_p2m, iommu_set_pgd),
and moving the hap_enabled assert to the caller (iommu_share_p2m_table).

Also fix another incorrect usage of is_hvm_domain usage in
arch_iommu_populate_page_table. This has not given problems so far because
all the pages in PVH guests are of type PGT_writable_page.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Tested-by: David Vrabel <david.vrabel@citrix.com>
Reviewed-by: Tim Deegan <tim@xen.org>
Acked-by: Kevin Tian <kevin.tian@intel.com>
xen/drivers/passthrough/amd/iommu_map.c
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/x86/iommu.c