Commit 68339a1
KVM: nVMX: Fix handling of lmsw instruction
[ Upstream commit e1d39b1 ]
The decision whether or not to exit from L2 to L1 on an lmsw instruction is
based on bogus values: instead of using the information encoded within the
exit qualification, it uses the data also used for the mov-to-cr
instruction, which boils down to using whatever is in %eax at that point.
Use the correct values instead.
Without this fix, an L1 may not get notified when a 32-bit Linux L2
switches its secondary CPUs to protected mode; the L1 is only notified on
the next modification of CR0. This short time window poses a problem, when
there is some other reason to exit to L1 in between. Then, L2 will be
resumed in real mode and chaos ensues.
Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
Reviewed-by: Wanpeng Li <wanpeng.li@hotmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent fc0f7a3 commit 68339a1
1 file changed
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6935 | 6935 | | |
6936 | 6936 | | |
6937 | 6937 | | |
6938 | | - | |
6939 | | - | |
| 6938 | + | |
| 6939 | + | |
6940 | 6940 | | |
6941 | 6941 | | |
6942 | 6942 | | |
| 6943 | + | |
| 6944 | + | |
6943 | 6945 | | |
6944 | 6946 | | |
6945 | 6947 | | |
| |||
6994 | 6996 | | |
6995 | 6997 | | |
6996 | 6998 | | |
| 6999 | + | |
6997 | 7000 | | |
6998 | 7001 | | |
6999 | 7002 | | |
| |||
0 commit comments