]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: nSVM: test eax for 4K alignment for GP errata workaround
authorMaxim Levitsky <mlevitsk@redhat.com>
Tue, 14 Sep 2021 15:48:14 +0000 (18:48 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Sep 2021 14:05:29 +0000 (10:05 -0400)
commit9ff9ba4409c2014c50c7c296f8429c23c2e957e9
tree6c318e8097f35749ce95b53f0a6cdf57bdaae069
parent0de08c289ab51f1139aa297183018f4814ab6956
KVM: x86: nSVM: test eax for 4K alignment for GP errata workaround

GP SVM errata workaround made the #GP handler always emulate
the SVM instructions.

However these instructions #GP in case the operand is not 4K aligned,
but the workaround code didn't check this and we ended up
emulating these instructions anyway.

This is only an emulation accuracy check bug as there is no harm for
KVM to read/write unaligned vmcb images.

Fixes: 9c2799711caf ("KVM: SVM: Add emulation support for #GP triggered by SVM instructions")
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20210914154825.104886-4-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c