aboutsummaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2021-03-25 19:19:48 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2021-04-17 08:30:56 -0400
commit501b918525efec2e701e806f04d474d7da350962 (patch)
tree7d48c9b06faac8c9836b9cfe256362e717d5edc9 /virt
parent5f7c292b8975c9146063abbb91c0b9cdc1a5e9c5 (diff)
KVM: Move arm64's MMU notifier trace events to generic code
Move arm64's MMU notifier trace events into common code in preparation for doing the hva->gfn lookup in common code. The alternative would be to trace the gfn instead of hva, but that's not obviously better and could also be done in common code. Tracing the notifiers is also quite handy for debug regardless of architecture. Remove a completely redundant tracepoint from PPC e500. Signed-off-by: Sean Christopherson <seanjc@google.com> Message-Id: <20210326021957.1424875-10-seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r--virt/kvm/kvm_main.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index 383df23514b9..d1de843b7618 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -459,6 +459,8 @@ static void kvm_mmu_notifier_change_pte(struct mmu_notifier *mn,
struct kvm *kvm = mmu_notifier_to_kvm(mn);
int idx;
+ trace_kvm_set_spte_hva(address);
+
idx = srcu_read_lock(&kvm->srcu);
KVM_MMU_LOCK(kvm);
@@ -478,6 +480,8 @@ static int kvm_mmu_notifier_invalidate_range_start(struct mmu_notifier *mn,
struct kvm *kvm = mmu_notifier_to_kvm(mn);
int need_tlb_flush = 0, idx;
+ trace_kvm_unmap_hva_range(range->start, range->end);
+
idx = srcu_read_lock(&kvm->srcu);
KVM_MMU_LOCK(kvm);
/*
@@ -548,6 +552,8 @@ static int kvm_mmu_notifier_clear_flush_young(struct mmu_notifier *mn,
struct kvm *kvm = mmu_notifier_to_kvm(mn);
int young, idx;
+ trace_kvm_age_hva(start, end);
+
idx = srcu_read_lock(&kvm->srcu);
KVM_MMU_LOCK(kvm);
@@ -569,6 +575,8 @@ static int kvm_mmu_notifier_clear_young(struct mmu_notifier *mn,
struct kvm *kvm = mmu_notifier_to_kvm(mn);
int young, idx;
+ trace_kvm_age_hva(start, end);
+
idx = srcu_read_lock(&kvm->srcu);
KVM_MMU_LOCK(kvm);
/*
@@ -598,6 +606,8 @@ static int kvm_mmu_notifier_test_young(struct mmu_notifier *mn,
struct kvm *kvm = mmu_notifier_to_kvm(mn);
int young, idx;
+ trace_kvm_test_age_hva(address);
+
idx = srcu_read_lock(&kvm->srcu);
KVM_MMU_LOCK(kvm);
young = kvm_test_age_hva(kvm, address);

Privacy Policy