diff options
author | Jike Song <jike.song@intel.com> | 2016-10-25 09:50:42 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-11-04 12:13:20 +0100 |
commit | d126363d8fe946c9bb2538839de9b09f5b3b8ba3 (patch) | |
tree | 66545659f40044db329324066ff27b158b4bdde4 /arch/x86/kvm/page_track.c | |
parent | KVM: x86: add track_flush_slot page track notifier (diff) | |
download | linux-d126363d8fe946c9bb2538839de9b09f5b3b8ba3.tar.xz linux-d126363d8fe946c9bb2538839de9b09f5b3b8ba3.zip |
kvm/page_track: call notifiers with kvm_page_track_notifier_node
The user of page_track might needs extra information, so pass
the kvm_page_track_notifier_node to callbacks.
Signed-off-by: Jike Song <jike.song@intel.com>
Reviewed-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/page_track.c')
-rw-r--r-- | arch/x86/kvm/page_track.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/page_track.c b/arch/x86/kvm/page_track.c index e79bb256d177..3dae0e3d6a58 100644 --- a/arch/x86/kvm/page_track.c +++ b/arch/x86/kvm/page_track.c @@ -222,7 +222,7 @@ void kvm_page_track_write(struct kvm_vcpu *vcpu, gpa_t gpa, const u8 *new, idx = srcu_read_lock(&head->track_srcu); hlist_for_each_entry_rcu(n, &head->track_notifier_list, node) if (n->track_write) - n->track_write(vcpu, gpa, new, bytes); + n->track_write(vcpu, gpa, new, bytes, n); srcu_read_unlock(&head->track_srcu, idx); } @@ -247,6 +247,6 @@ void kvm_page_track_flush_slot(struct kvm *kvm, struct kvm_memory_slot *slot) idx = srcu_read_lock(&head->track_srcu); hlist_for_each_entry_rcu(n, &head->track_notifier_list, node) if (n->track_flush_slot) - n->track_flush_slot(kvm, slot); + n->track_flush_slot(kvm, slot, n); srcu_read_unlock(&head->track_srcu, idx); } |