]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: Free only guest_mode (L2) roots on INVVPID w/o EPT
authorSean Christopherson <seanjc@google.com>
Wed, 9 Jun 2021 23:42:29 +0000 (16:42 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Jun 2021 17:09:53 +0000 (13:09 -0400)
commit885257828be9c03bdbdb50566b7afae37542f6ce
tree186ca453be70d123681fe9e8a65d5e56e5084e91
parent3212cf0ef8b496391ab363aa138157dcaa845fe9
KVM: nVMX: Free only guest_mode (L2) roots on INVVPID w/o EPT

When emulating INVVPID for L1, free only L2+ roots, using the guest_mode
tag in the MMU role to identify L2+ roots.  From L1's perspective, its
own TLB entries use VPID=0, and INVVPID is not requied to invalidate such
entries.  Per Intel's SDM, INVVPID _may_ invalidate entries with VPID=0,
but it is not required to do so.

Cc: Lai Jiangshan <laijs@linux.alibaba.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210609234235.1244004-10-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/mmu/mmu.c
arch/x86/kvm/vmx/nested.c