提交 9928ff60 编写于 作者: A Avi Kivity

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: NAvi Kivity <avi@redhat.com>
上级 e85d28f8
...@@ -3211,7 +3211,7 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt) ...@@ -3211,7 +3211,7 @@ x86_emulate_insn(struct x86_emulate_ctxt *ctxt)
c->dst.val = ops->get_cr(0, ctxt->vcpu); c->dst.val = ops->get_cr(0, ctxt->vcpu);
break; break;
case 6: /* lmsw */ 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->src.val & 0x0f), ctxt->vcpu);
c->dst.type = OP_NONE; c->dst.type = OP_NONE;
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册