Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=aca7f96600b170e470b3056aba0ed8d7df8d330d
Commit:     aca7f96600b170e470b3056aba0ed8d7df8d330d
Parent:     dd430ca20c40ecccd6954a7efd13d4398f507728
Author:     Anthony Liguori <[EMAIL PROTECTED]>
AuthorDate: Mon Sep 17 14:57:49 2007 -0500
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 17:52:46 2008 +0200

    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]>
---
 drivers/kvm/x86_emulate.c |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/drivers/kvm/x86_emulate.c b/drivers/kvm/x86_emulate.c
index bd46de6..84af9cc 100644
--- a/drivers/kvm/x86_emulate.c
+++ b/drivers/kvm/x86_emulate.c
@@ -1380,6 +1380,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);
@@ -1387,12 +1393,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)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to