Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9928ff60 authored by Avi Kivity's avatar Avi Kivity
Browse files

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: default avatarAvi Kivity <avi@redhat.com>
parent e85d28f8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;