From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tianyu Lan Subject: [PATCH V3 2/4] X86/Hyper-V: Add hyperv_nested_flush_guest_mapping ftrace support Date: Thu, 19 Jul 2018 08:40:12 +0000 Message-ID: <20180719083946.121493-3-Tianyu.Lan@microsoft.com> References: <20180719083946.121493-1-Tianyu.Lan@microsoft.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Cc: Tianyu Lan , KY Srinivasan , Haiyang Zhang , Stephen Hemminger , "tglx@linutronix.de" , "mingo@redhat.com" , "hpa@zytor.com" , "x86@kernel.org" , "pbonzini@redhat.com" , "rkrcmar@redhat.com" , "devel@linuxdriverproject.org" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "Michael Kelley (EOSG)" , "vkuznets@redhat.com" To: unlisted-recipients:; (no To-header on input) Return-path: In-Reply-To: <20180719083946.121493-1-Tianyu.Lan@microsoft.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org This patch is to add hyperv_nested_flush_guest_mapping support to trace hvFlushGuestPhysicalAddressSpace hypercall. Signed-off-by: Lan Tianyu --- arch/x86/hyperv/nested.c | 3 +++ arch/x86/include/asm/trace/hyperv.h | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/arch/x86/hyperv/nested.c b/arch/x86/hyperv/nested.c index 74dd38b5221d..42a3232f2835 100644 --- a/arch/x86/hyperv/nested.c +++ b/arch/x86/hyperv/nested.c @@ -25,6 +25,8 @@ #include #include =20 +#include + int hyperv_flush_guest_mapping(u64 as) { struct hv_guest_mapping_flush **flush_pcpu; @@ -59,6 +61,7 @@ int hyperv_flush_guest_mapping(u64 as) ret =3D 0; =20 fault: + trace_hyperv_nested_flush_guest_mapping(as, ret); return ret; } EXPORT_SYMBOL_GPL(hyperv_flush_guest_mapping); diff --git a/arch/x86/include/asm/trace/hyperv.h b/arch/x86/include/asm/tra= ce/hyperv.h index 4253bca99989..e1ffe61de8d6 100644 --- a/arch/x86/include/asm/trace/hyperv.h +++ b/arch/x86/include/asm/trace/hyperv.h @@ -28,6 +28,20 @@ TRACE_EVENT(hyperv_mmu_flush_tlb_others, __entry->addr, __entry->end) ); =20 +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 =3D as; + __entry->ret =3D ret; + ), + TP_printk("address space %llx ret %d", __entry->as, __entry->ret) + ); + #endif /* CONFIG_HYPERV */ =20 #undef TRACE_INCLUDE_PATH --=20 2.14.3