Skip to contentSkip to conversation

x86/setup: Resync the boot stack 8 bytes at a time

PATCH New Andrew Cooper 1 participant 1 message May 14, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86/setup: Resync the boot stack 8 bytes at a time

CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
---
 xen/arch/x86/setup.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
xen/arch/x86/setup.c +2 -2
index d8598a3..a2fe7e0 100644
@@ -906,7 +906,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
 
             /* Re-sync the stack and then switch to relocated pagetables. */
             asm volatile (
-                "rep movsb        ; " /* re-sync the stack */
+                "rep movsq        ; " /* re-sync the stack */
                 "movq %%cr4,%%rsi ; "
                 "andb $0x7f,%%sil ; "
                 "movq %%rsi,%%cr4 ; " /* CR4.PGE == 0 */
@@ -914,7 +914,7 @@ void __init noreturn __start_xen(unsigned long mbi_p)
                 "orb $0x80,%%sil  ; "
                 "movq %%rsi,%%cr4   " /* CR4.PGE == 1 */
                 : : "r" (__pa(idle_pg_table)), "S" (cpu0_stack),
-                "D" (__va(__pa(cpu0_stack))), "c" (STACK_SIZE) : "memory" );
+                "D" (__va(__pa(cpu0_stack))), "c" (STACK_SIZE / 8) : "memory" );
 
             bootstrap_map(NULL);
         }
Signature · 1 line
1.7.10.4