From aeb318351a77c8556025fced110ce387e4dfb93e Mon Sep 17 00:00:00 2001 From: Roger Pau Monne Date: Wed, 17 Jan 2018 08:34:19 +0000 Subject: [PATCH] xen/pvshim: map vcpu_info earlier for APs MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Or else init_percpu_time is going to dereference a NULL pointer when trying to access vcpu_info. Signed-off-by: Roger Pau Monné Reviewed-by: Wei Liu Acked-by: Jan Beulich --- xen/arch/x86/smpboot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/smpboot.c b/xen/arch/x86/smpboot.c index 63ca053b35..2cdd431b5f 100644 --- a/xen/arch/x86/smpboot.c +++ b/xen/arch/x86/smpboot.c @@ -349,6 +349,9 @@ void start_secondary(void *unused) else microcode_resume_cpu(cpu); + if ( xen_guest ) + hypervisor_ap_setup(); + smp_callin(); init_percpu_time(); @@ -376,9 +379,6 @@ void start_secondary(void *unused) cpumask_set_cpu(cpu, &cpu_online_map); unlock_vector_lock(); - if ( xen_guest ) - hypervisor_ap_setup(); - /* We can take interrupts now: we're officially "up". */ local_irq_enable(); mtrr_ap_init(); -- 2.30.2