dom0/pvh: change the order of the MMCFG initialization
authorRoger Pau Monné <roger.pau@citrix.com>
Fri, 17 Aug 2018 11:54:02 +0000 (13:54 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Aug 2018 11:54:02 +0000 (13:54 +0200)
So it's done before the iommu is initialized. This is required in
order to be able to fetch the MMCFG regions from the domain struct.

No functional change.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/hvm/dom0_build.c

index f0cd63b1ecddeeace8b3011ca209b3a92375c2cc..506572910639233e1fd42da79896fc8744b5c89b 100644 (file)
@@ -1100,6 +1100,13 @@ int __init dom0_construct_pvh(struct domain *d, const module_t *image,
         return rc;
     }
 
+    /*
+     * NB: MMCFG initialization needs to be performed before iommu
+     * initialization so the iommu code can fetch the MMCFG regions used by the
+     * domain.
+     */
+    pvh_setup_mmcfg(d);
+
     iommu_hwdom_init(d);
 
     rc = pvh_load_kernel(d, image, image_headroom, initrd, bootstrap_map(image),
@@ -1124,8 +1131,6 @@ int __init dom0_construct_pvh(struct domain *d, const module_t *image,
         return rc;
     }
 
-    pvh_setup_mmcfg(d);
-
     printk("WARNING: PVH is an experimental mode with limited functionality\n");
     return 0;
 }