Merge tag 'renesas-boards-cleanups2-for-v3.19' of git://git.kernel.org/pub/scm/linux...
[firefly-linux-kernel-4.4.55.git] / arch / x86 / kvm / svm.c
index 65510f624dfe2a42571bc22e73d8755a23e801e5..7527cefc5a43ac9f24a6b1bea6c1eab43299421f 100644 (file)
@@ -3251,7 +3251,7 @@ static int wrmsr_interception(struct vcpu_svm *svm)
        msr.host_initiated = false;
 
        svm->next_rip = kvm_rip_read(&svm->vcpu) + 2;
-       if (svm_set_msr(&svm->vcpu, &msr)) {
+       if (kvm_set_msr(&svm->vcpu, &msr)) {
                trace_kvm_msr_write_ex(ecx, data);
                kvm_inject_gp(&svm->vcpu, 0);
        } else {
@@ -3551,9 +3551,9 @@ static int handle_exit(struct kvm_vcpu *vcpu)
 
        if (exit_code >= ARRAY_SIZE(svm_exit_handlers)
            || !svm_exit_handlers[exit_code]) {
-               kvm_run->exit_reason = KVM_EXIT_UNKNOWN;
-               kvm_run->hw.hardware_exit_reason = exit_code;
-               return 0;
+               WARN_ONCE(1, "vmx: unexpected exit reason 0x%x\n", exit_code);
+               kvm_queue_exception(vcpu, UD_VECTOR);
+               return 1;
        }
 
        return svm_exit_handlers[exit_code](svm);