summaryrefslogtreecommitdiff
path: root/rust/alloc/collections/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorFuad Tabba <tabba@google.com>2026-01-09 08:22:15 +0000
committerMarc Zyngier <maz@kernel.org>2026-01-15 13:39:53 +0000
commitdd0c5d04d13cae8ff2694ef83d1ae5804d6d9798 (patch)
treede63ccb9f5099f7e9d07579fab8c63e054e8ea3e /rust/alloc/collections/git@git.tavy.me:linux.git
parent7e03d07d03a486c66d5c084c7185b1bef29049e9 (diff)
KVM: arm64: selftests: Fix incorrect rounding in page_align()
The implementation of `page_align()` in `processor.c` calculates alignment incorrectly for values that are already aligned. Specifically, `(v + vm->page_size) & ~(vm->page_size - 1)` aligns to the *next* page boundary even if `v` is already page-aligned, potentially wasting a page of memory. Fix the calculation to use standard alignment logic: `(v + vm->page_size - 1) & ~(vm->page_size - 1)`. Fixes: 7a6629ef746d ("kvm: selftests: add virt mem support for aarch64") Reviewed-by: Andrew Jones <andrew.jones@linux.dev> Signed-off-by: Fuad Tabba <tabba@google.com> Link: https://patch.msgid.link/20260109082218.3236580-3-tabba@google.com Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'rust/alloc/collections/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions