Re: [PATCH v2 03/10] KVM: x86: Unmap VMAs for KVM-internal memslots when the memslot is freed
From: James Houghton
Date: Thu Oct 01 2026 - 17:26:54 EST
On Thu, Oct 1, 2026 at 1:26 PM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> Unmap KVM-created VMAs for KVM-internal memslots when the associated
> memslot is freed instead of unmapping via x86's internal API. This will
> allow deleting/freeing all memslots before kvm_arch_destroy_vm() without
> leaking VMAs, and in general is a net positive as it makes it far less
> likely that KVM will leak VMAs, e.g. in the unlikely scenario some other
> flow deletes KVM-internal memslots without going through
> __x86_set_memory_region().
>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
LGTM; this code is so much better. Feel free to add:
Reviewed-by: James Houghton <jthoughton@xxxxxxxxxx>