LoongArch: KVM: Add stat information with kernel irqchip

Move stat information about kernel irqchip from VM to vCPU, since all
vm exiting events should be vCPU relative. And also add entry with
structure kvm_vcpu_stats_desc[], so that it can display with directory
/sys/kernel/debug/kvm.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
This commit is contained in:
Bibo Mao
2025-07-21 09:26:32 +08:00
committed by Huacai Chen
parent 9c79c951a3
commit 46ecfb68dd
5 changed files with 21 additions and 35 deletions

View File

@@ -20,7 +20,13 @@ const struct _kvm_stats_desc kvm_vcpu_stats_desc[] = {
STATS_DESC_COUNTER(VCPU, idle_exits),
STATS_DESC_COUNTER(VCPU, cpucfg_exits),
STATS_DESC_COUNTER(VCPU, signal_exits),
STATS_DESC_COUNTER(VCPU, hypercall_exits)
STATS_DESC_COUNTER(VCPU, hypercall_exits),
STATS_DESC_COUNTER(VCPU, ipi_read_exits),
STATS_DESC_COUNTER(VCPU, ipi_write_exits),
STATS_DESC_COUNTER(VCPU, eiointc_read_exits),
STATS_DESC_COUNTER(VCPU, eiointc_write_exits),
STATS_DESC_COUNTER(VCPU, pch_pic_read_exits),
STATS_DESC_COUNTER(VCPU, pch_pic_write_exits)
};
const struct kvm_stats_header kvm_vcpu_stats_header = {