]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/mmu: bump mmu notifier count in kvm_zap_gfn_range
authorMaxim Levitsky <mlevitsk@redhat.com>
Tue, 10 Aug 2021 20:52:39 +0000 (23:52 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 20 Aug 2021 20:06:19 +0000 (16:06 -0400)
commitf076dd1d15e81a6ae0410f039a2b489dbe2bd3bf
tree892194fb335a46921302896b1f2542496cc5434b
parent502564e331cb37649873858f0ce3ffed7ec993ec
KVM: x86/mmu: bump mmu notifier count in kvm_zap_gfn_range

This together with previous patch, ensures that
kvm_zap_gfn_range doesn't race with page fault
running on another vcpu, and will make this page fault code
retry instead.

This is based on a patch suggested by Sean Christopherson:
https://lkml.org/lkml/2021/7/22/1025

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210810205251.424103-5-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mmu/mmu.c
include/linux/kvm_host.h
virt/kvm/kvm_main.c