summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorXiaoguang Chen <xiaoguang.chen@intel.com>2016-10-09 15:41:44 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2016-11-02 21:32:17 +0100
commitb5f5fdca65dbccbafe08a481957629d67003db34 (patch)
tree205baae9ed80c7d08738e50ea20661bc9c94947a /arch/x86/kvm/x86.c
parent23611332938d8c7e87f7fbe6d3bc37f9c50d688f (diff)
downloadlinux-b5f5fdca65dbccbafe08a481957629d67003db34.tar.gz
linux-b5f5fdca65dbccbafe08a481957629d67003db34.tar.bz2
linux-b5f5fdca65dbccbafe08a481957629d67003db34.zip
KVM: x86: add track_flush_slot page track notifier
When a memory slot is being moved or removed users of page track can be notified. So users can drop write-protection for the pages in that memory slot. This notifier type is needed by KVMGT to sync up its shadow page table when memory slot is being moved or removed. Register the notifier type track_flush_slot to receive memslot move and remove event. Reviewed-by: Xiao Guangrong <guangrong.xiao@intel.com> Signed-off-by: Chen Xiaoguang <xiaoguang.chen@intel.com> [Squashed commits to avoid bisection breakage and reworded the subject.] Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 3017de0431bd..7e30c720d0c5 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -8155,7 +8155,7 @@ void kvm_arch_flush_shadow_all(struct kvm *kvm)
void kvm_arch_flush_shadow_memslot(struct kvm *kvm,
struct kvm_memory_slot *slot)
{
- kvm_mmu_invalidate_zap_all_pages(kvm);
+ kvm_page_track_flush_slot(kvm, slot);
}
static inline bool kvm_vcpu_has_events(struct kvm_vcpu *vcpu)