Skip to contentSkip to conversation

KVM: selftests: Fix build due to ucall_uninit() removal

PATCH In review Mark Brown 2 participants 2 messages Dec 6, 2022

Subsystems (4)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

PATCH 1/1 KVM: selftests: Fix build due to ucall_uninit() removal

Today's -next fails to build on arm64 due to:

In file included from include/kvm_util.h:11,

                 from aarch64/page_fault_test.c:15:
include/ucall_common.h:36:47: note: expected ‘vm_paddr_t’ {aka ‘long unsigned int’} but argument is of type ‘void *’
   36 | void ucall_init(struct kvm_vm *vm, vm_paddr_t mmio_gpa);
      |                                    ~~~~~~~~~~~^~~~~~~~
aarch64/page_fault_test.c:725:2: warning: implicit declaration of function ‘ucall_uninit’; did you mean ‘ucall_init’? [-Wimplicit-function-declaration]
  725 |  ucall_uninit(vm);
      |  ^~~~~~~~~~~~
      |  ucall_init

which is caused by commit

interacting poorly with commit

28a65567acb5 ("KVM: selftests: Drop now-unnecessary ucall_uninit()")

As is done for other ucall_uninit() users remove the call in the newly added page_fault_test.c.

Fixes 28a65567acb5 ("KVM: selftests: Drop now-unnecessary ucall_uninit()")
Fixes 35c581015712 ("KVM: selftests: aarch64: Add aarch64/page_fault_test")
Cc Sean Christopherson <[email protected]>
Cc Ricardo Koller <[email protected]>
Cc Marc Zyngier <[email protected]>
---
 tools/testing/selftests/kvm/aarch64/page_fault_test.c | 1 -
 1 file changed, 1 deletion(-)
tools/testing/selftests/kvm/aarch64/page_fault_test.c +0 -1
index 05bb6a6369c2..4ef89c57a937 100644
@@ -722,7 +722,6 @@ static void run_test(enum vm_guest_mode mode, void *arg)
 
 	vcpu_run_loop(vm, vcpu, test);
 
-	ucall_uninit(vm);
 	kvm_vm_free(vm);
 	free_uffd(test, pt_uffd, data_uffd);
 
Signature · 1 line
2.30.2
#1 lore raw

Hi Mark,

Quoted 47 lines · On Tue, 6 Dec 2022 18:15:06 +0000 Mark Brown <[email protected]> wrote:

Today's -next fails to build on arm64 due to:

In file included from include/kvm_util.h:11,

                 from aarch64/page_fault_test.c:15:
include/ucall_common.h:36:47: note: expected ‘vm_paddr_t’ {aka ‘long unsigned int’} but argument is of type ‘void *’
   36 | void ucall_init(struct kvm_vm *vm, vm_paddr_t mmio_gpa);
      |                                    ~~~~~~~~~~~^~~~~~~~
aarch64/page_fault_test.c:725:2: warning: implicit declaration of function ‘ucall_uninit’; did you mean ‘ucall_init’? [-Wimplicit-function-declaration]
  725 |  ucall_uninit(vm);
      |  ^~~~~~~~~~~~
      |  ucall_init

which is caused by commit

interacting poorly with commit

   28a65567acb5 ("KVM: selftests: Drop now-unnecessary ucall_uninit()")

As is done for other ucall_uninit() users remove the call in the newly added page_fault_test.c.

Fixes 28a65567acb5 ("KVM: selftests: Drop now-unnecessary ucall_uninit()")
Fixes 35c581015712 ("KVM: selftests: aarch64: Add aarch64/page_fault_test")
Cc Sean Christopherson <[email protected]>
Cc Ricardo Koller <[email protected]>
Cc Marc Zyngier <[email protected]>
---
 tools/testing/selftests/kvm/aarch64/page_fault_test.c | 1 -
 1 file changed, 1 deletion(-)
tools/testing/selftests/kvm/aarch64/page_fault_test.c +0 -1
index 05bb6a6369c2..4ef89c57a937 100644
@@ -722,7 +722,6 @@ static void run_test(enum vm_guest_mode mode, void *arg)
 
 	vcpu_run_loop(vm, vcpu, test);
 
-	ucall_uninit(vm);
 	kvm_vm_free(vm);
 	free_uffd(test, pt_uffd, data_uffd);
 
Signature · 1 line
2.30.2

Also added to my merge of the kvm-arm tree.

Signature · 2 lines
Cheers,
Stephen Rothwell