mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
RISC-V: KVM: Add kvm_vcpu_config
Add a placeholder for all registers such as henvcfg, hstateen etc which have 'static' configurations depending on extensions supported by the guest. The values are derived once and are then subsequently written to the corresponding CSRs while switching to the vcpu. 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
00c6f39c82
commit
fe0bab701e
@@ -164,6 +164,10 @@ struct kvm_vcpu_csr {
|
||||
unsigned long scounteren;
|
||||
};
|
||||
|
||||
struct kvm_vcpu_config {
|
||||
u64 henvcfg;
|
||||
};
|
||||
|
||||
struct kvm_vcpu_arch {
|
||||
/* VCPU ran at least once */
|
||||
bool ran_atleast_once;
|
||||
@@ -244,6 +248,9 @@ struct kvm_vcpu_arch {
|
||||
|
||||
/* Performance monitoring context */
|
||||
struct kvm_pmu pmu_context;
|
||||
|
||||
/* 'static' configurations which are set only once */
|
||||
struct kvm_vcpu_config cfg;
|
||||
};
|
||||
|
||||
static inline void kvm_arch_sync_events(struct kvm *kvm) {}
|
||||
|
||||
Reference in New Issue
Block a user