From: Fuad Tabba <tabba@google.com>
To: kvm@vger.kernel.org, kvm-riscv@lists.infradead.org,
kvmarm@lists.linux.dev, linux-arm-kernel@lists.infradead.org
Cc: maz@kernel.org, oliver.upton@linux.dev, joey.gouly@arm.com,
suzuki.poulose@arm.com, yuzenghui@huawei.com, will@kernel.org,
pbonzini@redhat.com, shuah@kernel.org, anup@brainfault.org,
itaru.kitayama@fujitsu.com, andrew.jones@linux.dev,
tabba@google.com
Subject: [PATCH v3 0/5] KVM: selftests: Alignment fixes and arm64 MMU cleanup
Date: Tue, 6 Jan 2026 09:24:20 +0000 [thread overview]
Message-ID: <20260106092425.1529428-1-tabba@google.com> (raw)
Changes from v2 [1]:
- Collected Reviewed-by tags from the previous version (thanks!)
- Rebased on 6.19-rc4
- No code changes
This series tidies up a few things in the KVM selftests. It addresses an
error in memory alignment, hardens the arm64 MMU configuration for
selftests, and fixes minor documentation issues.
First, for arm64, the series explicitly disables translation table walks
for the unused upper virtual address range (TTBR1). Since selftests run
entirely in the lower range (TTBR0), leaving TTBR1 uninitialized but
active could lead to unpredictable behavior if guest code accesses high
addresses. We set EPD1 (and TBI1) to ensure such accesses
deterministically generate translation faults.
Second, the series fixes the `page_align()` implementation in both arm64
and riscv. The previous version incorrectly rounded up already-aligned
addresses to the *next* page, potentially wasting memory or causing
unexpected gaps. After fixing the logic in the arch-specific files, the
function is moved to the common `kvm_util.h` header to eliminate code
duplication.
Finally, a few comments and argument descriptions in `kvm_util` are
updated to match the actual code implementation.
Based on Linux 6.19-rc4.
Cheers,
/fuad
[1] https://lore.kernel.org/all/20251215165155.3451819-1-tabba@google.com/
Fuad Tabba (5):
KVM: arm64: selftests: Disable unused TTBR1_EL1 translations
KVM: arm64: selftests: Fix incorrect rounding in page_align()
KVM: riscv: selftests: Fix incorrect rounding in page_align()
KVM: selftests: Move page_align() to shared header
KVM: selftests: Fix typos and stale comments in kvm_util
tools/testing/selftests/kvm/include/arm64/processor.h | 4 ++++
tools/testing/selftests/kvm/include/kvm_util.h | 9 +++++++--
tools/testing/selftests/kvm/lib/arm64/processor.c | 7 ++-----
tools/testing/selftests/kvm/lib/kvm_util.c | 2 +-
tools/testing/selftests/kvm/lib/riscv/processor.c | 5 -----
5 files changed, 14 insertions(+), 13 deletions(-)
base-commit: 9ace4753a5202b02191d54e9fdf7f9e3d02b85eb
--
2.52.0.351.gbe84eed79e-goog
next reply other threads:[~2026-01-06 9:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-06 9:24 Fuad Tabba [this message]
2026-01-06 9:24 ` [PATCH v3 1/5] KVM: arm64: selftests: Disable unused TTBR1_EL1 translations Fuad Tabba
2026-01-06 9:24 ` [PATCH v3 2/5] KVM: arm64: selftests: Fix incorrect rounding in page_align() Fuad Tabba
2026-01-06 9:24 ` [PATCH v3 3/5] KVM: riscv: " Fuad Tabba
2026-01-06 9:24 ` [PATCH v3 4/5] KVM: selftests: Move page_align() to shared header Fuad Tabba
2026-01-06 19:46 ` Sean Christopherson
2026-01-06 19:48 ` Fuad Tabba
2026-01-06 9:24 ` [PATCH v3 5/5] KVM: selftests: Fix typos and stale comments in kvm_util Fuad Tabba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260106092425.1529428-1-tabba@google.com \
--to=tabba@google.com \
--cc=andrew.jones@linux.dev \
--cc=anup@brainfault.org \
--cc=itaru.kitayama@fujitsu.com \
--cc=joey.gouly@arm.com \
--cc=kvm-riscv@lists.infradead.org \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.linux.dev \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maz@kernel.org \
--cc=oliver.upton@linux.dev \
--cc=pbonzini@redhat.com \
--cc=shuah@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
--cc=yuzenghui@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox