]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86/mm: Allow map_domain_page_global() to be used during boot
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 7 Sep 2017 16:38:52 +0000 (17:38 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 8 Sep 2017 14:39:43 +0000 (15:39 +0100)
map_domain_page_global() uses vmap under the hood, which is set up immediately
after switching to SYS_STATE_boot.  Relax the local_irq_is_enabled() part of
the assertion before Xen has finished booting, so map_domain_page_global() can
be used duing SMP preparation.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/domain_page.c

index 0463e9a65c9625d63500d7486e6b513a57acae6f..3432a854dd209537b00d0da77b0b9f96dcec8713 100644 (file)
@@ -305,7 +305,10 @@ int mapcache_vcpu_init(struct vcpu *v)
 
 void *map_domain_page_global(mfn_t mfn)
 {
-    ASSERT(!in_irq() && local_irq_is_enabled());
+    ASSERT(!in_irq() &&
+           ((system_state >= SYS_STATE_boot &&
+             system_state < SYS_STATE_active) ||
+            local_irq_is_enabled()));
 
 #ifdef NDEBUG
     if ( mfn_x(mfn) <= PFN_DOWN(__pa(HYPERVISOR_VIRT_END - 1)) )