]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
X86/Hyper-V: Add hyperv_nested_flush_guest_mapping ftrace support
authorTianyu Lan <Tianyu.Lan@microsoft.com>
Thu, 19 Jul 2018 08:40:12 +0000 (08:40 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Aug 2018 15:59:05 +0000 (17:59 +0200)
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>
arch/x86/hyperv/nested.c
arch/x86/include/asm/trace/hyperv.h

index 08f914217518fb8fe18b4f4c4cca0fe00e770c7e..b8e60cc504616b8c238aaaa35c1f724584b0c3db 100644 (file)
@@ -14,6 +14,8 @@
 #include <asm/mshyperv.h>
 #include <asm/tlbflush.h>
 
+#include <asm/trace/hyperv.h>
+
 int hyperv_flush_guest_mapping(u64 as)
 {
        struct hv_guest_mapping_flush **flush_pcpu;
@@ -48,6 +50,7 @@ int hyperv_flush_guest_mapping(u64 as)
                ret = 0;
 
 fault:
+       trace_hyperv_nested_flush_guest_mapping(as, ret);
        return ret;
 }
 EXPORT_SYMBOL_GPL(hyperv_flush_guest_mapping);
index 4253bca9998904e882803690e023d970d20dd5cd..e1ffe61de8d6d9640ac9b2f711f10f312a40470b 100644 (file)
@@ -28,6 +28,20 @@ TRACE_EVENT(hyperv_mmu_flush_tlb_others,
                      __entry->addr, __entry->end)
        );
 
+TRACE_EVENT(hyperv_nested_flush_guest_mapping,
+           TP_PROTO(u64 as, int ret),
+           TP_ARGS(as, ret),
+
+           TP_STRUCT__entry(
+                   __field(u64, as)
+                   __field(int, ret)
+                   ),
+           TP_fast_assign(__entry->as = as;
+                          __entry->ret = ret;
+                   ),
+           TP_printk("address space %llx ret %d", __entry->as, __entry->ret)
+       );
+
 #endif /* CONFIG_HYPERV */
 
 #undef TRACE_INCLUDE_PATH