diff options
author | Haibo Xu <haibo1.xu@intel.com> | 2023-07-25 11:41:38 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2023-08-09 09:45:25 +0300 |
commit | 031f9efafc08d68b1b672e83ee73f6ea5c69c2ef (patch) | |
tree | 682d4f167d6a663d0d54dd8d153f79c26fb02a64 /arch/riscv/include/asm/kvm_host.h | |
parent | cbc0daa67c62bcfeb45cccfc821216549566fb40 (diff) | |
download | linux-031f9efafc08d68b1b672e83ee73f6ea5c69c2ef.tar.xz |
KVM: riscv: Add KVM_GET_REG_LIST API support
KVM_GET_REG_LIST API will return all registers that are available to
KVM_GET/SET_ONE_REG APIs. It's very useful to identify some platform
regression issue during VM migration.
Since this API was already supported on arm64, it is straightforward
to enable it on riscv with similar code structure.
Signed-off-by: Haibo Xu <haibo1.xu@intel.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'arch/riscv/include/asm/kvm_host.h')
-rw-r--r-- | arch/riscv/include/asm/kvm_host.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/kvm_host.h b/arch/riscv/include/asm/kvm_host.h index 55bc7bdbff48..1ebf20dfbaa6 100644 --- a/arch/riscv/include/asm/kvm_host.h +++ b/arch/riscv/include/asm/kvm_host.h @@ -338,6 +338,9 @@ int kvm_riscv_vcpu_exit(struct kvm_vcpu *vcpu, struct kvm_run *run, void __kvm_riscv_switch_to(struct kvm_vcpu_arch *vcpu_arch); void kvm_riscv_vcpu_setup_isa(struct kvm_vcpu *vcpu); +unsigned long kvm_riscv_vcpu_num_regs(struct kvm_vcpu *vcpu); +int kvm_riscv_vcpu_copy_reg_indices(struct kvm_vcpu *vcpu, + u64 __user *uindices); int kvm_riscv_vcpu_get_reg(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); int kvm_riscv_vcpu_set_reg(struct kvm_vcpu *vcpu, |