[PATCH v13 04/35] KVM: WARN if there are dangling MMU invalidations at VM destruction

Paolo Bonzini pbonzini at redhat.com
Mon Oct 30 09:32:17 PDT 2023


On 10/27/23 20:21, Sean Christopherson wrote:
> Add an assertion that there are no in-progress MMU invalidations when a 
> VM is being destroyed, with the exception of the scenario where KVM 
> unregisters its MMU notifier between an .invalidate_range_start() call 
> and the corresponding .invalidate_range_end(). KVM can't detect unpaired 
> calls from the mmu_notifier due to the above exception waiver, but the 
> assertion can detect KVM bugs, e.g. such as the bug that *almost* 
> escaped initial guest_memfd development.
>
> Link: https://lore.kernel.org/all/e397d30c-c6af-e68f-d18e-b4e3739c5389@linux.intel.com
> Signed-off-by: Sean Christopherson <seanjc at google.com>

Reviewed-by: Paolo Bonzini <pbonzini at redhat.com>

Paolo




More information about the linux-riscv mailing list