summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/include/riscv/processor.h
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2022-06-02 03:16:11 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2022-06-11 18:47:10 +0300
commitbfff0f60db89f425920580900ba242df3bd3c652 (patch)
treeeca50a7a4def02a6bc2d1cd382a029cd3876d48f /tools/testing/selftests/kvm/include/riscv/processor.h
parent45f568084a7a86960d55cf70fd9bf06fbb29e792 (diff)
downloadlinux-bfff0f60db89f425920580900ba242df3bd3c652.tar.xz
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/include/riscv/processor.h')
-rw-r--r--tools/testing/selftests/kvm/include/riscv/processor.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/tools/testing/selftests/kvm/include/riscv/processor.h b/tools/testing/selftests/kvm/include/riscv/processor.h
index 4fcfd1c0389d..d00d213c3805 100644
--- a/tools/testing/selftests/kvm/include/riscv/processor.h
+++ b/tools/testing/selftests/kvm/include/riscv/processor.h
@@ -38,26 +38,6 @@ static inline uint64_t __kvm_reg_id(uint64_t type, uint64_t idx,
KVM_REG_RISCV_TIMER_REG(name), \
KVM_REG_SIZE_U64)
-static inline void get_reg(struct kvm_vm *vm, uint32_t vcpuid, uint64_t id,
- unsigned long *addr)
-{
- struct kvm_one_reg reg;
-
- reg.id = id;
- reg.addr = (unsigned long)addr;
- vcpu_get_reg(vm, vcpuid, &reg);
-}
-
-static inline void set_reg(struct kvm_vm *vm, uint32_t vcpuid, uint64_t id,
- unsigned long val)
-{
- struct kvm_one_reg reg;
-
- reg.id = id;
- reg.addr = (unsigned long)&val;
- vcpu_set_reg(vm, vcpuid, &reg);
-}
-
/* L3 index Bit[47:39] */
#define PGTBL_L3_INDEX_MASK 0x0000FF8000000000ULL
#define PGTBL_L3_INDEX_SHIFT 39