aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/kvm/s390x
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-06-01 17:16:11 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-11 11:47:10 -0400
commitbfff0f60db89f425920580900ba242df3bd3c652 (patch)
treeeca50a7a4def02a6bc2d1cd382a029cd3876d48f /tools/testing/selftests/kvm/s390x
parentKVM: selftests: Convert vgic_init away from vm_create_default_with_vcpus() (diff)
downloadwireguard-linux-bfff0f60db89f425920580900ba242df3bd3c652.tar.xz
wireguard-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.c5
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, &reg);
+ vcpu_get_reg(vm, VCPU_ID, id, &eval_reg);
TEST_ASSERT(eval_reg == value, "value == 0x%lx", value);
}