linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/2] x86/jailhouse: improve probing of platform UARTs
@ 2019-10-07 12:38 Ralf Ramsauer
  2019-10-07 12:38 ` [PATCH v5 1/2] x86/jailhouse: improve setup data version comparison Ralf Ramsauer
  2019-10-07 12:38 ` [PATCH v5 2/2] x86/jailhouse: Only enable platform UARTs if available Ralf Ramsauer
  0 siblings, 2 replies; 11+ messages in thread
From: Ralf Ramsauer @ 2019-10-07 12:38 UTC (permalink / raw)
  To: Jan Kiszka, Borislav Petkov, x86, jailhouse-dev, linux-kernel
  Cc: Ingo Molnar, H . Peter Anvin, Ralf Ramsauer

Hi,

probing of platform UARTs is a problem for x86 jailhouse non-root
cells: Linux doesn't know which UARTs belong to the cell and will probe
for all platform UARTs. This crashes the guest if access isn't
permitted. Current workarounds (tuning via 8250.nr_uarts) are hacky and
limited.

But we do have some flags inside setup_data that indicate availability
of UARTs, so simply use it.

  Ralf

since v4:
  - Link: https://lore.kernel.org/r/20190909151030.152012-1-ralf.ramsauer@oth-regensburg.de
          alt: https://www.mail-archive.com/jailhouse-dev@googlegroups.com/msg07483.html
  - rebase and test on latest master and resolve conflicts
  - Add linux-kernel ML

since v3:
  - Link: https://lore.kernel.org/r/20190819183408.988013-1-ralf.ramsauer@oth-regensburg.de
          alt: https://www.mail-archive.com/jailhouse-dev@googlegroups.com/msg07365.html
  - Address Thomas' comments (and it really looks nicer)
  - Address Jan's comment on patch 1 and add his Reviewed-by tag

since v2:
  - Link: https://lore.kernel.org/r/20190812110650.631305-1-ralf.ramsauer@oth-regensburg.de
          alt: https://www.mail-archive.com/jailhouse-dev@googlegroups.com/msg07334.html
  - avoid imbalances of early_memremap and early_memunmap

since v1:
  - Link: https://lore.kernel.org/r/20190802123333.4008-1-ralf.ramsauer@oth-regensburg.de
  -       alt: https://www.mail-archive.com/jailhouse-dev@googlegroups.com/msg07283.html
  - setup data version check wasn't really prepared for extensions of
    the structure. Add a patch that improves the checks.


Ralf Ramsauer (2):
  x86/jailhouse: improve setup data version comparison
  x86/jailhouse: Only enable platform UARTs if available

 arch/x86/include/uapi/asm/bootparam.h |  25 +++--
 arch/x86/kernel/jailhouse.c           | 131 ++++++++++++++++++++------
 2 files changed, 117 insertions(+), 39 deletions(-)

-- 
2.23.0


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

end of thread, other threads:[~2019-10-07 18:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-07 12:38 [PATCH v5 0/2] x86/jailhouse: improve probing of platform UARTs Ralf Ramsauer
2019-10-07 12:38 ` [PATCH v5 1/2] x86/jailhouse: improve setup data version comparison Ralf Ramsauer
2019-10-07 16:25   ` Borislav Petkov
2019-10-07 18:25   ` [tip: x86/platform] x86/jailhouse: Improve " tip-bot2 for Ralf Ramsauer
2019-10-07 12:38 ` [PATCH v5 2/2] x86/jailhouse: Only enable platform UARTs if available Ralf Ramsauer
2019-10-07 15:20   ` Jan Kiszka
2019-10-07 16:26   ` Borislav Petkov
2019-10-07 16:44     ` Ralf Ramsauer
2019-10-07 16:59       ` Borislav Petkov
2019-10-07 18:25   ` [tip: x86/platform] x86/jailhouse: Enable platform UARTs only " tip-bot2 for Ralf Ramsauer
2019-10-07 18:27     ` Ingo Molnar

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).