summaryrefslogtreecommitdiff
path: root/drivers/gpu/nova-core/fsp/hal/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorSean Christopherson <seanjc@google.com>2026-07-14 09:03:06 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2026-07-15 12:16:43 +0200
commit2f2312c422fd2695da772cecb30c69994b795964 (patch)
tree98bf1a5e7fa5945e1e64ad7a52280c2f9ecd540d /drivers/gpu/nova-core/fsp/hal/git@git.tavy.me:linux.git
parent5246d32d4b6c66f7c505c85523c8cc35c9dc0cf9 (diff)
KVM: nVMX: Put vmcs12 pages if nested VM-Enter fails due to invalid guest state
Put all vmcs12 pages if KVM synthesizes a nested VM-Exit due to invalid guest while emulating VMLAUNCH or VMRESUME. The invalid guest state path doesn't use nested_vmx_vmexit() as that API is intended to be used if and only if L2 is active, and the open coded equivalent neglects to put the vmcs12 pages. Failure to put the vmcs12 pages leaks any pinned pages (and/or mappings) if L1 retries VMLAUNCH/VMRESUME. Note, the !from_vmenter scenario doesn't suffer the same problem, as vmx_get_nested_state_pages() only gets/pins/maps the vmcs12 pages if L2 is active, i.e. if a "full" VM-Exit is guaranteed before KVM will retry getting vmcs12 pages. Fixes: 96c66e87deee ("KVM/nVMX: Use kvm_vcpu_map when mapping the virtual APIC page") Fixes: 3278e0492554 ("KVM/nVMX: Use kvm_vcpu_map when mapping the posted interrupt descriptor table") Fixes: fe1911aa443e ("KVM: nVMX: Use kvm_vcpu_map() to get/pin vmcs12's APIC-access page") Reported-by: Minh Nguyen <minhnguyen.080505@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'drivers/gpu/nova-core/fsp/hal/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions