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:
parent
dd430ca20c
commit
aca7f96600
1 changed files with 17 additions and 6 deletions
|
@ -1380,6 +1380,12 @@ twobyte_insn:
|
||||||
u16 size;
|
u16 size;
|
||||||
unsigned long address;
|
unsigned long address;
|
||||||
|
|
||||||
|
case 0: /* vmcall */
|
||||||
|
if (modrm_mod != 3 || modrm_rm != 1)
|
||||||
|
goto cannot_emulate;
|
||||||
|
|
||||||
|
/* nop */
|
||||||
|
break;
|
||||||
case 2: /* lgdt */
|
case 2: /* lgdt */
|
||||||
rc = read_descriptor(ctxt, ops, src.ptr,
|
rc = read_descriptor(ctxt, ops, src.ptr,
|
||||||
&size, &address, op_bytes);
|
&size, &address, op_bytes);
|
||||||
|
@ -1387,12 +1393,17 @@ twobyte_insn:
|
||||||
goto done;
|
goto done;
|
||||||
realmode_lgdt(ctxt->vcpu, size, address);
|
realmode_lgdt(ctxt->vcpu, size, address);
|
||||||
break;
|
break;
|
||||||
case 3: /* lidt */
|
case 3: /* lidt/vmmcall */
|
||||||
rc = read_descriptor(ctxt, ops, src.ptr,
|
if (modrm_mod == 3 && modrm_rm == 1) {
|
||||||
&size, &address, op_bytes);
|
/* nop */
|
||||||
if (rc)
|
} else {
|
||||||
goto done;
|
rc = read_descriptor(ctxt, ops, src.ptr,
|
||||||
realmode_lidt(ctxt->vcpu, size, address);
|
&size, &address,
|
||||||
|
op_bytes);
|
||||||
|
if (rc)
|
||||||
|
goto done;
|
||||||
|
realmode_lidt(ctxt->vcpu, size, address);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 4: /* smsw */
|
case 4: /* smsw */
|
||||||
if (modrm_mod != 3)
|
if (modrm_mod != 3)
|
||||||
|
|
Reference in a new issue