From a06ab1e37f43145933b854c0d5ed28ad7183c8aa Mon Sep 17 00:00:00 2001 From: Andrew Cooper Date: Thu, 25 Jun 2015 14:57:31 +0200 Subject: [PATCH] x86/setup: initialise CR4 before creating idle_vcpu[0] PV vcpu initialise has CR4 seeded from mmu_cr4_features. Adjust the order of basic CR4 setup and creation of the idle domain, such that idle_vcpu[0] is not wildly different from the other idle vcpus. Signed-off-by: Andrew Cooper --- xen/arch/x86/setup.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index c32e49fa7e..ff3467035f 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -1284,20 +1284,6 @@ void __init noreturn __start_xen(unsigned long mbi_p) timer_init(); - init_idle_domain(); - - this_cpu(stubs.addr) = alloc_stub_page(smp_processor_id(), - &this_cpu(stubs).mfn); - BUG_ON(!this_cpu(stubs.addr)); - - trap_init(); - - rcu_init(); - - early_time_init(); - - arch_init_memory(); - identify_cpu(&boot_cpu_data); if ( cpu_has_fxsr ) @@ -1318,6 +1304,20 @@ void __init noreturn __start_xen(unsigned long mbi_p) if ( cpu_has_fsgsbase ) set_in_cr4(X86_CR4_FSGSBASE); + init_idle_domain(); + + this_cpu(stubs.addr) = alloc_stub_page(smp_processor_id(), + &this_cpu(stubs).mfn); + BUG_ON(!this_cpu(stubs.addr)); + + trap_init(); + + rcu_init(); + + early_time_init(); + + arch_init_memory(); + alternative_instructions(); local_irq_enable(); -- 2.30.2