KVM: x86: mmu: trace kvm_mmu_set_spte after the new SPTE was set
authorMaxim Levitsky <mlevitsk@redhat.com>
Wed, 2 Mar 2022 10:24:57 +0000 (12:24 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 2 Apr 2022 09:34:45 +0000 (05:34 -0400)
It makes more sense to print new SPTE value than the
old value.

Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220302102457.588450-1-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c

index e6ce39a..8f19ea7 100644 (file)
@@ -2696,8 +2696,8 @@ static int mmu_set_spte(struct kvm_vcpu *vcpu, struct kvm_memory_slot *slot,
        if (*sptep == spte) {
                ret = RET_PF_SPURIOUS;
        } else {
-               trace_kvm_mmu_set_spte(level, gfn, sptep);
                flush |= mmu_spte_update(sptep, spte);
+               trace_kvm_mmu_set_spte(level, gfn, sptep);
        }
 
        if (wrprot) {