@@ -1260,7 +1260,7 @@ done_prefixes:
}
done:
- return (rc == X86EMUL_UNHANDLEABLE) ? -1 : 0;
+ return rc;
}
static int pio_in_emulated(struct x86_emulate_ctxt *ctxt,
@@ -3856,6 +3856,10 @@ int emulate_instruction(struct kvm_vcpu *vcpu,
? X86EMUL_MODE_PROT32 : X86EMUL_MODE_PROT16;
r = x86_decode_insn(&vcpu->arch.emulate_ctxt, &emulate_ops);
+ if (r == X86EMUL_PROPAGATE_FAULT) {
+ kvm_propagate_fault(vcpu);
+ return EMULATE_DONE;
+ }
trace_kvm_emulate_insn_start(vcpu);
/* Only allow emulation of specific instructions on #UD