diff options
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/svm.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index ac3d5ba48d61..1315ce025e57 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -228,7 +228,9 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu) | |||
228 | struct vcpu_svm *svm = to_svm(vcpu); | 228 | struct vcpu_svm *svm = to_svm(vcpu); |
229 | 229 | ||
230 | if (!svm->next_rip) { | 230 | if (!svm->next_rip) { |
231 | printk(KERN_DEBUG "%s: NOP\n", __func__); | 231 | if (emulate_instruction(vcpu, vcpu->run, 0, 0, EMULTYPE_SKIP) != |
232 | EMULATE_DONE) | ||
233 | printk(KERN_DEBUG "%s: NOP\n", __func__); | ||
232 | return; | 234 | return; |
233 | } | 235 | } |
234 | if (svm->next_rip - kvm_rip_read(vcpu) > MAX_INST_SIZE) | 236 | if (svm->next_rip - kvm_rip_read(vcpu) > MAX_INST_SIZE) |
@@ -1868,11 +1870,8 @@ static int task_switch_interception(struct vcpu_svm *svm, | |||
1868 | if (reason != TASK_SWITCH_GATE || | 1870 | if (reason != TASK_SWITCH_GATE || |
1869 | int_type == SVM_EXITINTINFO_TYPE_SOFT || | 1871 | int_type == SVM_EXITINTINFO_TYPE_SOFT || |
1870 | (int_type == SVM_EXITINTINFO_TYPE_EXEPT && | 1872 | (int_type == SVM_EXITINTINFO_TYPE_EXEPT && |
1871 | (int_vec == OF_VECTOR || int_vec == BP_VECTOR))) { | 1873 | (int_vec == OF_VECTOR || int_vec == BP_VECTOR))) |
1872 | if (emulate_instruction(&svm->vcpu, kvm_run, 0, 0, | 1874 | skip_emulated_instruction(&svm->vcpu); |
1873 | EMULTYPE_SKIP) != EMULATE_DONE) | ||
1874 | return 0; | ||
1875 | } | ||
1876 | 1875 | ||
1877 | return kvm_task_switch(&svm->vcpu, tss_selector, reason); | 1876 | return kvm_task_switch(&svm->vcpu, tss_selector, reason); |
1878 | } | 1877 | } |