RISCV: KVM: Add senvcfg context save/restore

Add senvcfg context save/restore for guest VCPUs and also add it to the
ONE_REG interface to allow its access from user space.

Signed-off-by: Mayuresh Chitale <mchitale@ventanamicro.com>
Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Mayuresh Chitale
2023-09-13 22:09:03 +05:30
committed by Anup Patel
parent d21b5d342f
commit db3c01c7a3
4 changed files with 20 additions and 0 deletions

View File

@@ -162,6 +162,7 @@ struct kvm_vcpu_csr {
unsigned long hvip;
unsigned long vsatp;
unsigned long scounteren;
unsigned long senvcfg;
};
struct kvm_vcpu_config {
@@ -188,6 +189,7 @@ struct kvm_vcpu_arch {
unsigned long host_sscratch;
unsigned long host_stvec;
unsigned long host_scounteren;
unsigned long host_senvcfg;
/* CPU context of Host */
struct kvm_cpu_context host_context;