From: David Woodhouse <dwmw2@infradead.org>
To: xen-devel@lists.xenproject.org
Subject: [RFC PATCH v2 0/7] Clean up x86_64 boot code
Date: Wed, 1 May 2019 20:39:18 +0100 [thread overview]
Message-ID: <cover.1556739159.git.dwmw2@infradead.org> (raw)
Some cleanups for the boot path, originally inspired by an attempt to
avoid scribbling on arbitrarily-chosen low memory.
In the no-real-mode case we don't need to bounce through low memory at
all; we can run the 32-bit trampoline in-place in the Xen image.
The variables containing information which is optionally discovered by
the real-mode boot code can be put back in place in the Xen image and we
can dispense with the bootsym() pointer gymnastics in C code which
access them in low memory.
Next up is killing reloc(), which AFAICT only exists to ensure that
the various breadcrumbs left all over the place by the Multiboot
bootloader aren't scribbled on when we copy the 16-bit boot trampoline
into low memory. Except that it's copying it out of the way... into
the top of low memory. Suspect if I tell kexec to put a segment there,
it's going to fail quite horribly.
Which leaves me with no valid reason for reloc() to be running this
early, so I may well kill it with fire too. I just need to find a
safe location for the 16-bit boot code.
v2: Fix wake code. Thanks Andy for testing.
David Woodhouse (7):
x86/wakeup: Stop using %fs for lidt/lgdt
x86/boot: Remove gratuitous call back into low-memory code
x86/boot: Only jump into low trampoline code for real-mode boot
x86/boot: Split bootsym() into four types of relocations
x86/boot: Rename trampoline_{start,end} to boot_trampoline_{start,end}
x86/boot: Copy 16-bit boot variables back up to Xen image
x86/boot: Do not use trampoline for no-real-mode boot paths
xen/arch/x86/acpi/power.c | 6 +-
xen/arch/x86/boot/edd.S | 18 ++--
xen/arch/x86/boot/head.S | 89 ++++++++++++------
xen/arch/x86/boot/mem.S | 35 +++-----
xen/arch/x86/boot/trampoline.S | 145 +++++++++++++++++++++++-------
xen/arch/x86/boot/video.S | 36 ++++----
xen/arch/x86/boot/wakeup.S | 23 ++---
xen/arch/x86/cpu/common.c | 2 +-
xen/arch/x86/cpu/intel.c | 2 +-
xen/arch/x86/efi/efi-boot.h | 31 +------
xen/arch/x86/mm.c | 2 +-
xen/arch/x86/platform_hypercall.c | 18 ++--
xen/arch/x86/setup.c | 72 ++++++++++++---
xen/arch/x86/smpboot.c | 6 +-
xen/arch/x86/tboot.c | 6 +-
xen/arch/x86/x86_64/mm.c | 2 +-
xen/arch/x86/xen.lds.S | 27 ++++--
xen/include/asm-x86/acpi.h | 2 +-
xen/include/asm-x86/config.h | 10 +--
xen/include/asm-x86/e820.h | 5 +-
xen/include/asm-x86/edd.h | 1 -
21 files changed, 339 insertions(+), 199 deletions(-)
--
2.17.2
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
WARNING: multiple messages have this Message-ID (diff)
From: David Woodhouse <dwmw2@infradead.org>
To: xen-devel@lists.xenproject.org
Subject: [Xen-devel] [RFC PATCH v2 0/7] Clean up x86_64 boot code
Date: Wed, 1 May 2019 20:39:18 +0100 [thread overview]
Message-ID: <cover.1556739159.git.dwmw2@infradead.org> (raw)
Message-ID: <20190501193918.m_-IYTaf-5oAh3gAQCn7MMODdiTFFuCLddkoQ7Mwlkw@z> (raw)
Some cleanups for the boot path, originally inspired by an attempt to
avoid scribbling on arbitrarily-chosen low memory.
In the no-real-mode case we don't need to bounce through low memory at
all; we can run the 32-bit trampoline in-place in the Xen image.
The variables containing information which is optionally discovered by
the real-mode boot code can be put back in place in the Xen image and we
can dispense with the bootsym() pointer gymnastics in C code which
access them in low memory.
Next up is killing reloc(), which AFAICT only exists to ensure that
the various breadcrumbs left all over the place by the Multiboot
bootloader aren't scribbled on when we copy the 16-bit boot trampoline
into low memory. Except that it's copying it out of the way... into
the top of low memory. Suspect if I tell kexec to put a segment there,
it's going to fail quite horribly.
Which leaves me with no valid reason for reloc() to be running this
early, so I may well kill it with fire too. I just need to find a
safe location for the 16-bit boot code.
v2: Fix wake code. Thanks Andy for testing.
David Woodhouse (7):
x86/wakeup: Stop using %fs for lidt/lgdt
x86/boot: Remove gratuitous call back into low-memory code
x86/boot: Only jump into low trampoline code for real-mode boot
x86/boot: Split bootsym() into four types of relocations
x86/boot: Rename trampoline_{start,end} to boot_trampoline_{start,end}
x86/boot: Copy 16-bit boot variables back up to Xen image
x86/boot: Do not use trampoline for no-real-mode boot paths
xen/arch/x86/acpi/power.c | 6 +-
xen/arch/x86/boot/edd.S | 18 ++--
xen/arch/x86/boot/head.S | 89 ++++++++++++------
xen/arch/x86/boot/mem.S | 35 +++-----
xen/arch/x86/boot/trampoline.S | 145 +++++++++++++++++++++++-------
xen/arch/x86/boot/video.S | 36 ++++----
xen/arch/x86/boot/wakeup.S | 23 ++---
xen/arch/x86/cpu/common.c | 2 +-
xen/arch/x86/cpu/intel.c | 2 +-
xen/arch/x86/efi/efi-boot.h | 31 +------
xen/arch/x86/mm.c | 2 +-
xen/arch/x86/platform_hypercall.c | 18 ++--
xen/arch/x86/setup.c | 72 ++++++++++++---
xen/arch/x86/smpboot.c | 6 +-
xen/arch/x86/tboot.c | 6 +-
xen/arch/x86/x86_64/mm.c | 2 +-
xen/arch/x86/xen.lds.S | 27 ++++--
xen/include/asm-x86/acpi.h | 2 +-
xen/include/asm-x86/config.h | 10 +--
xen/include/asm-x86/e820.h | 5 +-
xen/include/asm-x86/edd.h | 1 -
21 files changed, 339 insertions(+), 199 deletions(-)
--
2.17.2
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next reply other threads:[~2019-05-01 19:39 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-01 19:39 David Woodhouse [this message]
2019-05-01 19:39 ` [Xen-devel] [RFC PATCH v2 0/7] Clean up x86_64 boot code David Woodhouse
2019-05-01 19:39 ` [RFC PATCH v2 1/7] x86/wakeup: Stop using %fs for lidt/lgdt David Woodhouse
2019-05-01 19:39 ` [Xen-devel] " David Woodhouse
2019-05-01 19:39 ` [RFC PATCH v2 2/7] x86/boot: Remove gratuitous call back into low-memory code David Woodhouse
2019-05-01 19:39 ` [Xen-devel] " David Woodhouse
2019-05-01 19:39 ` [RFC PATCH v2 3/7] x86/boot: Only jump into low trampoline code for real-mode boot David Woodhouse
2019-05-01 19:39 ` [Xen-devel] " David Woodhouse
2019-05-01 19:39 ` [RFC PATCH v2 4/7] x86/boot: Split bootsym() into four types of relocations David Woodhouse
2019-05-01 19:39 ` [Xen-devel] " David Woodhouse
2019-05-01 19:39 ` [RFC PATCH v2 5/7] x86/boot: Rename trampoline_{start, end} to boot_trampoline_{start, end} David Woodhouse
2019-05-01 19:39 ` [Xen-devel] " David Woodhouse
2019-05-01 19:39 ` [RFC PATCH v2 6/7] x86/boot: Copy 16-bit boot variables back up to Xen image David Woodhouse
2019-05-01 19:39 ` [Xen-devel] " David Woodhouse
2019-05-01 19:39 ` [RFC PATCH v2 7/7] x86/boot: Do not use trampoline for no-real-mode boot paths David Woodhouse
2019-05-01 19:39 ` [Xen-devel] " David Woodhouse
2019-05-01 19:46 ` [RFC PATCH v2 0/7] Clean up x86_64 boot code David Woodhouse
2019-05-01 19:46 ` [Xen-devel] " 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=cover.1556739159.git.dwmw2@infradead.org \
--to=dwmw2@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.