i386: hvf: inject General Protection Fault when vmexit through vmcall
This patch injects a GP fault when the guest vmexit's by executing a vmcall instruction. Signed-off-by: Sergio Andres Gomez Del Real <Sergio.G.DelReal@gmail.com> Message-Id: <20170913090522.4022-15-Sergio.G.DelReal@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
b7394c8394
commit
3010460fb9
@ -902,7 +902,9 @@ int hvf_vcpu_exec(CPUState *cpu)
|
||||
macvm_set_rip(cpu, rip + ins_len);
|
||||
break;
|
||||
case VMX_REASON_VMCALL:
|
||||
/* TODO: inject #GP fault */
|
||||
env->exception_injected = EXCP0D_GPF;
|
||||
env->has_error_code = true;
|
||||
env->error_code = 0;
|
||||
break;
|
||||
default:
|
||||
error_report("%llx: unhandled exit %llx\n", rip, exit_reason);
|
||||
|
Loading…
Reference in New Issue
Block a user