]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: nSVM: skip eax alignment check for non-SVM instructions
authorDenis Valeev <lemniscattaden@gmail.com>
Sat, 22 Jan 2022 20:13:57 +0000 (23:13 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 Jan 2022 17:14:59 +0000 (12:14 -0500)
commit23aae853f68e5f1b4e3d1470a79bf044510110f2
tree198aafde66380607f17602b1b549876f752ad7f3
parent3aca13639d3cefe440a0a08cc4b601e6960c5d11
KVM: x86: nSVM: skip eax alignment check for non-SVM instructions

The bug occurs on #GP triggered by VMware backdoor when eax value is
unaligned. eax alignment check should not be applied to non-SVM
instructions because it leads to incorrect omission of the instructions
emulation.
Apply the alignment check only to SVM instructions to fix.

Fixes: 9ff9ba4409c2 ("KVM: x86: nSVM: test eax for 4K alignment for GP errata workaround")
Signed-off-by: Denis Valeev <lemniscattaden@gmail.com>
Message-Id: <Yexlhaoe1Fscm59u@q>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c