dect
/
linux-2.6
Archived
13
0
Fork 0

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 <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
Anthony Liguori 2007-09-17 14:57:49 -05:00 committed by Avi Kivity
parent dd430ca20c
commit aca7f96600
1 changed files with 17 additions and 6 deletions

View File

@ -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)