KVM: selftests: Address extra memslot parameters in vm_vaddr_alloc
PATCH 1/1 KVM: selftests: Address extra memslot parameters in vm_vaddr_alloc
Commit a75a895e6457 ("KVM: selftests: Unconditionally use memslot 0 for vaddr allocations") removed the memslot parameters from vm_vaddr_alloc. It addressed all callers except one under lib/aarch64/, due to a race with commit e3db7579ef35 ("KVM: selftests: Add exception handling support for aarch64")
Fix the vm_vaddr_alloc call in lib/aarch64/processor.c.
--- tools/testing/selftests/kvm/lib/aarch64/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/kvm/lib/aarch64/processor.c +1 -1
@@ -401,7 +401,7 @@ void route_exception(struct ex_regs *regs, int vector)void vm_init_descriptor_tables (struct kvm_vm *vm) { vm->handlers =vm_vaddr_alloc (vm,sizeof (struct handlers ), - vm->page_size,0 ,0 ); + vm->page_size); *(vm_vaddr_t *)addr_gva2hva (vm, (vm_vaddr_t)(&exception_handlers)) = vm->handlers; }
Signature · 1 line
2.32.0.93.g670b81a890-goog
Hi Ricardo,
Quoted 10 lines · Ricardo Koller
Commit
a75a895e6457("KVM: selftests: Unconditionally use memslot 0 for vaddr allocations") removed the memslot parameters fromvm_vaddr_alloc. It addressed all callers except one underlib/aarch64/, due to a race with commite3db7579ef35("KVM: selftests: Add exception handling support for aarch64")Fix the
vm_vaddr_alloccall inlib/aarch64/processor.c.Reported-by Zenghui Yu <[email protected]>Signed-off-by Ricardo Koller <[email protected]>
Eric
Quoted 18 lines
--- tools/testing/selftests/kvm/lib/aarch64/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/kvm/lib/aarch64/processor.c +1
-1@@ -401,7 +401,7 @@ void route_exception(struct ex_regs *regs, int vector)void vm_init_descriptor_tables (struct kvm_vm *vm) { vm->handlers =vm_vaddr_alloc (vm,sizeof (struct handlers ), - vm->page_size,0 ,0 ); + vm->page_size); *(vm_vaddr_t *)addr_gva2hva (vm, (vm_vaddr_t)(&exception_handlers)) = vm->handlers; }
Quoted 20 lines · Ricardo Koller
Commit
a75a895e6457("KVM: selftests: Unconditionally use memslot 0 for vaddr allocations") removed the memslot parameters fromvm_vaddr_alloc. It addressed all callers except one underlib/aarch64/, due to a race with commite3db7579ef35("KVM: selftests: Add exception handling support for aarch64")Fix the
vm_vaddr_alloccall inlib/aarch64/processor.c.Reported-by Zenghui Yu <[email protected]>Signed-off-by Ricardo Koller <[email protected]>--- tools/testing/selftests/kvm/lib/aarch64/processor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/kvm/lib/aarch64/processor.c +0
-0
tools/testing/selftests/kvm/lib/aarch64/processor.c void route_exception(struct ex_regs *regs, int vector) · line 407
Quoted 8 lines
tools/testing/selftests/kvm/lib/aarch64/processor.c +1
-1@@ -401,7 +401,7 @@ void route_exception(struct ex_regs *regs, int vector)void vm_init_descriptor_tables (struct kvm_vm *vm) { vm->handlers =vm_vaddr_alloc (vm,sizeof (struct handlers ), - vm->page_size,0 ,0 ); + vm->page_size); *(vm_vaddr_t *)addr_gva2hva (vm, (vm_vaddr_t)(&exception_handlers)) = vm->handlers; }
Queued, thanks.
Paolo