|
@@ -4247,6 +4247,9 @@ int emulate_instruction(struct kvm_vcpu *vcpu,
|
|
|
vcpu->arch.emulate_ctxt.perm_ok = false;
|
|
|
|
|
|
r = x86_decode_insn(&vcpu->arch.emulate_ctxt);
|
|
|
+ if (r == X86EMUL_PROPAGATE_FAULT)
|
|
|
+ goto done;
|
|
|
+
|
|
|
trace_kvm_emulate_insn_start(vcpu);
|
|
|
|
|
|
/* Only allow emulation of specific instructions on #UD
|
|
@@ -4305,6 +4308,7 @@ restart:
|
|
|
return handle_emulation_failure(vcpu);
|
|
|
}
|
|
|
|
|
|
+done:
|
|
|
if (vcpu->arch.emulate_ctxt.exception >= 0) {
|
|
|
inject_emulated_exception(vcpu);
|
|
|
r = EMULATE_DONE;
|