Skip to content

Commit

Permalink
x86/entry: move .init.text section higher up in the code for readability
Browse files Browse the repository at this point in the history
.init.text is a small section currently located amongst .text.entry
code. Move it above .text.entry.

This has no functional change but makes the code a bit more readable.

Suggested-by: Andrew Cooper <[email protected]>
Signed-off-by: Jane Malalane <[email protected]>
Reviewed-by: Jan Beulich <[email protected]>
  • Loading branch information
janeyasmin authored and jbeulich committed Aug 18, 2022
1 parent f2d947a commit fe3f507
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions xen/arch/x86/x86_64/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ process_trap:
call create_bounce_frame
jmp test_all_events

.section .init.text, "ax", @progbits
ENTRY(early_page_fault)
ENDBR64
movl $TRAP_page_fault, 4(%rsp)
SAVE_ALL
movq %rsp, %rdi
call do_early_page_fault
jmp restore_all_xen

.section .text.entry, "ax", @progbits

/* %rbx: struct vcpu, interrupts disabled */
Expand Down Expand Up @@ -982,16 +991,6 @@ ENTRY(double_fault)
call do_double_fault
BUG /* do_double_fault() shouldn't return. */

.pushsection .init.text, "ax", @progbits
ENTRY(early_page_fault)
ENDBR64
movl $TRAP_page_fault,4(%rsp)
SAVE_ALL
movq %rsp,%rdi
call do_early_page_fault
jmp restore_all_xen
.popsection

ENTRY(nmi)
ENDBR64
pushq $0
Expand Down

0 comments on commit fe3f507

Please sign in to comment.