diff options
-rw-r--r-- | sys/amd64/vmm/io/vlapic.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/amd64/vmm/io/vlapic.c b/sys/amd64/vmm/io/vlapic.c index 15fc6c2..cc2e09c 100644 --- a/sys/amd64/vmm/io/vlapic.c +++ b/sys/amd64/vmm/io/vlapic.c @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include <machine/vmm.h> +#include "vmm_stat.h" #include "vmm_lapic.h" #include "vmm_ktr.h" #include "vdev.h" @@ -410,6 +411,8 @@ vlapic_periodic_timer(struct vlapic *vlapic) return (vlapic_get_lvt_field(lvt, APIC_LVTT_TM_PERIODIC)); } +static VMM_STAT(VLAPIC_INTR_TIMER, "timer interrupts generated by vlapic"); + static void vlapic_fire_timer(struct vlapic *vlapic) { @@ -419,6 +422,7 @@ vlapic_fire_timer(struct vlapic *vlapic) lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_TIMER_LVT); if (!vlapic_get_lvt_field(lvt, APIC_LVTT_M)) { + vmm_stat_incr(vlapic->vm, vlapic->vcpuid, VLAPIC_INTR_TIMER, 1); vector = vlapic_get_lvt_field(lvt,APIC_LVTT_VECTOR); vlapic_set_intr_ready(vlapic, vector); } |