mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] KVM: x86 emulator: handle smsw
@ 2006-11-30 13:18 Avi Kivity
  0 siblings, 0 replies; only message in thread
From: Avi Kivity @ 2006-11-30 13:18 UTC (permalink / raw)
  To: kvm-devel; +Cc: linux-kernel, mingo, akpm

This allows FreeBSD 6.2rc1 to boot.

Also, don't pretend to support lmsw (mem).

Signed-off-by: Avi Kivity <avi@qumranet.com>

Index: linux-2.6/drivers/kvm/x86_emulate.c
===================================================================
--- linux-2.6.orig/drivers/kvm/x86_emulate.c
+++ linux-2.6/drivers/kvm/x86_emulate.c
@@ -1166,7 +1166,15 @@ twobyte_insn:
 				goto done;
 			realmode_lidt(ctxt->vcpu, size, address);
 			break;
+		case 4: /* smsw */
+			if (modrm_mod != 3)
+				goto cannot_emulate;
+			*(u16 *)&_regs[modrm_rm]
+				= realmode_get_cr(ctxt->vcpu, 0);
+			break;
 		case 6: /* lmsw */
+			if (modrm_mod != 3)
+				goto cannot_emulate;
 			realmode_lmsw(ctxt->vcpu, (u16)modrm_val, &_eflags);
 			break;
 		case 7: /* invlpg*/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-11-30 13:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-30 13:18 [PATCH] KVM: x86 emulator: handle smsw Avi Kivity

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®