KVM: nSVM: Use KVM-governed feature framework to track "vGIF enabled"
[linux-2.6-microblaze.git] / arch / x86 / kvm / svm / nested.c
index ac03b2b..dd496c9 100644 (file)
@@ -660,7 +660,8 @@ static void nested_vmcb02_prepare_control(struct vcpu_svm *svm,
         * exit_int_info, exit_int_info_err, next_rip, insn_len, insn_bytes.
         */
 
-       if (svm->vgif_enabled && (svm->nested.ctl.int_ctl & V_GIF_ENABLE_MASK))
+       if (guest_can_use(vcpu, X86_FEATURE_VGIF) &&
+           (svm->nested.ctl.int_ctl & V_GIF_ENABLE_MASK))
                int_ctl_vmcb12_bits |= (V_GIF_MASK | V_GIF_ENABLE_MASK);
        else
                int_ctl_vmcb01_bits |= (V_GIF_MASK | V_GIF_ENABLE_MASK);