fix: KVM: MMU: change tracepoints arguments to kvm_page_fault (v5.16)
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 14 Dec 2021 20:06:51 +0000 (15:06 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 4 Jan 2022 19:15:05 +0000 (14:15 -0500)
See upstream commit :

  commit f0066d94c92dc5cf7f1a272a1bd324b0fc575292
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   Fri Aug 6 04:35:50 2021 -0400

    KVM: MMU: change tracepoints arguments to kvm_page_fault

    Pass struct kvm_page_fault to tracepoints instead of extracting the
    arguments from the struct.  This also lets the kvm_mmu_spte_requested
    tracepoint pick the gfn directly from fault->gfn, instead of using
    the address.

Change-Id: I5ee3f344a8d1cd0ed185cdeecb3a3121183c9b43
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/arch/x86/kvm/mmutrace.h

index 64304e338d0f39641ec10b760d9de457bc0eb6ce..3116328f6557cb810b6078a939e404f21776f553 100644 (file)
@@ -233,7 +233,27 @@ LTTNG_TRACEPOINT_EVENT_MAP(
        )
 )
 
-#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
+#if (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,16,0))
+LTTNG_TRACEPOINT_EVENT_MAP(
+       fast_page_fault,
+
+       kvm_mmu_fast_page_fault,
+
+       TP_PROTO(struct kvm_vcpu *vcpu, struct kvm_page_fault *fault,
+                u64 *sptep, u64 old_spte, int ret),
+       TP_ARGS(vcpu, fault, sptep, old_spte, ret),
+
+       TP_FIELDS(
+               ctf_integer(int, vcpu_id, vcpu->vcpu_id)
+               ctf_integer(gpa_t, cr2_or_gpa, fault->addr)
+               ctf_integer(u32, error_code, fault->error_code)
+               ctf_integer_hex(u64 *, sptep, sptep)
+               ctf_integer(u64, old_spte, old_spte)
+               ctf_integer(u64, new_spte, *sptep)
+               ctf_integer(int, ret, ret)
+       )
+)
+#elif (LTTNG_LINUX_VERSION_CODE >= LTTNG_KERNEL_VERSION(5,10,0))
 LTTNG_TRACEPOINT_EVENT_MAP(
        fast_page_fault,
 
This page took 0.031912 seconds and 4 git commands to generate.