All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH 0/8] x86: fixes for running KUT as EFI on non-QEMU KVM hosts
@ 2026-06-09 14:08 Giacomo Mazzola
  2026-06-09 14:08 ` [kvm-unit-tests PATCH 1/8] x86: efi: use PER_CPU_SIZE for per-CPU stack allocation Giacomo Mazzola
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Giacomo Mazzola @ 2026-06-09 14:08 UTC (permalink / raw)
  To: kvm; +Cc: Giacomo Mazzola

This series fixes several issues encountered when running KUT x86 tests
as EFI applications on a KVM-based hypervisor that lacks any ad-hoc
para-virtualized interface (e.g. fw_cfg), on arbitrary VM shapes
(variable CPU count and memory size).

Patches 1-4 fix crashes and faults:
  - Stack size mismatch between EFI and non-EFI paths
  - Memory allocator selecting regions above the 4 GiB identity map
  - #GP on systems without a PMU
  - ISR thunks using rel32 jumps that overflow beyond 2 GiB

Patches 5-6 fix SMP bringup:
  - Replace per-AP serial prints that cause watchdog timeouts on
    large systems
  - Add timeout-based AP detection when fw_cfg is unavailable

Patches 7-8 fix EFI command line handling:
  - Correct the load_options_size byte-to-character conversion
  - Add KUT_ENV= parsing for passing environment variables via
    UEFI load options

The target environment is running KUT as UEFI applications on a
KVM-based hypervisor without ad-hoc PV interfaces, on arbitrary VM
shapes.

Regression-tested by running the full KUT suite under QEMU+KVM+OVMF,
in both ./configure and ./configure --enable-efi. Results are
identical with and without this series.

Giacomo Mazzola (8):
  x86: efi: use PER_CPU_SIZE for per-CPU stack allocation
  x86: fix EFI memory allocator to clamp regions to 4 GiB
  x86: skip PMU init when no PMU is advertised
  x86: fix ISR thunk to use absolute indirect jump
  x86: replace per-AP bringup prints with a single summary line
  x86: add timeout-based SMP bringup when fw_cfg is unavailable
  efi: fix load_options_size conversion to character count
  efi: parse KUT_ENV= from load options into environ

 lib/efi.c            | 39 +++++++++++++++++++++++++++++++++++++--
 lib/x86/apic.c       |  1 -
 lib/x86/isr.c        |  8 +++++---
 lib/x86/setup.c      | 24 ++++++++++++++++++++----
 lib/x86/smp.c        | 31 +++++++++++++++++++++++++++----
 x86/efi/efistart64.S |  2 +-
 6 files changed, 90 insertions(+), 15 deletions(-)

-- 
2.47.3




Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christof Hellmis, Andreas Stieger
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597

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

end of thread, other threads:[~2026-06-25 14:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-09 14:08 [kvm-unit-tests PATCH 0/8] x86: fixes for running KUT as EFI on non-QEMU KVM hosts Giacomo Mazzola
2026-06-09 14:08 ` [kvm-unit-tests PATCH 1/8] x86: efi: use PER_CPU_SIZE for per-CPU stack allocation Giacomo Mazzola
2026-06-09 14:08 ` [kvm-unit-tests PATCH 2/8] x86: fix EFI memory allocator to clamp regions to 4 GiB Giacomo Mazzola
2026-06-09 14:08 ` [kvm-unit-tests PATCH 3/8] x86: skip PMU init when no PMU is advertised Giacomo Mazzola
2026-06-09 14:08 ` [kvm-unit-tests PATCH 4/8] x86: fix ISR thunk to use absolute indirect jump Giacomo Mazzola
2026-06-09 14:08 ` [kvm-unit-tests PATCH 5/8] x86: replace per-AP bringup prints with a single summary line Giacomo Mazzola
2026-06-09 14:08 ` [kvm-unit-tests PATCH 6/8] x86: add timeout-based SMP bringup when fw_cfg is unavailable Giacomo Mazzola
2026-06-09 14:08 ` [kvm-unit-tests PATCH 7/8] efi: fix load_options_size conversion to character count Giacomo Mazzola
2026-06-10 16:09   ` Andrew Jones
2026-06-09 14:09 ` [kvm-unit-tests PATCH 8/8] efi: parse KUT_ENV= from load options into environ Giacomo Mazzola
2026-06-10 18:18   ` Andrew Jones
2026-06-25 14:04   ` [kvm-unit-tests PATCH v2 8/8] lib: parse KUT_ENV= from command line " Giacomo Mazzola

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.