mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
RISCV: KVM: Add sstateen0 context save/restore
Define sstateen0 and add sstateen0 save/restore for guest VCPUs. 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:
committed by
Anup Patel
parent
db3c01c7a3
commit
81f0f314fe
@@ -170,6 +170,10 @@ struct kvm_vcpu_config {
|
||||
u64 hstateen0;
|
||||
};
|
||||
|
||||
struct kvm_vcpu_smstateen_csr {
|
||||
unsigned long sstateen0;
|
||||
};
|
||||
|
||||
struct kvm_vcpu_arch {
|
||||
/* VCPU ran at least once */
|
||||
bool ran_atleast_once;
|
||||
@@ -190,6 +194,7 @@ struct kvm_vcpu_arch {
|
||||
unsigned long host_stvec;
|
||||
unsigned long host_scounteren;
|
||||
unsigned long host_senvcfg;
|
||||
unsigned long host_sstateen0;
|
||||
|
||||
/* CPU context of Host */
|
||||
struct kvm_cpu_context host_context;
|
||||
@@ -200,6 +205,9 @@ struct kvm_vcpu_arch {
|
||||
/* CPU CSR context of Guest VCPU */
|
||||
struct kvm_vcpu_csr guest_csr;
|
||||
|
||||
/* CPU Smstateen CSR context of Guest VCPU */
|
||||
struct kvm_vcpu_smstateen_csr smstateen_csr;
|
||||
|
||||
/* CPU context upon Guest VCPU reset */
|
||||
struct kvm_cpu_context guest_reset_context;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user