aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitaly Kuznetsov <[email protected]>2018-01-24 14:23:35 +0100
committerThomas Gleixner <[email protected]>2018-01-30 23:55:33 +0100
commit51d4e5daa32808df4d50db511d167fde19fa114e (patch)
tree329c7d91556964b820d2a031a7ef36275b67ef96
parente7c4e36c447daca2b7df49024f6bf230871cb155 (diff)
x86/irq: Count Hyper-V reenlightenment interrupts
Hyper-V reenlightenment interrupts arrive when the VM is migrated, While they are not interesting in general it's important when L2 nested guests are running. Signed-off-by: Vitaly Kuznetsov <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Thomas Gleixner <[email protected]> Cc: Stephen Hemminger <[email protected]> Cc: [email protected] Cc: Radim Krčmář <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: "Michael Kelley (EOSG)" <[email protected]> Cc: Roman Kagan <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: [email protected] Cc: Paolo Bonzini <[email protected]> Cc: "K. Y. Srinivasan" <[email protected]> Cc: Cathy Avery <[email protected]> Cc: Mohammed Gamal <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
-rw-r--r--arch/x86/hyperv/hv_init.c2
-rw-r--r--arch/x86/include/asm/hardirq.h3
-rw-r--r--arch/x86/kernel/irq.c9
3 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
index e4377e2f2a10..a3adece392f1 100644
--- a/arch/x86/hyperv/hv_init.c
+++ b/arch/x86/hyperv/hv_init.c
@@ -147,6 +147,8 @@ __visible void __irq_entry hyperv_reenlightenment_intr(struct pt_regs *regs)
{
entering_ack_irq();
+ inc_irq_stat(irq_hv_reenlightenment_count);
+
schedule_delayed_work(&hv_reenlightenment_work, HZ/10);
exiting_irq();
diff --git a/arch/x86/include/asm/hardirq.h b/arch/x86/include/asm/hardirq.h
index 51cc979dd364..7c341a74ec8c 100644
--- a/arch/x86/include/asm/hardirq.h
+++ b/arch/x86/include/asm/hardirq.h
@@ -38,6 +38,9 @@ typedef struct {
#if IS_ENABLED(CONFIG_HYPERV) || defined(CONFIG_XEN)
unsigned int irq_hv_callback_count;
#endif
+#if IS_ENABLED(CONFIG_HYPERV)
+ unsigned int irq_hv_reenlightenment_count;
+#endif
} ____cacheline_aligned irq_cpustat_t;
DECLARE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 68e1867cca80..45fb4d2565f8 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -142,6 +142,15 @@ int arch_show_interrupts(struct seq_file *p, int prec)
seq_puts(p, " Hypervisor callback interrupts\n");
}
#endif
+#if IS_ENABLED(CONFIG_HYPERV)
+ if (test_bit(HYPERV_REENLIGHTENMENT_VECTOR, system_vectors)) {
+ seq_printf(p, "%*s: ", prec, "HRE");
+ for_each_online_cpu(j)
+ seq_printf(p, "%10u ",
+ irq_stats(j)->irq_hv_reenlightenment_count);
+ seq_puts(p, " Hyper-V reenlightenment interrupts\n");
+ }
+#endif
seq_printf(p, "%*s: %10u\n", prec, "ERR", atomic_read(&irq_err_count));
#if defined(CONFIG_X86_IO_APIC)
seq_printf(p, "%*s: %10u\n", prec, "MIS", atomic_read(&irq_mis_count));