Re: [PATCH] KVM: x86 emulator: fix LMSW able to clear cr0.pe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/02/2010 05:35 AM, Avi Kivity wrote:
LMSW is documented not to be able to set cr0.pe; make it so.

The code is correct, but LMSW is documented not to be able to _clear_ cr0.pe. :)

Paolo

Signed-off-by: Avi Kivity<avi@xxxxxxxxxx>
---
  arch/x86/kvm/emulate.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index dc1ecff..05f80f7 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -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;

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux