* [PATCH] KVM: selftests: x86: Address missing vm_install_exception_handler conversions
@ 2021-07-01 7:19 Marc Zyngier
2021-07-01 7:30 ` Andrew Jones
2021-07-08 16:52 ` Paolo Bonzini
0 siblings, 2 replies; 4+ messages in thread
From: Marc Zyngier @ 2021-07-01 7:19 UTC (permalink / raw)
To: kvm; +Cc: kernel-team, Andrew Jones, Ricardo Koller, Paolo Bonzini
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.
Cc: Andrew Jones <drjones@redhat.com>
CC: Ricardo Koller <ricarkol@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
---
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(-)
diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_features.c b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
index 42bd658f52a8..af27c7e829c1 100644
--- a/tools/testing/selftests/kvm/x86_64/hyperv_features.c
+++ b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
@@ -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),
diff --git a/tools/testing/selftests/kvm/x86_64/mmu_role_test.c b/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
index 523371cf8e8f..da2325fcad87 100644
--- a/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
+++ b/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
@@ -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);
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: selftests: x86: Address missing vm_install_exception_handler conversions
2021-07-01 7:19 [PATCH] KVM: selftests: x86: Address missing vm_install_exception_handler conversions Marc Zyngier
@ 2021-07-01 7:30 ` Andrew Jones
2021-07-01 17:29 ` Ricardo Koller
2021-07-08 16:52 ` Paolo Bonzini
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Jones @ 2021-07-01 7:30 UTC (permalink / raw)
To: Marc Zyngier; +Cc: kvm, kernel-team, Ricardo Koller, Paolo Bonzini
On Thu, Jul 01, 2021 at 08:19:28AM +0100, Marc Zyngier wrote:
> 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.
>
> Cc: Andrew Jones <drjones@redhat.com>
> CC: Ricardo Koller <ricarkol@google.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
> 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(-)
>
> diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_features.c b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
> index 42bd658f52a8..af27c7e829c1 100644
> --- a/tools/testing/selftests/kvm/x86_64/hyperv_features.c
> +++ b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
> @@ -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),
> diff --git a/tools/testing/selftests/kvm/x86_64/mmu_role_test.c b/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
> index 523371cf8e8f..da2325fcad87 100644
> --- a/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
> +++ b/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
> @@ -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);
> --
> 2.30.2
>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Hopefully vm_install_exception_handler() has now officially won the race!
Thanks,
drew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: selftests: x86: Address missing vm_install_exception_handler conversions
2021-07-01 7:30 ` Andrew Jones
@ 2021-07-01 17:29 ` Ricardo Koller
0 siblings, 0 replies; 4+ messages in thread
From: Ricardo Koller @ 2021-07-01 17:29 UTC (permalink / raw)
To: Andrew Jones; +Cc: Marc Zyngier, kvm, kernel-team, Paolo Bonzini
On Thu, Jul 01, 2021 at 09:30:04AM +0200, Andrew Jones wrote:
> On Thu, Jul 01, 2021 at 08:19:28AM +0100, Marc Zyngier wrote:
> > 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.
> >
> > Cc: Andrew Jones <drjones@redhat.com>
> > CC: Ricardo Koller <ricarkol@google.com>
> > Cc: Paolo Bonzini <pbonzini@redhat.com>
> > Signed-off-by: Marc Zyngier <maz@kernel.org>
> > ---
> > 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(-)
> >
> > diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_features.c b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
> > index 42bd658f52a8..af27c7e829c1 100644
> > --- a/tools/testing/selftests/kvm/x86_64/hyperv_features.c
> > +++ b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
> > @@ -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),
> > diff --git a/tools/testing/selftests/kvm/x86_64/mmu_role_test.c b/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
> > index 523371cf8e8f..da2325fcad87 100644
> > --- a/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
> > +++ b/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
> > @@ -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);
> > --
> > 2.30.2
> >
>
> Reviewed-by: Andrew Jones <drjones@redhat.com>
>
> Hopefully vm_install_exception_handler() has now officially won the race!
>
> Thanks,
> drew
>
Reviewed-by: Ricardo Koller <ricarkol@google.com>
Thanks!
Ricardo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KVM: selftests: x86: Address missing vm_install_exception_handler conversions
2021-07-01 7:19 [PATCH] KVM: selftests: x86: Address missing vm_install_exception_handler conversions Marc Zyngier
2021-07-01 7:30 ` Andrew Jones
@ 2021-07-08 16:52 ` Paolo Bonzini
1 sibling, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2021-07-08 16:52 UTC (permalink / raw)
To: Marc Zyngier, kvm; +Cc: kernel-team, Andrew Jones, Ricardo Koller
On 01/07/21 09:19, Marc Zyngier wrote:
> 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.
>
> Cc: Andrew Jones <drjones@redhat.com>
> CC: Ricardo Koller <ricarkol@google.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
> 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(-)
>
> diff --git a/tools/testing/selftests/kvm/x86_64/hyperv_features.c b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
> index 42bd658f52a8..af27c7e829c1 100644
> --- a/tools/testing/selftests/kvm/x86_64/hyperv_features.c
> +++ b/tools/testing/selftests/kvm/x86_64/hyperv_features.c
> @@ -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),
> diff --git a/tools/testing/selftests/kvm/x86_64/mmu_role_test.c b/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
> index 523371cf8e8f..da2325fcad87 100644
> --- a/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
> +++ b/tools/testing/selftests/kvm/x86_64/mmu_role_test.c
> @@ -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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-07-08 16:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-01 7:19 [PATCH] KVM: selftests: x86: Address missing vm_install_exception_handler conversions Marc Zyngier
2021-07-01 7:30 ` Andrew Jones
2021-07-01 17:29 ` Ricardo Koller
2021-07-08 16:52 ` Paolo Bonzini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.