diff options
author | Sergio Andres Gomez Del Real <sergio.g.delreal@gmail.com> | 2017-09-13 04:05:22 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2017-12-22 15:01:48 +0100 |
commit | 3010460fb99776bdf0a8b170555f2ab076382f9c (patch) | |
tree | 8bf21f41ed0bbfc3fbeebccb062a6316abca6834 /target | |
parent | b7394c8394d38cb38b6db14eb431cac7a91e7140 (diff) | |
download | qemu-3010460fb99776bdf0a8b170555f2ab076382f9c.zip |
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>
Diffstat (limited to 'target')
-rw-r--r-- | target/i386/hvf-all.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/target/i386/hvf-all.c b/target/i386/hvf-all.c index 1df13fbc19..126344f5be 100644 --- a/target/i386/hvf-all.c +++ b/target/i386/hvf-all.c @@ -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); |