diff options
author | Vitaly Kuznetsov <vkuznets@redhat.com> | 2018-06-22 13:06:25 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2018-07-03 03:00:34 -0400 |
commit | 58ec5e9c9044bd7e1c0bcc6ad822b2e909f49732 (patch) | |
tree | eb69a33e221a987a50f3484326b40d8319dd1db9 | |
parent | 4bd06060762bc7e4834ecf9daeb78834f7a29582 (diff) |
x86/hyper-v: Trace PV IPI send
Trace Hyper-V PV IPIs the same way we do PV TLB flush.
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: devel@linuxdriverproject.org
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: Stephen Hemminger <sthemmin@microsoft.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Tianyu Lan <Tianyu.Lan@microsoft.com>
Cc: "Michael Kelley (EOSG)" <Michael.H.Kelley@microsoft.com>
Link: https://lkml.kernel.org/r/20180622170625.30688-5-vkuznets@redhat.com
-rw-r--r-- | arch/x86/hyperv/hv_apic.c | 4 | ||||
-rw-r--r-- | arch/x86/include/asm/trace/hyperv.h | 15 |
2 files changed, 19 insertions, 0 deletions
diff --git a/arch/x86/hyperv/hv_apic.c b/arch/x86/hyperv/hv_apic.c index ee962784d25b..657a2b8c738a 100644 --- a/arch/x86/hyperv/hv_apic.c +++ b/arch/x86/hyperv/hv_apic.c | |||
@@ -31,6 +31,8 @@ | |||
31 | #include <asm/mshyperv.h> | 31 | #include <asm/mshyperv.h> |
32 | #include <asm/apic.h> | 32 | #include <asm/apic.h> |
33 | 33 | ||
34 | #include <asm/trace/hyperv.h> | ||
35 | |||
34 | static struct apic orig_apic; | 36 | static struct apic orig_apic; |
35 | 37 | ||
36 | static u64 hv_apic_icr_read(void) | 38 | static u64 hv_apic_icr_read(void) |
@@ -134,6 +136,8 @@ static bool __send_ipi_mask(const struct cpumask *mask, int vector) | |||
134 | struct ipi_arg_non_ex ipi_arg; | 136 | struct ipi_arg_non_ex ipi_arg; |
135 | int ret = 1; | 137 | int ret = 1; |
136 | 138 | ||
139 | trace_hyperv_send_ipi_mask(mask, vector); | ||
140 | |||
137 | if (cpumask_empty(mask)) | 141 | if (cpumask_empty(mask)) |
138 | return true; | 142 | return true; |
139 | 143 | ||
diff --git a/arch/x86/include/asm/trace/hyperv.h b/arch/x86/include/asm/trace/hyperv.h index 4253bca99989..9c0d4b588e3f 100644 --- a/arch/x86/include/asm/trace/hyperv.h +++ b/arch/x86/include/asm/trace/hyperv.h | |||
@@ -28,6 +28,21 @@ TRACE_EVENT(hyperv_mmu_flush_tlb_others, | |||
28 | __entry->addr, __entry->end) | 28 | __entry->addr, __entry->end) |
29 | ); | 29 | ); |
30 | 30 | ||
31 | TRACE_EVENT(hyperv_send_ipi_mask, | ||
32 | TP_PROTO(const struct cpumask *cpus, | ||
33 | int vector), | ||
34 | TP_ARGS(cpus, vector), | ||
35 | TP_STRUCT__entry( | ||
36 | __field(unsigned int, ncpus) | ||
37 | __field(int, vector) | ||
38 | ), | ||
39 | TP_fast_assign(__entry->ncpus = cpumask_weight(cpus); | ||
40 | __entry->vector = vector; | ||
41 | ), | ||
42 | TP_printk("ncpus %d vector %x", | ||
43 | __entry->ncpus, __entry->vector) | ||
44 | ); | ||
45 | |||
31 | #endif /* CONFIG_HYPERV */ | 46 | #endif /* CONFIG_HYPERV */ |
32 | 47 | ||
33 | #undef TRACE_INCLUDE_PATH | 48 | #undef TRACE_INCLUDE_PATH |