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.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index bba67b70c4b0..8fc6eea148e7 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -1828,6 +1828,7 @@ static int task_switch_interception(struct vcpu_svm *svm,
1828 int reason; 1828 int reason;
1829 int int_type = svm->vmcb->control.exit_int_info & 1829 int int_type = svm->vmcb->control.exit_int_info &
1830 SVM_EXITINTINFO_TYPE_MASK; 1830 SVM_EXITINTINFO_TYPE_MASK;
1831 int int_vec = svm->vmcb->control.exit_int_info & SVM_EVTINJ_VEC_MASK;
1831 1832
1832 tss_selector = (u16)svm->vmcb->control.exit_info_1; 1833 tss_selector = (u16)svm->vmcb->control.exit_info_1;
1833 1834
@@ -1843,8 +1844,14 @@ static int task_switch_interception(struct vcpu_svm *svm,
1843 reason = TASK_SWITCH_CALL; 1844 reason = TASK_SWITCH_CALL;
1844 1845
1845 1846
1846 if (reason != TASK_SWITCH_GATE || int_type == SVM_EXITINTINFO_TYPE_SOFT) 1847 if (reason != TASK_SWITCH_GATE ||
1847 skip_emulated_instruction(&svm->vcpu); 1848 int_type == SVM_EXITINTINFO_TYPE_SOFT ||
1849 (int_type == SVM_EXITINTINFO_TYPE_EXEPT &&
1850 (int_vec == OF_VECTOR || int_vec == BP_VECTOR))) {
1851 if (emulate_instruction(&svm->vcpu, kvm_run, 0, 0,
1852 EMULTYPE_SKIP) != EMULATE_DONE)
1853 return 0;
1854 }
1848 1855
1849 return kvm_task_switch(&svm->vcpu, tss_selector, reason); 1856 return kvm_task_switch(&svm->vcpu, tss_selector, reason);
1850} 1857}