All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] target/arm: Fix the TTBR table base address in its 52-bit layout
@ 2026-10-02  7:09 Fuad Tabba
  2026-10-02  7:09 ` [PATCH 1/2] target/arm: Clear TTBR[5:0] from a 52-bit table base address Fuad Tabba
  2026-10-02  7:09 ` [PATCH 2/2] target/arm: Use the 52-bit TTBR base address layout when TCR.DS is set Fuad Tabba
  0 siblings, 2 replies; 9+ messages in thread
From: Fuad Tabba @ 2026-10-02  7:09 UTC (permalink / raw)
  To: Peter Maydell
  Cc: qemu-arm, qemu-devel, Richard Henderson, Will Deacon,
	Itaru Kitayama, Fuad Tabba

Hi folks,

Two fixes to how get_phys_addr_lpae() forms the initial table base
address when TTBR uses its 52-bit layout, each with a TCG test.

The first stops TTBR[5:4] leaking into the base address of a table
smaller than 64 bytes. KVM's page_fault_test hangs on it under TCG in
its 16KB, 52-bit PA guest mode. Itaru reported the 16KB hang on kvmarm
last year [1].

The second uses the 52-bit layout whenever TCR.DS is set, as the
architecture does, not only with a 52-bit OA. With a smaller OA a
non-zero TTBR[5:2] is then an Address size fault.

Based on QEMU master (f7ada39eda).

Cheers,
/fuad

[1] https://lore.kernel.org/kvmarm/B4C0AC3E-6A4F-4A7B-B7BC-81207539115E@linux.dev/

Fuad Tabba (2):
  target/arm: Clear TTBR[5:0] from a 52-bit table base address
  target/arm: Use the 52-bit TTBR base address layout when TCR.DS is set

 target/arm/ptw.c                      |  15 +-
 tests/tcg/aarch64/system/meson.build  |   6 +
 tests/tcg/aarch64/system/ttbr-baddr.c | 194 ++++++++++++++++++++++++++
 3 files changed, 209 insertions(+), 6 deletions(-)
 create mode 100644 tests/tcg/aarch64/system/ttbr-baddr.c

-- 
2.39.5



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

end of thread, other threads:[~2026-10-07  9:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-02  7:09 [PATCH 0/2] target/arm: Fix the TTBR table base address in its 52-bit layout Fuad Tabba
2026-10-02  7:09 ` [PATCH 1/2] target/arm: Clear TTBR[5:0] from a 52-bit table base address Fuad Tabba
2026-10-05 20:06   ` Gustavo Romero
2026-10-05 21:44     ` Fuad Tabba
2026-10-06  9:03       ` Peter Maydell
2026-10-06  9:27         ` Fuad Tabba
2026-10-02  7:09 ` [PATCH 2/2] target/arm: Use the 52-bit TTBR base address layout when TCR.DS is set Fuad Tabba
2026-10-06 11:24   ` Peter Maydell
2026-10-06 13:20     ` Fuad Tabba

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.