aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-08-01 11:35:24 -0400
committerAvi Kivity <avi@redhat.com>2010-10-24 04:50:28 -0400
commit9928ff608b1b6ba10fafde85f57970a83a181331 (patch)
treeea0975c4df94729300547a86fbb3b9280a6036c1 /arch
parente85d28f8e8cef09b8e424448ccedb7244cfbf147 (diff)
KVM: x86 emulator: fix LMSW able to clear cr0.pe
LMSW is documented not to be able to clear cr0.pe; make it so. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/emulate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 904fc1c99b97..4d49514a919e 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -3211,7 +3211,7 @@ twobyte_insn:
3211 c->dst.val = ops->get_cr(0, ctxt->vcpu); 3211 c->dst.val = ops->get_cr(0, ctxt->vcpu);
3212 break; 3212 break;
3213 case 6: /* lmsw */ 3213 case 6: /* lmsw */
3214 ops->set_cr(0, (ops->get_cr(0, ctxt->vcpu) & ~0x0ful) | 3214 ops->set_cr(0, (ops->get_cr(0, ctxt->vcpu) & ~0x0eul) |
3215 (c->src.val & 0x0f), ctxt->vcpu); 3215 (c->src.val & 0x0f), ctxt->vcpu);
3216 c->dst.type = OP_NONE; 3216 c->dst.type = OP_NONE;
3217 break; 3217 break;