From: Andrew Cooper Subject: [PATCH 3/8] x86/setup: Initialise CR4 before creating idle_vcpu[0] Date: Wed, 24 Jun 2015 17:31:35 +0100 Message-ID: <1435163500-10589-4-git-send-email-andrew.cooper3@citrix.com> References: <1435163500-10589-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1435163500-10589-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Jan Beulich List-Id: xen-devel@lists.xenproject.org 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 CC: Jan Beulich --- 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 c32e49f..ff34670 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(); -- 1.7.10.4