Skip to content

Commit 58ec5e9

Browse files
vittyvkKAGA-KOKO
authored andcommitted
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: "K. Y. Srinivasan" <[email protected]> Cc: Haiyang Zhang <[email protected]> Cc: Stephen Hemminger <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Tianyu Lan <[email protected]> Cc: "Michael Kelley (EOSG)" <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent 4bd0606 commit 58ec5e9

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

arch/x86/hyperv/hv_apic.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
#include <asm/mshyperv.h>
3232
#include <asm/apic.h>
3333

34+
#include <asm/trace/hyperv.h>
35+
3436
static struct apic orig_apic;
3537

3638
static u64 hv_apic_icr_read(void)
@@ -134,6 +136,8 @@ static bool __send_ipi_mask(const struct cpumask *mask, int vector)
134136
struct ipi_arg_non_ex ipi_arg;
135137
int ret = 1;
136138

139+
trace_hyperv_send_ipi_mask(mask, vector);
140+
137141
if (cpumask_empty(mask))
138142
return true;
139143

arch/x86/include/asm/trace/hyperv.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ TRACE_EVENT(hyperv_mmu_flush_tlb_others,
2828
__entry->addr, __entry->end)
2929
);
3030

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+
3146
#endif /* CONFIG_HYPERV */
3247

3348
#undef TRACE_INCLUDE_PATH

0 commit comments

Comments
 (0)