aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r--arch/x86/kvm/svm.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 96dc232bfc56..5e1ed033cd7e 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1410,7 +1410,7 @@ static int nm_interception(struct vcpu_svm *svm)
1410 return 1; 1410 return 1;
1411} 1411}
1412 1412
1413static int mc_interception(struct vcpu_svm *svm) 1413static void svm_handle_mce(struct vcpu_svm *svm)
1414{ 1414{
1415 /* 1415 /*
1416 * On an #MC intercept the MCE handler is not called automatically in 1416 * On an #MC intercept the MCE handler is not called automatically in
@@ -1420,6 +1420,11 @@ static int mc_interception(struct vcpu_svm *svm)
1420 "int $0x12\n"); 1420 "int $0x12\n");
1421 /* not sure if we ever come back to this point */ 1421 /* not sure if we ever come back to this point */
1422 1422
1423 return;
1424}
1425
1426static int mc_interception(struct vcpu_svm *svm)
1427{
1423 return 1; 1428 return 1;
1424} 1429}
1425 1430
@@ -3088,6 +3093,14 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu)
3088 vcpu->arch.regs_avail &= ~(1 << VCPU_EXREG_PDPTR); 3093 vcpu->arch.regs_avail &= ~(1 << VCPU_EXREG_PDPTR);
3089 vcpu->arch.regs_dirty &= ~(1 << VCPU_EXREG_PDPTR); 3094 vcpu->arch.regs_dirty &= ~(1 << VCPU_EXREG_PDPTR);
3090 } 3095 }
3096
3097 /*
3098 * We need to handle MC intercepts here before the vcpu has a chance to
3099 * change the physical cpu
3100 */
3101 if (unlikely(svm->vmcb->control.exit_code ==
3102 SVM_EXIT_EXCP_BASE + MC_VECTOR))
3103 svm_handle_mce(svm);
3091} 3104}
3092 3105
3093#undef R 3106#undef R