]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: emulate #UD while in guest mode
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Jan 2018 15:55:24 +0000 (16:55 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 11 Jan 2018 15:55:24 +0000 (16:55 +0100)
commit44ad61b9cd2439ca8b3988dff82d8b7d42948b80
tree0fa8919b8016ba59387b83ca38c0d39cf99bbb73
parentef70740b97b9982c647f5c9111e5fd6a1b197b22
KVM: x86: emulate #UD while in guest mode

This reverts commits fb2d0437a96aabd50631a5d14fca56273f88b821
and 95f49397ca8eb0bac5da6c283f3e8b19bf5b5d3e.

If the hardware doesn't support MOVBE, but L0 sets CPUID.01H:ECX.MOVBE
in L1's emulated CPUID information, then L1 is likely to pass that
CPUID bit through to L2. L2 will expect MOVBE to work, but if L1
doesn't intercept #UD, then any MOVBE instruction executed in L2 will
raise #UD, and the exception will be delivered in L2.

Commit 95f49397ca8eb0bac5da6c283f3e8b19bf5b5d3e is a better and more
complete version of fb2d0437a96a ("KVM: nVMX: Do not emulate #UD while
in guest mode"); however, neither considers the above case.

Suggested-by: Jim Mattson <jmattson@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c