repository: /home/avi/kvm/linux-2.6
branch: kvm-updates-2.6.25
commit 32aaa29929de03f61d53a95f6645c9b6fed99670
Author: Anthony Liguori <[EMAIL PROTECTED]>
Date:   Mon Sep 17 14:57:49 2007 -0500

    KVM: x86 emulator: Add vmmcall/vmcall to x86_emulate (v3)
    
    Add vmmcall/vmcall to x86_emulate.  Future patch will implement 
functionality
    for these instructions.
    
    Signed-off-by: Anthony Liguori <[EMAIL PROTECTED]>
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index 9737c3b..a333755 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1363,6 +1363,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);
@@ -1370,12 +1376,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: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-commits mailing list
kvm-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-commits

Reply via email to