Skip to contentSkip to conversation

KVM: x86 emulator: fix LMSW able to clear cr0.pe

PATCH New Avi Kivity 1 participant 1 message Aug 1, 2010

Subsystems (3)
lore
Share & tools
lore

Avi Kivity

author
#0 lore raw

PATCH 1/1 KVM: x86 emulator: fix LMSW able to clear cr0.pe

LMSW is documented not to be able to set cr0.pe; make it so.

---
 arch/x86/kvm/emulate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/emulate.c +1 -1
index dc1ecff..05f80f7 100644
@@ -3212,7 +3212,7 @@ twobyte_insn:
 			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;
Signature · 1 line
1.7.1