These are reads of registers which have already been set up, so are safe to do at any point. However, TLB flushes (e.g. from bootstrap_map()) don't function until get_cpu_info()->cr4 is populated.
Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com> --- CC: Jan Beulich <jbeul...@suse.com> --- xen/arch/x86/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c index 32bb02e..2b4b48c 100644 --- a/xen/arch/x86/setup.c +++ b/xen/arch/x86/setup.c @@ -676,6 +676,9 @@ void __init noreturn __start_xen(unsigned long mbi_p) smp_prepare_boot_cpu(); sort_exception_tables(); + rdmsrl(MSR_EFER, this_cpu(efer)); + asm volatile ( "mov %%cr4, %0" : "=r" (get_cpu_info()->cr4) ); + setup_virtual_regions(__start___ex_table, __stop___ex_table); /* Full exception support from here on in. */ @@ -706,9 +709,6 @@ void __init noreturn __start_xen(unsigned long mbi_p) parse_video_info(); - rdmsrl(MSR_EFER, this_cpu(efer)); - asm volatile ( "mov %%cr4,%0" : "=r" (get_cpu_info()->cr4) ); - /* We initialise the serial devices very early so we can get debugging. */ ns16550.io_base = 0x3f8; ns16550.irq = 4; -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel