Skip to content

Commit 60cfce4

Browse files
Tianyu Lanbonzini
authored andcommitted
X86/Hyper-V: Add hyperv_nested_flush_guest_mapping ftrace support
This patch is to add hyperv_nested_flush_guest_mapping support to trace hvFlushGuestPhysicalAddressSpace hypercall. Signed-off-by: Lan Tianyu <Tianyu.Lan@microsoft.com> Acked-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
1 parent eb914cf commit 60cfce4

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

arch/x86/hyperv/nested.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
#include <asm/mshyperv.h>
1515
#include <asm/tlbflush.h>
1616

17+
#include <asm/trace/hyperv.h>
18+
1719
int hyperv_flush_guest_mapping(u64 as)
1820
{
1921
struct hv_guest_mapping_flush **flush_pcpu;
@@ -48,6 +50,7 @@ int hyperv_flush_guest_mapping(u64 as)
4850
ret = 0;
4951

5052
fault:
53+
trace_hyperv_nested_flush_guest_mapping(as, ret);
5154
return ret;
5255
}
5356
EXPORT_SYMBOL_GPL(hyperv_flush_guest_mapping);

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

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

31+
TRACE_EVENT(hyperv_nested_flush_guest_mapping,
32+
TP_PROTO(u64 as, int ret),
33+
TP_ARGS(as, ret),
34+
35+
TP_STRUCT__entry(
36+
__field(u64, as)
37+
__field(int, ret)
38+
),
39+
TP_fast_assign(__entry->as = as;
40+
__entry->ret = ret;
41+
),
42+
TP_printk("address space %llx ret %d", __entry->as, __entry->ret)
43+
);
44+
3145
#endif /* CONFIG_HYPERV */
3246

3347
#undef TRACE_INCLUDE_PATH

0 commit comments

Comments
 (0)