aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/x86_emulate
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-06-27 16:20:59 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-06-27 16:20:59 +0100
commit80982c971fc3d49622412a9b2cb038e004acef49 (patch)
treee65715c46bb7d0a43fdc968c40bdc8d5fa6b7611 /xen/arch/x86/x86_emulate
parentc5699e27710ea9678f37b29b4da48c964bfc7120 (diff)
downloadxen-80982c971fc3d49622412a9b2cb038e004acef49.tar.gz
xen-80982c971fc3d49622412a9b2cb038e004acef49.tar.bz2
xen-80982c971fc3d49622412a9b2cb038e004acef49.zip
hvm: Fix lmsw handling
The lmsw instruction can be used to set CR0_PE, but can never clear it, once set. Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Diffstat (limited to 'xen/arch/x86/x86_emulate')
-rw-r--r--xen/arch/x86/x86_emulate/x86_emulate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
index 33718f2e85..1e67c0f4d7 100644
--- a/xen/arch/x86/x86_emulate/x86_emulate.c
+++ b/xen/arch/x86/x86_emulate/x86_emulate.c
@@ -3284,7 +3284,7 @@ x86_emulate(
else if ( (rc = ops->read(ea.mem.seg, ea.mem.off,
&cr0w, 2, ctxt)) )
goto done;
- cr0 &= 0xffff0000;
+ cr0 &= 0xffff0001; /* lmsw can set, but never clear, PE */
cr0 |= (uint16_t)cr0w;
if ( (rc = ops->write_cr(0, cr0, ctxt)) )
goto done;