]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: x86: Mark vmcs12 pages as dirty if and only if they're mapped
authorSean Christopherson <seanjc@google.com>
Fri, 21 Nov 2025 22:34:41 +0000 (14:34 -0800)
committerSean Christopherson <seanjc@google.com>
Thu, 8 Jan 2026 19:58:22 +0000 (11:58 -0800)
commit70b02809ded96ec790721cd5061e20b63b622310
tree7ec0d804a1498000da7b8c6282f0e1d5666706cd
parent44da6629d2820c8fd9ffa58cc7e46c2215828cb8
KVM: x86: Mark vmcs12 pages as dirty if and only if they're mapped

Mark vmcs12 pages as dirty (in KVM's dirty log bitmap) if and only if the
page is mapped, i.e. if the page is actually "active" in vmcs02.  For some
pages, KVM simply disables the associated VMCS control if the vmcs12 page
is unreachable, i.e. it's possible for nested VM-Enter to succeed with a
"bad" vmcs12 page.

Link: https://patch.msgid.link/20251121223444.355422-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/vmx/nested.c
include/linux/kvm_host.h