]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - arch/x86/kvm/svm.c
Merge tag 'v4.0.8' into xlnx_4.0.8-rt6
[zynq/linux.git] / arch / x86 / kvm / svm.c
index cc618c882f900ad21cb4de57d94daa91a5f4ec4c..1b32e2979de966e145087f688cc0ffea81d46e2e 100644 (file)
@@ -511,8 +511,10 @@ static void skip_emulated_instruction(struct kvm_vcpu *vcpu)
 {
        struct vcpu_svm *svm = to_svm(vcpu);
 
-       if (svm->vmcb->control.next_rip != 0)
+       if (svm->vmcb->control.next_rip != 0) {
+               WARN_ON(!static_cpu_has(X86_FEATURE_NRIPS));
                svm->next_rip = svm->vmcb->control.next_rip;
+       }
 
        if (!svm->next_rip) {
                if (emulate_instruction(vcpu, EMULTYPE_SKIP) !=
@@ -4310,7 +4312,9 @@ static int svm_check_intercept(struct kvm_vcpu *vcpu,
                break;
        }
 
-       vmcb->control.next_rip  = info->next_rip;
+       /* TODO: Advertise NRIPS to guest hypervisor unconditionally */
+       if (static_cpu_has(X86_FEATURE_NRIPS))
+               vmcb->control.next_rip  = info->next_rip;
        vmcb->control.exit_code = icpt_info.exit_code;
        vmexit = nested_svm_exit_handled(svm);
 
@@ -4374,6 +4378,7 @@ static struct kvm_x86_ops svm_x86_ops = {
        .cache_reg = svm_cache_reg,
        .get_rflags = svm_get_rflags,
        .set_rflags = svm_set_rflags,
+       .fpu_activate = svm_fpu_activate,
        .fpu_deactivate = svm_fpu_deactivate,
 
        .tlb_flush = svm_flush_tlb,