Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

KVM: selftests: Rename vm_vaddr_populate_bitmap() => vm_populate_gva_bitmap()

Now that KVM selftests use gva_t instead of vm_vaddr_t, rename the helper
for populating the initial GVA bitmap to drop the defunct terminology and
use "vm" for the scope.

Opportunistically fixup the declaration of the API, which has been broken
since day 1. The flaw went unnoticed because the sole caller is defined
after the weak version, i.e. can see the prototype without a previous
declaration.

No functional change intended.

Fixes: e8b9a055fa04 ("KVM: arm64: selftests: Align VA space allocator with TTBR0")
Link: https://patch.msgid.link/20260420212004.3938325-14-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>

+4 -4
+1 -1
tools/testing/selftests/kvm/include/kvm_util.h
··· 714 714 void vm_mem_region_move(struct kvm_vm *vm, u32 slot, u64 new_gpa); 715 715 void vm_mem_region_delete(struct kvm_vm *vm, u32 slot); 716 716 struct kvm_vcpu *__vm_vcpu_add(struct kvm_vm *vm, u32 vcpu_id); 717 - void vm_populate_vaddr_bitmap(struct kvm_vm *vm); 717 + void vm_populate_gva_bitmap(struct kvm_vm *vm); 718 718 gva_t vm_unused_gva_gap(struct kvm_vm *vm, size_t sz, gva_t vaddr_min); 719 719 gva_t vm_alloc(struct kvm_vm *vm, size_t sz, gva_t vaddr_min); 720 720 gva_t __vm_alloc(struct kvm_vm *vm, size_t sz, gva_t vaddr_min,
+1 -1
tools/testing/selftests/kvm/lib/arm64/processor.c
··· 671 671 guest_modes_append_default(); 672 672 } 673 673 674 - void vm_vaddr_populate_bitmap(struct kvm_vm *vm) 674 + void vm_populate_gva_bitmap(struct kvm_vm *vm) 675 675 { 676 676 /* 677 677 * arm64 selftests use only TTBR0_EL1, meaning that the valid VA space
+2 -2
tools/testing/selftests/kvm/lib/kvm_util.c
··· 267 267 * based on the MSB of the VA. On architectures with this behavior 268 268 * the VA region spans [0, 2^(va_bits - 1)), [-(2^(va_bits - 1), -1]. 269 269 */ 270 - __weak void vm_vaddr_populate_bitmap(struct kvm_vm *vm) 270 + __weak void vm_populate_gva_bitmap(struct kvm_vm *vm) 271 271 { 272 272 sparsebit_set_num(vm->vpages_valid, 273 273 0, (1ULL << (vm->va_bits - 1)) >> vm->page_shift); ··· 385 385 386 386 /* Limit to VA-bit canonical virtual addresses. */ 387 387 vm->vpages_valid = sparsebit_alloc(); 388 - vm_vaddr_populate_bitmap(vm); 388 + vm_populate_gva_bitmap(vm); 389 389 390 390 /* Limit physical addresses to PA-bits. */ 391 391 vm->max_gfn = vm_compute_max_gfn(vm);