KVM: inject #UD if instruction emulation fails and exit to userspace
[deliverable/linux.git] / arch / x86 / kvm / mmu.c
index be981b1f188113476f6d7dbc5680b17aa34c3cfc..4a02dee1f2b56286ecd113b0b9c89e034902ee39 100644 (file)
@@ -2814,11 +2814,8 @@ int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t cr2, u32 error_code)
                return 1;
        case EMULATE_DO_MMIO:
                ++vcpu->stat.mmio_exits;
-               return 0;
+               /* fall through */
        case EMULATE_FAIL:
-               vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
-               vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_EMULATION;
-               vcpu->run->internal.ndata = 0;
                return 0;
        default:
                BUG();
This page took 0.0299 seconds and 5 git commands to generate.