x86/boot: Fold gdt_48 into the bottom of trampoline_gdt
diff mbox series

Message ID 20191227130310.27887-1-andrew.cooper3@citrix.com
State New
Headers show
Series
  • x86/boot: Fold gdt_48 into the bottom of trampoline_gdt
Related show

Commit Message

Andrew Cooper Dec. 27, 2019, 1:03 p.m. UTC
Saves 8 bytes in the trampoline.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: Wei Liu <wl@xen.org>
CC: Roger Pau Monné <roger.pau@citrix.com>
---
 xen/arch/x86/boot/trampoline.S | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

Comments

Jan Beulich Dec. 27, 2019, 1:55 p.m. UTC | #1
On 27.12.2019 14:03, Andrew Cooper wrote:
> Saves 8 bytes in the trampoline.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>

Patch
diff mbox series

diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S
index ef5baa31e0..4b9a9697e9 100644
--- a/xen/arch/x86/boot/trampoline.S
+++ b/xen/arch/x86/boot/trampoline.S
@@ -139,12 +139,13 @@  start64:
         .balign 8
         .word   0
 idt_48: .word   0, 0, 0 # base = limit = 0
-        .word   0
-gdt_48: .word   .Ltrampoline_gdt_end - trampoline_gdt - 1
-        .long   bootsym_rel(trampoline_gdt,4)
 
 trampoline_gdt:
-        .quad   0x0000000000000000 /* 0x0000: unused */
+        .word   0                  /* 0x0000: unused (reused for GDTR) */
+gdt_48:
+        .word   .Ltrampoline_gdt_end - trampoline_gdt - 1
+        .long   bootsym_rel(trampoline_gdt, 4)
+
         .quad   0x00cf9b000000ffff /* 0x0008: ring 0 code, 32-bit mode */
         .quad   0x00af9b000000ffff /* 0x0010: ring 0 code, 64-bit mode */
         .quad   0x00cf93000000ffff /* 0x0018: ring 0 data */