]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
KVM: nVMX: Fix consistency check on injected exception error code
authorSean Christopherson <sean.j.christopherson@intel.com>
Tue, 1 Oct 2019 16:21:23 +0000 (09:21 -0700)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 18 Oct 2019 08:26:42 +0000 (04:26 -0400)
commitc2965171fc1514eb7f37a0cdab7189e284cceb7b
tree8072ca7f30905f44985562e03ba03faf002b68df
parent1063d7fef9950533738ee1d6a1816de194f2f820
KVM: nVMX: Fix consistency check on injected exception error code

BugLink: https://bugs.launchpad.net/bugs/1848039
[ Upstream commit 567926cca99ba1750be8aae9c4178796bf9bb90b ]

Current versions of Intel's SDM incorrectly state that "bits 31:15 of
the VM-Entry exception error-code field" must be zero.  In reality, bits
31:16 must be zero, i.e. error codes are 16-bit values.

The bogus error code check manifests as an unexpected VM-Entry failure
due to an invalid code field (error number 7) in L1, e.g. when injecting
a #GP with error_code=0x9f00.

Nadav previously reported the bug[*], both to KVM and Intel, and fixed
the associated kvm-unit-test.

[*] https://patchwork.kernel.org/patch/11124749/

Reported-by: Nadav Amit <namit@vmware.com>
Cc: stable@vger.kernel.org
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Jim Mattson <jmattson@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/x86/kvm/vmx/nested.c