mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
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
1 changed files with 3 additions and 1 deletions
|
@ -902,7 +902,9 @@ int hvf_vcpu_exec(CPUState *cpu)
|
||||||
macvm_set_rip(cpu, rip + ins_len);
|
macvm_set_rip(cpu, rip + ins_len);
|
||||||
break;
|
break;
|
||||||
case VMX_REASON_VMCALL:
|
case VMX_REASON_VMCALL:
|
||||||
/* TODO: inject #GP fault */
|
env->exception_injected = EXCP0D_GPF;
|
||||||
|
env->has_error_code = true;
|
||||||
|
env->error_code = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
error_report("%llx: unhandled exit %llx\n", rip, exit_reason);
|
error_report("%llx: unhandled exit %llx\n", rip, exit_reason);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue