mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
RISC-V: KVM: Add new exit statstics for redirected traps
Currently, kvm doesn't delegate the few traps such as misaligned load/store, illegal instruction and load/store access faults because it is not expected to occur in the guest very frequently. Thus, kvm gets a chance to act upon it or collect statistics about it before redirecting the traps to the guest. Collect both guest and host visible statistics during the traps. Enable them so that both guest and host can collect the stats about them if required. Reviewed-by: Anup Patel <anup@brainfault.org> Signed-off-by: Atish Patra <atishp@rivosinc.com> Link: https://lore.kernel.org/r/20241224-kvm_guest_stat-v2-3-08a77ac36b02@rivosinc.com Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
@@ -87,6 +87,11 @@ struct kvm_vcpu_stat {
|
||||
u64 csr_exit_kernel;
|
||||
u64 signal_exits;
|
||||
u64 exits;
|
||||
u64 instr_illegal_exits;
|
||||
u64 load_misaligned_exits;
|
||||
u64 store_misaligned_exits;
|
||||
u64 load_access_exits;
|
||||
u64 store_access_exits;
|
||||
};
|
||||
|
||||
struct kvm_arch_memory_slot {
|
||||
|
||||
Reference in New Issue
Block a user