From: Andrew Cooper Date: Thu, 7 Sep 2017 16:38:52 +0000 (+0100) Subject: x86/mm: Allow map_domain_page_global() to be used during boot X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1461 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=70892c317fd56064b09a4b0fcaa0781735e64efc;p=xen.git x86/mm: Allow map_domain_page_global() to be used during boot 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 Reviewed-by: Jan Beulich --- diff --git a/xen/arch/x86/domain_page.c b/xen/arch/x86/domain_page.c index 0463e9a65c..3432a854dd 100644 --- a/xen/arch/x86/domain_page.c +++ b/xen/arch/x86/domain_page.c @@ -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)) )