diff options
author | Andrew Jones <ajones@ventanamicro.com> | 2023-12-20 19:00:20 +0300 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2023-12-30 08:56:33 +0300 |
commit | 5b9e41321ba919dd051c68d2a1d2c753aa61634c (patch) | |
tree | ea69aa9b76c394466a1fd6b93aad99b74fed07a6 /arch/riscv/include/asm/kvm_vcpu_sbi.h | |
parent | 38b3390ee4880140b6245fe3273fe9ce53f65bde (diff) | |
download | linux-5b9e41321ba919dd051c68d2a1d2c753aa61634c.tar.xz |
RISC-V: KVM: Add support for SBI extension registers
Some SBI extensions have state that needs to be saved / restored
when migrating the VM. Provide a get/set-one-reg register type
for SBI extension registers. Each SBI extension that uses this type
will have its own subtype. There are currently no subtypes defined.
The next patch introduces the first one.
Reviewed-by: Anup Patel <anup@brainfault.org>
Reviewed-by: Atish Patra <atishp@rivosinc.com>
Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'arch/riscv/include/asm/kvm_vcpu_sbi.h')
-rw-r--r-- | arch/riscv/include/asm/kvm_vcpu_sbi.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/riscv/include/asm/kvm_vcpu_sbi.h b/arch/riscv/include/asm/kvm_vcpu_sbi.h index 99c23bb37a37..dd60f73b5c36 100644 --- a/arch/riscv/include/asm/kvm_vcpu_sbi.h +++ b/arch/riscv/include/asm/kvm_vcpu_sbi.h @@ -60,6 +60,10 @@ int kvm_riscv_vcpu_set_reg_sbi_ext(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); int kvm_riscv_vcpu_get_reg_sbi_ext(struct kvm_vcpu *vcpu, const struct kvm_one_reg *reg); +int kvm_riscv_vcpu_set_reg_sbi(struct kvm_vcpu *vcpu, + const struct kvm_one_reg *reg); +int kvm_riscv_vcpu_get_reg_sbi(struct kvm_vcpu *vcpu, + const struct kvm_one_reg *reg); const struct kvm_vcpu_sbi_extension *kvm_vcpu_sbi_find_ext( struct kvm_vcpu *vcpu, unsigned long extid); bool riscv_vcpu_supports_sbi_ext(struct kvm_vcpu *vcpu, int idx); |