|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH 1/3] x86/kexec: Drop compatibility_mode_far
ljmp is (famously?) incompatible between Intel and AMD CPUs, and while we're
using one of the compatible forms, we've got a good stack and lret is the far
more common way of doing this.
No functional change.
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Wei Liu <wl@xxxxxxx>
---
xen/arch/x86/x86_64/kexec_reloc.S | 16 ++++------------
1 file changed, 4 insertions(+), 12 deletions(-)
diff --git a/xen/arch/x86/x86_64/kexec_reloc.S
b/xen/arch/x86/x86_64/kexec_reloc.S
index f4842025eb56..035164e96f38 100644
--- a/xen/arch/x86/x86_64/kexec_reloc.S
+++ b/xen/arch/x86/x86_64/kexec_reloc.S
@@ -86,12 +86,11 @@ ENTRY(kexec_reloc)
movq %rax, (compat_mode_gdt_desc + 2)(%rip)
lgdt compat_mode_gdt_desc(%rip)
- /* Relocate compatibility mode entry point address. */
- leal compatibility_mode(%rip), %eax
- movl %eax, compatibility_mode_far(%rip)
-
/* Enter compatibility mode. */
- ljmp *compatibility_mode_far(%rip)
+ lea compatibility_mode(%rip), %rax
+ push $0x10
+ push %rax
+ lretq
relocate_pages:
/* %rdi - indirection page maddr */
@@ -171,13 +170,6 @@ compatibility_mode:
ud2
.align 4
-compatibility_mode_far:
- .long 0x00000000 /* set in call_32_bit above */
- .word 0x0010
-
- .type compatibility_mode_far, @object
- .size compatibility_mode_far, . - compatibility_mode_far
-
compat_mode_gdt_desc:
.word .Lcompat_mode_gdt_end - compat_mode_gdt -1
.quad 0x0000000000000000 /* set in call_32_bit above */
--
2.30.2
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |