x86/setup: Move reading of cached state earlier
PATCH 1/1 x86/setup: Move reading of cached state earlier
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 <[email protected]>
---
CC: Jan Beulich <[email protected]>
--- xen/arch/x86/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
xen/arch/x86/setup.c +3 -3
@@ -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)); + asmvolatile ("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)); - asmvolatile ("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 ;
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xenproject.org/mailman/listinfo/xen-devel