All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xen-devel] [PATCH 0/6] x86/boot: Remove mappings at 0
@ 2020-01-06 15:54 Andrew Cooper
  2020-01-06 15:54 ` [Xen-devel] [PATCH 1/6] x86/boot: Check for E820_RAM earlier when searching the E820 Andrew Cooper
                   ` (5 more replies)
  0 siblings, 6 replies; 34+ messages in thread
From: Andrew Cooper @ 2020-01-06 15:54 UTC (permalink / raw)
  To: Xen-devel
  Cc: Wei Liu, Andrew Cooper, Julien Grall, Hongyan Xia, Jan Beulich,
	Paul Durrant, David Woodhouse, Roger Pau Monné

This is the (long overdue) series which finally removes the mapping at 0
during early boot, which has bitten us in the past.  It also removes an RWX
gadget which persists past boot in the idle pagetables.

Most of the complexity was down to the differing (and hard-to-follow) uses of
the bootmap.  I first opted to get rid of the bootmap entirely.  While this is
possible for the current Multiboot paths, it is incompatible with the EFI boot
path, and works against David's existing plans to not use the trampoline at
all.

Further ideas: (not addressed here because -ETIME on my behalf.)

1) Get PV-shim to use hypercalls for AP startup, at which point we can compile
   out the trampoline entirely.  This is probably helpful for robustness
   testing in combination with David's plans.

2) Drop BOOTSTRAP_MAP_{BASE,LIMIT} and have bootstrap_map() populate into the
   directmap, as we only request RAM mappings.  This would allow us to drop 3
   of the bootmap pagetables.  However, I'm not entirely convinced the later
   logic will cope with cacheability boundaries forcing the use of small
   mappings.

This series has had complete testing for MB and EFI boot paths.  It turns out
that grub can chainload xen.efi and test those paths.

Andrew Cooper (6):
  x86/boot: Check for E820_RAM earlier when searching the E820
  x86/boot: Map the trampoline as read-only
  x86/boot: Remove the preconstructed low 16M superpage mappings
  x86/boot: Clean up l?_bootmap[] construction
  x86/boot: Don't map 0 during boot
  x86/boot: Drop INVALID_VCPU

 xen/arch/x86/boot/head.S          | 33 +++++++++++++++++----------------
 xen/arch/x86/boot/x86_64.S        | 21 ++++++++++-----------
 xen/arch/x86/cpu/mcheck/mce.c     |  2 +-
 xen/arch/x86/domain_page.c        |  2 +-
 xen/arch/x86/efi/efi-boot.h       | 17 ++++++++++-------
 xen/arch/x86/setup.c              | 24 +++++++++++++++---------
 xen/arch/x86/tboot.c              |  2 +-
 xen/arch/x86/x86_64/asm-offsets.c |  3 ---
 xen/arch/x86/x86_64/mm.c          |  2 +-
 xen/arch/x86/xen.lds.S            |  3 +++
 xen/include/asm-x86/setup.h       |  3 ---
 11 files changed, 59 insertions(+), 53 deletions(-)

-- 
2.11.0


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2020-01-13 12:08 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-06 15:54 [Xen-devel] [PATCH 0/6] x86/boot: Remove mappings at 0 Andrew Cooper
2020-01-06 15:54 ` [Xen-devel] [PATCH 1/6] x86/boot: Check for E820_RAM earlier when searching the E820 Andrew Cooper
2020-01-07 15:12   ` Jan Beulich
2020-01-06 15:54 ` [Xen-devel] [PATCH 2/6] x86/boot: Map the trampoline as read-only Andrew Cooper
2020-01-07 15:21   ` Jan Beulich
2020-01-07 15:51     ` Andrew Cooper
2020-01-07 16:19       ` Jan Beulich
2020-01-07 19:04         ` Andrew Cooper
2020-01-08 11:08           ` Jan Beulich
2020-01-08 15:51             ` Andrew Cooper
2020-01-06 15:54 ` [Xen-devel] [PATCH 3/6] x86/boot: Remove the preconstructed low 16M superpage mappings Andrew Cooper
2020-01-07 15:43   ` Jan Beulich
2020-01-07 17:24     ` Andrew Cooper
2020-01-08 11:23       ` Jan Beulich
2020-01-08 19:41         ` Andrew Cooper
2020-01-09  9:35           ` Jan Beulich
2020-01-06 15:54 ` [Xen-devel] [PATCH 4/6] x86/boot: Clean up l?_bootmap[] construction Andrew Cooper
2020-01-07 16:16   ` Jan Beulich
2020-01-07 16:30     ` Jan Beulich
2020-01-07 18:01       ` Andrew Cooper
2020-01-13 12:08       ` Andrew Cooper
2020-01-07 18:00     ` Andrew Cooper
2020-01-08 11:38       ` Jan Beulich
2020-01-08 16:15         ` Andrew Cooper
2020-01-08 16:55           ` Jan Beulich
2020-01-08 17:09             ` Andrew Cooper
2020-01-09  9:30               ` Jan Beulich
2020-01-06 15:54 ` [Xen-devel] [PATCH 5/6] x86/boot: Don't map 0 during boot Andrew Cooper
2020-01-07 16:35   ` Jan Beulich
2020-01-07 18:03     ` Andrew Cooper
2020-01-06 15:54 ` [Xen-devel] [PATCH 6/6] x86/boot: Drop INVALID_VCPU Andrew Cooper
2020-01-07 16:52   ` Jan Beulich
2020-01-07 18:07     ` Andrew Cooper
2020-01-08 11:44       ` Jan Beulich

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.