KVM: x86/mmu: Fix TDP MMU zap collapsible SPTEs
authorBen Gardon <bgardon@google.com>
Tue, 2 Feb 2021 18:57:16 +0000 (10:57 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Feb 2021 08:29:19 +0000 (09:29 +0100)
commitdd7f10523b19c809b908be8b11da35c8e13e15f2
treedad39a1afc0a60974b17251369642c80caf64fdf
parentff0c437a0e02eb9ecc71f3907ca611ac57fdbcc6
KVM: x86/mmu: Fix TDP MMU zap collapsible SPTEs

commit 87aa9ec939ec7277b730786e19c161c9194cc8ca upstream.

There is a bug in the TDP MMU function to zap SPTEs which could be
replaced with a larger mapping which prevents the function from doing
anything. Fix this by correctly zapping the last level SPTEs.

Cc: stable@vger.kernel.org
Fixes: 14881998566d ("kvm: x86/mmu: Support disabling dirty logging for the tdp MMU")
Signed-off-by: Ben Gardon <bgardon@google.com>
Message-Id: <20210202185734.1680553-11-bgardon@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/mmu/tdp_mmu.c