summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/lib/aarch64
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-10-06 00:34:08 +0000
committerSean Christopherson <seanjc@google.com>2022-11-16 16:58:53 -0800
commit28a65567acb51759079adf5c6e3fcd047cda8120 (patch)
tree86f6d7389f4f4c15be3f6b15bc7e2abd04996bdd /tools/testing/selftests/kvm/lib/aarch64
parent03b4750533fc6519845ac2ca0e1d88a81ac260a1 (diff)
KVM: selftests: Drop now-unnecessary ucall_uninit()
Drop ucall_uninit() and ucall_arch_uninit() now that ARM doesn't modify the host's copy of ucall_exit_mmio_addr, i.e. now that there's no need to reset the pointer before potentially creating a new VM. The few calls to ucall_uninit() are all immediately followed by kvm_vm_free(), and that is likely always going to hold true, i.e. it's extremely unlikely a test will want to effectively disable ucall in the middle of a test. Reviewed-by: Andrew Jones <andrew.jones@linux.dev> Tested-by: Peter Gonda <pgonda@google.com> Signed-off-by: Sean Christopherson <seanjc@google.com> Link: https://lore.kernel.org/r/20221006003409.649993-7-seanjc@google.com
Diffstat (limited to 'tools/testing/selftests/kvm/lib/aarch64')
-rw-r--r--tools/testing/selftests/kvm/lib/aarch64/ucall.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/tools/testing/selftests/kvm/lib/aarch64/ucall.c b/tools/testing/selftests/kvm/lib/aarch64/ucall.c
index 1c38bd260f90..21d73afcb14f 100644
--- a/tools/testing/selftests/kvm/lib/aarch64/ucall.c
+++ b/tools/testing/selftests/kvm/lib/aarch64/ucall.c
@@ -12,23 +12,13 @@
*/
static vm_vaddr_t *ucall_exit_mmio_addr;
-static void ucall_set_mmio_addr(struct kvm_vm *vm, vm_paddr_t mmio_gpa)
-{
- vm->ucall_mmio_addr = mmio_gpa;
-
- write_guest_global(vm, ucall_exit_mmio_addr, (vm_vaddr_t *)mmio_gpa);
-}
-
void ucall_arch_init(struct kvm_vm *vm, vm_paddr_t mmio_gpa)
{
virt_pg_map(vm, mmio_gpa, mmio_gpa);
- ucall_set_mmio_addr(vm, mmio_gpa);
-}
+ vm->ucall_mmio_addr = mmio_gpa;
-void ucall_arch_uninit(struct kvm_vm *vm)
-{
- ucall_set_mmio_addr(vm, (vm_paddr_t)NULL);
+ write_guest_global(vm, ucall_exit_mmio_addr, (vm_vaddr_t *)mmio_gpa);
}
void ucall_arch_do_ucall(vm_vaddr_t uc)