]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: nVMX: WARN if subtly-impossible VMFUNC conditions occur
authorSean Christopherson <seanjc@google.com>
Wed, 9 Jun 2021 23:42:34 +0000 (16:42 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 17 Jun 2021 17:09:54 +0000 (13:09 -0400)
commit52f3cac71ec2098bb68d849d761f8315a8984aa9
tree4490e2fcf3ddefefb07f5f1445dc0c538e2a1533
parent8a3fab364cf24d6be5e63f4078321f9ee739b9b2
KVM: nVMX: WARN if subtly-impossible VMFUNC conditions occur

WARN and inject #UD when emulating VMFUNC for L2 if the function is
out-of-bounds or if VMFUNC is not enabled in vmcs12.  Neither condition
should occur in practice, as the CPU is supposed to prioritize the #UD
over VM-Exit for out-of-bounds input and KVM is supposed to enable
VMFUNC in vmcs02 if and only if it's enabled in vmcs12, but neither of
those dependencies is obvious.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20210609234235.1244004-15-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c