From: David Woodhouse <dwmw2@infradead.org>
To: xen-devel@lists.xenproject.org
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Wei Liu" <wl@xen.org>, "Jan Beulich" <jbeulich@suse.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [Xen-devel] [PATCH v3 1/5] x86/boot: Only jump into low trampoline code for real-mode boot
Date: Wed, 21 Aug 2019 17:35:38 +0100 [thread overview]
Message-ID: <20190821163542.172063-1-dwmw2@infradead.org> (raw)
In-Reply-To: <012a0e6de52d8a0ad50b0b784362cf509768990e.camel@infradead.org>
From: David Woodhouse <dwmw@amazon.co.uk>
If the no-real-mode flag is set, don't go there at all. This is a prelude
to not even putting it there in the first place.
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
---
xen/arch/x86/boot/head.S | 10 ++++++++++
xen/arch/x86/boot/trampoline.S | 4 ----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/xen/arch/x86/boot/head.S b/xen/arch/x86/boot/head.S
index 26b680521d..d303379083 100644
--- a/xen/arch/x86/boot/head.S
+++ b/xen/arch/x86/boot/head.S
@@ -727,7 +727,17 @@ trampoline_setup:
/* Switch to low-memory stack which lives at the end of trampoline region. */
mov sym_fs(trampoline_phys),%edi
lea TRAMPOLINE_SPACE+TRAMPOLINE_STACK_SPACE(%edi),%esp
+ cmpb $0, sym_fs(skip_realmode)
+ jz 1f
+ /* If no-real-mode, jump straight to trampoline_protmode_entry */
+ lea trampoline_protmode_entry-trampoline_start(%edi),%eax
+ /* EBX == 0 indicates we are the BP (Boot Processor). */
+ xor %ebx,%ebx
+ jmp 2f
+1:
+ /* Go via 16-bit code in trampoline_boot_cpu_entry */
lea trampoline_boot_cpu_entry-trampoline_start(%edi),%eax
+2:
pushl $BOOT_CS32
push %eax
diff --git a/xen/arch/x86/boot/trampoline.S b/xen/arch/x86/boot/trampoline.S
index 7c6a2328d2..429a088b19 100644
--- a/xen/arch/x86/boot/trampoline.S
+++ b/xen/arch/x86/boot/trampoline.S
@@ -194,9 +194,6 @@ gdt_48: .word 6*8-1
.code32
trampoline_boot_cpu_entry:
- cmpb $0,bootsym_rel(skip_realmode,5)
- jnz .Lskip_realmode
-
/* Load pseudo-real-mode segments. */
mov $BOOT_PSEUDORM_DS,%eax
mov %eax,%ds
@@ -276,7 +273,6 @@ trampoline_boot_cpu_entry:
mov %eax,%gs
mov %eax,%ss
-.Lskip_realmode:
/* EBX == 0 indicates we are the BP (Boot Processor). */
xor %ebx,%ebx
--
2.21.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-08-21 16:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 16:35 [Xen-devel] [PATCH v3 0/5] Clean up x86_64 boot code David Woodhouse
2019-08-21 16:35 ` David Woodhouse [this message]
2019-08-21 16:35 ` [Xen-devel] [PATCH v3 2/5] x86/boot: Split bootsym() into four types of relocations David Woodhouse
2019-08-30 15:10 ` Jan Beulich
2019-08-30 16:12 ` David Woodhouse
2019-09-02 7:37 ` Jan Beulich
2019-08-21 16:35 ` [Xen-devel] [PATCH v3 3/5] x86/boot: Rename trampoline_{start, end} to boot_trampoline_{start, end} David Woodhouse
2019-08-21 16:35 ` [Xen-devel] [PATCH v3 4/5] x86/boot: Copy 16-bit boot variables back up to Xen image David Woodhouse
2019-08-30 15:43 ` Jan Beulich
2019-08-30 16:25 ` David Woodhouse
2019-09-02 7:44 ` Jan Beulich
2019-09-02 12:51 ` David Woodhouse
2019-09-02 13:47 ` Jan Beulich
2019-09-02 13:52 ` David Woodhouse
2019-09-02 14:10 ` Jan Beulich
2019-08-21 16:35 ` [Xen-devel] [PATCH v3 5/5] x86/boot: Do not use trampoline for no-real-mode boot paths David Woodhouse
2019-09-02 8:54 ` Jan Beulich
2019-08-30 14:25 ` [Xen-devel] [PATCH v3 1/5] x86/boot: Only jump into low trampoline code for real-mode boot Jan Beulich
2019-08-30 14:28 ` David Woodhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190821163542.172063-1-dwmw2@infradead.org \
--to=dwmw2@infradead.org \
--cc=andrew.cooper3@citrix.com \
--cc=jbeulich@suse.com \
--cc=roger.pau@citrix.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).