Skip to content

Commit

Permalink
KVM: x86 emulator: fix LMSW able to clear cr0.pe
Browse files Browse the repository at this point in the history
LMSW is documented not to be able to clear cr0.pe; make it so.

Signed-off-by: Avi Kivity <avi@redhat.com>
  • Loading branch information
Avi Kivity committed Oct 24, 2010
1 parent e85d28f commit 9928ff6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -3211,7 +3211,7 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
c->dst.val = ops->get_cr(0, ctxt->vcpu);
break;
case 6: /* lmsw */
ops->set_cr(0, (ops->get_cr(0, ctxt->vcpu) & ~0x0ful) |
ops->set_cr(0, (ops->get_cr(0, ctxt->vcpu) & ~0x0eul) |
(c->src.val & 0x0f), ctxt->vcpu);
c->dst.type = OP_NONE;
break;
Expand Down

0 comments on commit 9928ff6

Please sign in to comment.