*/
 static bool nested_svm_vmrun_msrpm(struct vcpu_svm *svm)
 {
-       struct hv_vmcb_enlightenments *hve = &svm->nested.ctl.hv_enlightenments;
        int i;
 
        /*
         * - Nested hypervisor (L1) is using Hyper-V emulation interface and
         * tells KVM (L0) there were no changes in MSR bitmap for L2.
         */
-       if (!svm->nested.force_msr_bitmap_recalc &&
-           kvm_hv_hypercall_enabled(&svm->vcpu) &&
-           hve->hv_enlightenments_control.msr_bitmap &&
-           (svm->nested.ctl.clean & BIT(HV_VMCB_NESTED_ENLIGHTENMENTS)))
-               goto set_msrpm_base_pa;
+#ifdef CONFIG_KVM_HYPERV
+       if (!svm->nested.force_msr_bitmap_recalc) {
+               struct hv_vmcb_enlightenments *hve = &svm->nested.ctl.hv_enlightenments;
+
+               if (kvm_hv_hypercall_enabled(&svm->vcpu) &&
+                   hve->hv_enlightenments_control.msr_bitmap &&
+                   (svm->nested.ctl.clean & BIT(HV_VMCB_NESTED_ENLIGHTENMENTS)))
+                       goto set_msrpm_base_pa;
+       }
+#endif
 
        if (!(vmcb12_is_intercept(&svm->nested.ctl, INTERCEPT_MSR_PROT)))
                return true;
 
        svm->nested.force_msr_bitmap_recalc = false;
 
+#ifdef CONFIG_KVM_HYPERV
 set_msrpm_base_pa:
+#endif
        svm->vmcb->control.msrpm_base_pa = __sme_set(__pa(svm->nested.msrpm));
 
        return true;
        to->msrpm_base_pa &= ~0x0fffULL;
        to->iopm_base_pa  &= ~0x0fffULL;
 
+#ifdef CONFIG_KVM_HYPERV
        /* Hyper-V extensions (Enlightened VMCB) */
        if (kvm_hv_hypercall_enabled(vcpu)) {
                to->clean = from->clean;
                memcpy(&to->hv_enlightenments, &from->hv_enlightenments,
                       sizeof(to->hv_enlightenments));
        }
+#endif
 }
 
 void nested_copy_vmcb_control_to_cache(struct vcpu_svm *svm,