KVM: selftests: x86: Address missing vm_install_exception_handler conversions
PATCH 1/1 KVM: selftests: x86: Address missing vm_install_exception_handler conversions
Commit b78f4a59669 ("KVM: selftests: Rename vm_handle_exception") raced with a couple of new x86 tests, missing two vm_handle_exception to vm_install_exception_handler conversions.
Help the two broken tests to catch up with the new world.
--- tools/testing/selftests/kvm/x86_64/hyperv_features.c | 2 +- tools/testing/selftests/kvm/x86_64/mmu_role_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/kvm/x86_64/hyperv_features.c +1 -1
@@ -615,7 +615,7 @@ int main(void)vm_init_descriptor_tables (vm);vcpu_init_descriptor_tables (vm,VCPU_ID ); -vm_handle_exception (vm,GP_VECTOR , guest_gp_handler); +vm_install_exception_handler (vm,GP_VECTOR , guest_gp_handler);pr_info ("Testing access to Hyper-V specific MSRs\n" ); guest_test_msrs_access(vm, addr_gva2hva(vm, msr_gva),
tools/testing/selftests/kvm/x86_64/mmu_role_test.c +1 -1
@@ -71,7 +71,7 @@ static void mmu_role_test(u32 *cpuid_reg, u32 evil_cpuid_val)/* Set up a #PF handler to eat the RSVD #PF and signal all done! */ vm_init_descriptor_tables (vm);vcpu_init_descriptor_tables (vm,VCPU_ID ); -vm_handle_exception (vm,PF_VECTOR , guest_pf_handler); +vm_install_exception_handler (vm,PF_VECTOR , guest_pf_handler); r =_vcpu_run (vm,VCPU_ID );TEST_ASSERT (r ==0 ,"vcpu_run failed: %d\n" , r);
Signature · 1 line
2.30.2
Quoted 44 lines · Marc Zyngier
Commit
b78f4a59669("KVM: selftests: Renamevm_handle_exception") raced with a couple of new x86 tests, missing twovm_handle_exceptiontovm_install_exception_handlerconversions.Help the two broken tests to catch up with the new world.
Cc Andrew Jones <[email protected]>CC Ricardo Koller <[email protected]>Cc Paolo Bonzini <[email protected]>Signed-off-by Marc Zyngier <[email protected]>--- tools/testing/selftests/kvm/x86_64/hyperv_features.c | 2 +- tools/testing/selftests/kvm/x86_64/mmu_role_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)tools/testing/selftests/kvm/x86_64/hyperv_features.c +1
-1@@ -615,7 +615,7 @@ int main(void)vm_init_descriptor_tables (vm);vcpu_init_descriptor_tables (vm,VCPU_ID ); -vm_handle_exception (vm,GP_VECTOR , guest_gp_handler); +vm_install_exception_handler (vm,GP_VECTOR , guest_gp_handler);pr_info ("Testing access to Hyper-V specific MSRs\n" ); guest_test_msrs_access(vm, addr_gva2hva(vm, msr_gva),tools/testing/selftests/kvm/x86_64/mmu_role_test.c +1
-1@@ -71,7 +71,7 @@ static void mmu_role_test(u32 *cpuid_reg, u32 evil_cpuid_val)/* Set up a #PF handler to eat the RSVD #PF and signal all done! */ vm_init_descriptor_tables (vm);vcpu_init_descriptor_tables (vm,VCPU_ID ); -vm_handle_exception (vm,PF_VECTOR , guest_pf_handler); +vm_install_exception_handler (vm,PF_VECTOR , guest_pf_handler); r =_vcpu_run (vm,VCPU_ID );TEST_ASSERT (r ==0 ,"vcpu_run failed: %d\n" , r);Signature · 1 line
2.30.2
Hopefully vm_install_exception_handler() has now officially won the race!
Thanks,
drew
Ricardo Koller
Reviewed-byQuoted 48 lines · Andrew Jones
Quoted 44 lines · Marc Zyngier
Commit
b78f4a59669("KVM: selftests: Renamevm_handle_exception") raced with a couple of new x86 tests, missing twovm_handle_exceptiontovm_install_exception_handlerconversions.Help the two broken tests to catch up with the new world.
Cc Andrew Jones <[email protected]>CC Ricardo Koller <[email protected]>Cc Paolo Bonzini <[email protected]>Signed-off-by Marc Zyngier <[email protected]>--- tools/testing/selftests/kvm/x86_64/hyperv_features.c | 2 +- tools/testing/selftests/kvm/x86_64/mmu_role_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)tools/testing/selftests/kvm/x86_64/hyperv_features.c +1
-1@@ -615,7 +615,7 @@ int main(void)vm_init_descriptor_tables (vm);vcpu_init_descriptor_tables (vm,VCPU_ID ); -vm_handle_exception (vm,GP_VECTOR , guest_gp_handler); +vm_install_exception_handler (vm,GP_VECTOR , guest_gp_handler);pr_info ("Testing access to Hyper-V specific MSRs\n" ); guest_test_msrs_access(vm, addr_gva2hva(vm, msr_gva),tools/testing/selftests/kvm/x86_64/mmu_role_test.c +1
-1@@ -71,7 +71,7 @@ static void mmu_role_test(u32 *cpuid_reg, u32 evil_cpuid_val)/* Set up a #PF handler to eat the RSVD #PF and signal all done! */ vm_init_descriptor_tables (vm);vcpu_init_descriptor_tables (vm,VCPU_ID ); -vm_handle_exception (vm,PF_VECTOR , guest_pf_handler); +vm_install_exception_handler (vm,PF_VECTOR , guest_pf_handler); r =_vcpu_run (vm,VCPU_ID );TEST_ASSERT (r ==0 ,"vcpu_run failed: %d\n" , r);Signature · 1 line
2.30.2Reviewed-by Andrew Jones <[email protected]>
Quoted 5 lines
Hopefully
vm_install_exception_handler()has now officially won the race!Thanks,
drew
Thanks!
Ricardo
Quoted 34 lines · Marc Zyngier
Commit
b78f4a59669("KVM: selftests: Renamevm_handle_exception") raced with a couple of new x86 tests, missing twovm_handle_exceptiontovm_install_exception_handlerconversions.Help the two broken tests to catch up with the new world.
Cc Andrew Jones <[email protected]>CC Ricardo Koller <[email protected]>Cc Paolo Bonzini <[email protected]>Signed-off-by Marc Zyngier <[email protected]>--- tools/testing/selftests/kvm/x86_64/hyperv_features.c | 2 +- tools/testing/selftests/kvm/x86_64/mmu_role_test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)tools/testing/selftests/kvm/x86_64/hyperv_features.c +1
-1@@ -615,7 +615,7 @@ int main(void)vm_init_descriptor_tables (vm);vcpu_init_descriptor_tables (vm,VCPU_ID ); -vm_handle_exception (vm,GP_VECTOR , guest_gp_handler); +vm_install_exception_handler (vm,GP_VECTOR , guest_gp_handler);pr_info ("Testing access to Hyper-V specific MSRs\n" ); guest_test_msrs_access(vm, addr_gva2hva(vm, msr_gva),tools/testing/selftests/kvm/x86_64/mmu_role_test.c +0
-0
tools/testing/selftests/kvm/x86_64/mmu_role_test.c static void mmu_role_test(u32 *cpuid_reg, u32 evil_cpuid_val) · line 77
Quoted 8 lines
tools/testing/selftests/kvm/x86_64/mmu_role_test.c +1
-1@@ -71,7 +71,7 @@ static void mmu_role_test(u32 *cpuid_reg, u32 evil_cpuid_val)/* Set up a #PF handler to eat the RSVD #PF and signal all done! */ vm_init_descriptor_tables (vm);vcpu_init_descriptor_tables (vm,VCPU_ID ); -vm_handle_exception (vm,PF_VECTOR , guest_pf_handler); +vm_install_exception_handler (vm,PF_VECTOR , guest_pf_handler); r =_vcpu_run (vm,VCPU_ID );TEST_ASSERT (r ==0 ,"vcpu_run failed: %d\n" , r);
Queued, thanks.
Paolo