Skip to contentSkip to conversation

x86/xen: fix booting 32-bit pv guest

PATCH Superseded Juergen Gross 2 participants 3 messages Apr 9, 2020

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Juergen Gross

author maintainer
#0 lore raw

PATCH 1/1 x86/xen: fix booting 32-bit pv guest

Commit 2f62f36e62daec ("x86/xen: Make the boot CPU idle task reliable") introduced a regression for booting 32 bit Xen PV guests: the address of the initial stack needs to be a virtual one.

Fixes 2f62f36e62daec ("x86/xen: Make the boot CPU idle task reliable")
---
 arch/x86/xen/xen-head.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/xen/xen-head.S +1 -1
index 7d1c4fcbe8f7..1ba601df3a37 100644
@@ -38,7 +38,7 @@ SYM_CODE_START(startup_xen)
 #ifdef CONFIG_X86_64
 	mov initial_stack(%rip), %rsp
 #else
-	mov pa(initial_stack), %esp
+	mov initial_stack, %esp
 #endif
 
 #ifdef CONFIG_X86_64
Signature · 1 line
2.16.4
reviewer Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Juergen Gross

Commit 2f62f36e62daec ("x86/xen: Make the boot CPU idle task reliable") introduced a regression for booting 32 bit Xen PV guests: the address of the initial stack needs to be a virtual one.

Fixes 2f62f36e62daec ("x86/xen: Make the boot CPU idle task reliable")

arch/x86/xen/xen-head.S SYM_CODE_START(startup_xen) · line 38

Quoted 10 lines
---
 arch/x86/xen/xen-head.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/xen/xen-head.S +0 -0
index 7d1c4fcbe8f7..1ba601df3a37 100644
@@ -38,7 +38,7 @@ SYM_CODE_START(startup_xen)
 #ifdef CONFIG_X86_64

While at it, I'd swap the ifdefs and fold x86_64 case into the one below.

Quoted 7 lines
arch/x86/xen/xen-head.S +1 -1
 	mov initial_stack(%rip), %rsp
 #else
-	mov pa(initial_stack), %esp
+	mov initial_stack, %esp
 #endif
 
 #ifdef CONFIG_X86_64
author maintainer
#2 lore raw
Quoted 17 lines · Boris Ostrovsky
Quoted 6 lines · Juergen Gross

Commit 2f62f36e62daec ("x86/xen: Make the boot CPU idle task reliable") introduced a regression for booting 32 bit Xen PV guests: the address of the initial stack needs to be a virtual one.

Fixes 2f62f36e62daec ("x86/xen: Make the boot CPU idle task reliable")
Quoted 4 lines
---
  arch/x86/xen/xen-head.S | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 9 lines

arch/x86/xen/xen-head.S SYM_CODE_START(startup_xen) · line 38

Quoted 6 lines
arch/x86/xen/xen-head.S +0 -0
index 7d1c4fcbe8f7..1ba601df3a37 100644
@@ -38,7 +38,7 @@ SYM_CODE_START(startup_xen)
  #ifdef CONFIG_X86_64

While at it, I'd swap the ifdefs and fold x86_64 case into the one below.

I wanted to remove 32-bit PV support from the kernel soon, so I think this can wait until then. :-)

Juergen