All of lore.kernel.org
 help / color / mirror / Atom feed
* EFI's -mapbs option may cause Linux to panic()
@ 2022-11-21 16:27 Jan Beulich
  2022-11-21 16:48 ` Roger Pau Monné
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Beulich @ 2022-11-21 16:27 UTC (permalink / raw)
  To: xen-devel@lists.xenproject.org
  Cc: Roger Pau Monné, Juergen Gross, Andrew Cooper

Hello,

on a system with these first two EFI memory map entries

(XEN)  0000000000000-000000009dfff type=4 attr=000000000000000f
(XEN)  000000009e000-000000009ffff type=2 attr=000000000000000f

i.e. except for 2 pages all space below 1M being BootServicesData, the
-mapbs option has the effect of marking reserved all that space. Then
Linux fails trying to allocate its lowmem trampoline (which really it
shouldn't need when running in PV mode), ultimately leading to

		panic("Real mode trampoline was not allocated");

in their init_real_mode().

While for PV I think it is clear that the easiest is to avoid
trampoline setup in the first place, iirc PVH Dom0 also tries to
mirror the host memory map to its own address space. Does PVH Linux
require a lowmem trampoline?

While the two pages here are just enough for Xen's trampoline, I still
wonder whether we want to adjust -mapbs behavior. Since whatever we
might do leaves a risk of conflicting with true firmware (mis)use of
that space, the best I can think of right now would be another option
altering behavior (or providing altered behavior). Yet such an option
would likely need to be more fine-grained then than covering all of
the low Mb in one go. Which feels like both going too far and making
it awkward for people to figure out what value(s) to use ...

Thoughts anyone?

Thanks, Jan


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

end of thread, other threads:[~2022-11-23 10:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-21 16:27 EFI's -mapbs option may cause Linux to panic() Jan Beulich
2022-11-21 16:48 ` Roger Pau Monné
2022-11-21 17:01   ` Jan Beulich
2022-11-22  9:47     ` Roger Pau Monné
2022-11-23  7:39       ` Juergen Gross
2022-11-23  9:18         ` Jan Beulich
2022-11-23 10:18           ` Juergen Gross

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.