]> git.karo-electronics.de Git - karo-tx-linux.git/commit
KVM: Don't allow lmsw to clear cr0.pe
authorAvi Kivity <avi@redhat.com>
Tue, 11 May 2010 21:28:44 +0000 (00:28 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:23:01 +0000 (11:23 -0700)
commit52be6f3f5c4f964c154be2a97f9e22be6837c98d
tree6a1eb85cb811f2cf7265b2a92f27f55754fc5103
parent59aab522154a2f17b25335b63c1cf68a51fb6ae0
KVM: Don't allow lmsw to clear cr0.pe

The current lmsw implementation allows the guest to clear cr0.pe, contrary
to the manual, which breaks EMM386.EXE.

Fix by ORing the old cr0.pe with lmsw's operand.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
(Cherry-picked from commit f78e917688edbf1f14c318d2e50dc8e7dad20445)
arch/x86/kvm/x86.c