Skip to contentSkip to conversation

x86/pvh: change the order of the iommu initialization for Dom0

PATCH In review Roger Pau Monne 2 participants 2 messages Jul 24, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/pvh: change the order of the iommu initialization for Dom0

The iommu initialization will also create MMIO mappings in the Dom0 p2m, so the paging memory pool needs to be allocated or else iommu initialization will fail.

Move the call to init the iommu after the Dom0 p2m has been setup in order to solve this.

Note that issues caused by this wrong ordering have only been seen when using shadow paging.

---
Cc: Jan Beulich <[email protected]>
Cc: Andrew Cooper <[email protected]>

---
 xen/arch/x86/hvm/dom0_build.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/x86/hvm/dom0_build.c +2 -2
index 9a833fa4b9..f0cd63b1ec 100644
@@ -1093,8 +1093,6 @@ int __init dom0_construct_pvh(struct domain *d, const module_t *image,
 
     printk(XENLOG_INFO "*** Building a PVH Dom%d ***\n", d->domain_id);
 
-    iommu_hwdom_init(d);
-
     rc = pvh_setup_p2m(d);
     if ( rc )
     {
@@ -1102,6 +1100,8 @@ int __init dom0_construct_pvh(struct domain *d, const module_t *image,
         return rc;
     }
 
+    iommu_hwdom_init(d);
+
     rc = pvh_load_kernel(d, image, image_headroom, initrd, bootstrap_map(image),
                          cmdline, &entry, &start_info);
     if ( rc )
Signature · 7 lines
2.18.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines
Quoted 1 line
Quoted 1 line · On 24.07.18 at 13:29, <[email protected]> wrote:

The iommu initialization will also create MMIO mappings in the Dom0 p2m, so the paging memory pool needs to be allocated or else iommu initialization will fail.

Quoted 7 lines

Move the call to init the iommu after the Dom0 p2m has been setup in order to solve this.

Note that issues caused by this wrong ordering have only been seen when using shadow paging.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel