diff options
author | Sean Christopherson <seanjc@google.com> | 2022-06-02 02:16:11 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-06-11 17:47:10 +0200 |
commit | bfff0f60db89f425920580900ba242df3bd3c652 (patch) | |
tree | eca50a7a4def02a6bc2d1cd382a029cd3876d48f /tools/testing/selftests/kvm/s390x | |
parent | KVM: selftests: Convert vgic_init away from vm_create_default_with_vcpus() (diff) | |
download | linux-bfff0f60db89f425920580900ba242df3bd3c652.tar.xz linux-bfff0f60db89f425920580900ba242df3bd3c652.zip |
KVM: selftests: Consolidate KVM_{G,S}ET_ONE_REG helpers
Rework vcpu_{g,s}et_reg() to provide the APIs that tests actually want to
use, and drop the three "one-off" implementations that cropped up due to
the poor API.
Ignore the handful of direct KVM_{G,S}ET_ONE_REG calls that don't fit the
APIs for one reason or another.
No functional change intended.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/s390x')
-rw-r--r-- | tools/testing/selftests/kvm/s390x/resets.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/testing/selftests/kvm/s390x/resets.c b/tools/testing/selftests/kvm/s390x/resets.c index 298bff3fd52e..85d290454776 100644 --- a/tools/testing/selftests/kvm/s390x/resets.c +++ b/tools/testing/selftests/kvm/s390x/resets.c @@ -61,12 +61,9 @@ static void guest_code_initial(void) static void test_one_reg(uint64_t id, uint64_t value) { - struct kvm_one_reg reg; uint64_t eval_reg; - reg.addr = (uintptr_t)&eval_reg; - reg.id = id; - vcpu_get_reg(vm, VCPU_ID, ®); + vcpu_get_reg(vm, VCPU_ID, id, &eval_reg); TEST_ASSERT(eval_reg == value, "value == 0x%lx", value); } |