All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] Add vmmcall/vmcall to x86_emulate (v3)
@ 2007-09-17 19:57 Anthony Liguori
  2007-09-17 19:57   ` Anthony Liguori
       [not found] ` <1190059071649-git-send-email-aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Anthony Liguori @ 2007-09-17 19:57 UTC (permalink / raw)
  To: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f; +Cc: Anthony Liguori, Avi Kivity

Add vmmcall/vmcall to x86_emulate.  Future patch will implement functionality
for these instructions.

Signed-off-by: Anthony Liguori <aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 18c2b2c..a16bbd6 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1301,6 +1301,12 @@ twobyte_insn:
 			u16 size;
 			unsigned long address;
 
+		case 0: /* vmcall */
+			if (modrm_mod != 3 || modrm_rm != 1)
+				goto cannot_emulate;
+
+			/* nop */
+			break;
 		case 2: /* lgdt */
 			rc = read_descriptor(ctxt, ops, src.ptr,
 					     &size, &address, op_bytes);
@@ -1308,12 +1314,17 @@ twobyte_insn:
 				goto done;
 			realmode_lgdt(ctxt->vcpu, size, address);
 			break;
-		case 3: /* lidt */
-			rc = read_descriptor(ctxt, ops, src.ptr,
-					     &size, &address, op_bytes);
-			if (rc)
-				goto done;
-			realmode_lidt(ctxt->vcpu, size, address);
+		case 3: /* lidt/vmmcall */
+			if (modrm_mod == 3 && modrm_rm == 1) {
+				/* nop */
+			} else {
+				rc = read_descriptor(ctxt, ops, src.ptr,
+						     &size, &address,
+						     op_bytes);
+				if (rc)
+					goto done;
+				realmode_lidt(ctxt->vcpu, size, address);
+			}
 			break;
 		case 4: /* smsw */
 			if (modrm_mod != 3)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2007-09-18 13:31 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-17 19:57 [PATCH 1/3] Add vmmcall/vmcall to x86_emulate (v3) Anthony Liguori
2007-09-17 19:57 ` [PATCH 2/3] Refactor hypercall infrastructure (v3) Anthony Liguori
2007-09-17 19:57   ` Anthony Liguori
     [not found]   ` <11900590723438-git-send-email-aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-09-17 19:57     ` [PATCH 3/3] Add the paravirtualization CPUID entry to QEMU (v3) Anthony Liguori
2007-09-17 21:56   ` [kvm-devel] [PATCH 2/3] Refactor hypercall infrastructure (v3) Nakajima, Jun
2007-09-17 21:56     ` Nakajima, Jun
2007-09-18 13:10   ` [kvm-devel] " Avi Kivity
2007-09-18 13:10     ` Avi Kivity
2007-09-18 13:12     ` [kvm-devel] " Avi Kivity
2007-09-18 13:12       ` Avi Kivity
2007-09-18 13:27       ` [kvm-devel] " Avi Kivity
2007-09-18 13:27         ` Avi Kivity
2007-09-18 13:31         ` [kvm-devel] " Anthony Liguori
     [not found] ` <1190059071649-git-send-email-aliguori-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2007-09-18  9:18   ` [PATCH 1/3] Add vmmcall/vmcall to x86_emulate (v3) Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.