Lines Matching defs:msrs
414 bool execonly = vmx->nested.msrs.ept_caps & VMX_EPT_EXECUTE_ONLY_BIT;
415 int ept_lpage_level = ept_caps_to_lpage_level(vmx->nested.msrs.ept_caps);
892 u64 vmx_misc = vmx_control_msr(vmx->nested.msrs.misc_low,
893 vmx->nested.msrs.misc_high);
1230 vmx->nested.msrs.basic = data;
1234 static void vmx_get_control_msr(struct nested_vmx_msrs *msrs, u32 msr_index,
1239 *low = &msrs->pinbased_ctls_low;
1240 *high = &msrs->pinbased_ctls_high;
1243 *low = &msrs->procbased_ctls_low;
1244 *high = &msrs->procbased_ctls_high;
1247 *low = &msrs->exit_ctls_low;
1248 *high = &msrs->exit_ctls_high;
1251 *low = &msrs->entry_ctls_low;
1252 *high = &msrs->entry_ctls_high;
1255 *low = &msrs->secondary_ctls_low;
1256 *high = &msrs->secondary_ctls_high;
1281 vmx_get_control_msr(&vmx->nested.msrs, msr_index, &lowp, &highp);
1301 if ((vmx->nested.msrs.pinbased_ctls_high &
1316 vmx->nested.msrs.misc_low = data;
1317 vmx->nested.msrs.misc_high = data >> 32;
1331 vmx->nested.msrs.ept_caps = data;
1332 vmx->nested.msrs.vpid_caps = data >> 32;
1336 static u64 *vmx_get_fixed0_msr(struct nested_vmx_msrs *msrs, u32 msr_index)
1340 return &msrs->cr0_fixed0;
1342 return &msrs->cr4_fixed0;
1359 *vmx_get_fixed0_msr(&vmx->nested.msrs, msr_index) = data;
1417 vmx->nested.msrs.vmcs_enum = data;
1422 vmx->nested.msrs.vmfunc_controls = data;
1433 int vmx_get_vmx_msr(struct nested_vmx_msrs *msrs, u32 msr_index, u64 *pdata)
1437 *pdata = msrs->basic;
1442 msrs->pinbased_ctls_low,
1443 msrs->pinbased_ctls_high);
1450 msrs->procbased_ctls_low,
1451 msrs->procbased_ctls_high);
1458 msrs->exit_ctls_low,
1459 msrs->exit_ctls_high);
1466 msrs->entry_ctls_low,
1467 msrs->entry_ctls_high);
1473 msrs->misc_low,
1474 msrs->misc_high);
1477 *pdata = msrs->cr0_fixed0;
1480 *pdata = msrs->cr0_fixed1;
1483 *pdata = msrs->cr4_fixed0;
1486 *pdata = msrs->cr4_fixed1;
1489 *pdata = msrs->vmcs_enum;
1493 msrs->secondary_ctls_low,
1494 msrs->secondary_ctls_high);
1497 *pdata = msrs->ept_caps |
1498 ((u64)msrs->vpid_caps << 32);
1501 *pdata = msrs->vmfunc_controls;
2694 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_UC_BIT)))
2698 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_WB_BIT)))
2708 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_PAGE_WALK_5_BIT)))
2712 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_PAGE_WALK_4_BIT)))
2725 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_AD_BIT)))
2741 vmx->nested.msrs.pinbased_ctls_low,
2742 vmx->nested.msrs.pinbased_ctls_high)) ||
2744 vmx->nested.msrs.procbased_ctls_low,
2745 vmx->nested.msrs.procbased_ctls_high)))
2750 vmx->nested.msrs.secondary_ctls_low,
2751 vmx->nested.msrs.secondary_ctls_high)))
2778 ~vmx->nested.msrs.vmfunc_controls))
2800 vmx->nested.msrs.exit_ctls_low,
2801 vmx->nested.msrs.exit_ctls_high)) ||
2817 vmx->nested.msrs.entry_ctls_low,
2818 vmx->nested.msrs.entry_ctls_high)))
5681 if (!(vmx->nested.msrs.secondary_ctls_high &
5683 !(vmx->nested.msrs.ept_caps & VMX_EPT_INVEPT_BIT)) {
5695 types = (vmx->nested.msrs.ept_caps >> VMX_EPT_EXTENT_SHIFT) & 6;
5762 if (!(vmx->nested.msrs.secondary_ctls_high &
5764 !(vmx->nested.msrs.vpid_caps & VMX_VPID_INVVPID_BIT)) {
5776 types = (vmx->nested.msrs.vpid_caps &
6765 struct nested_vmx_msrs *msrs)
6767 msrs->pinbased_ctls_low =
6770 msrs->pinbased_ctls_high = vmcs_conf->pin_based_exec_ctrl;
6771 msrs->pinbased_ctls_high &=
6776 msrs->pinbased_ctls_high |=
6782 struct nested_vmx_msrs *msrs)
6784 msrs->exit_ctls_low =
6787 msrs->exit_ctls_high = vmcs_conf->vmexit_ctrl;
6788 msrs->exit_ctls_high &=
6794 msrs->exit_ctls_high |=
6801 msrs->exit_ctls_low &= ~VM_EXIT_SAVE_DEBUG_CONTROLS;
6805 struct nested_vmx_msrs *msrs)
6807 msrs->entry_ctls_low =
6810 msrs->entry_ctls_high = vmcs_conf->vmentry_ctrl;
6811 msrs->entry_ctls_high &=
6816 msrs->entry_ctls_high |=
6821 msrs->entry_ctls_low &= ~VM_ENTRY_LOAD_DEBUG_CONTROLS;
6825 struct nested_vmx_msrs *msrs)
6827 msrs->procbased_ctls_low =
6830 msrs->procbased_ctls_high = vmcs_conf->cpu_based_exec_ctrl;
6831 msrs->procbased_ctls_high &=
6851 msrs->procbased_ctls_high |=
6856 msrs->procbased_ctls_low &=
6862 struct nested_vmx_msrs *msrs)
6864 msrs->secondary_ctls_low = 0;
6866 msrs->secondary_ctls_high = vmcs_conf->cpu_based_2nd_exec_ctrl;
6867 msrs->secondary_ctls_high &=
6886 msrs->secondary_ctls_high |=
6891 msrs->secondary_ctls_high |=
6893 msrs->ept_caps =
6900 msrs->ept_caps &= ept_caps;
6901 msrs->ept_caps |= VMX_EPT_EXTENT_GLOBAL_BIT |
6905 msrs->secondary_ctls_high |=
6907 msrs->ept_caps |= VMX_EPT_AD_BIT;
6915 msrs->vmfunc_controls = VMX_VMFUNC_EPTP_SWITCHING;
6925 msrs->secondary_ctls_high |=
6927 msrs->vpid_caps = VMX_VPID_INVVPID_BIT |
6932 msrs->secondary_ctls_high |=
6936 msrs->secondary_ctls_high |=
6940 msrs->secondary_ctls_high |= SECONDARY_EXEC_ENCLS_EXITING;
6944 struct nested_vmx_msrs *msrs)
6946 msrs->misc_low = (u32)vmcs_conf->misc & VMX_MISC_SAVE_EFER_LMA;
6947 msrs->misc_low |=
6952 msrs->misc_high = 0;
6955 static void nested_vmx_setup_basic(struct nested_vmx_msrs *msrs)
6963 msrs->basic =
6970 msrs->basic |= VMX_BASIC_INOUT;
6973 static void nested_vmx_setup_cr_fixed(struct nested_vmx_msrs *msrs)
6982 msrs->cr0_fixed0 = VMXON_CR0_ALWAYSON;
6983 msrs->cr4_fixed0 = VMXON_CR4_ALWAYSON;
6986 rdmsrl(MSR_IA32_VMX_CR0_FIXED1, msrs->cr0_fixed1);
6987 rdmsrl(MSR_IA32_VMX_CR4_FIXED1, msrs->cr4_fixed1);
6990 msrs->cr4_fixed1 |= X86_CR4_UMIP;
6998 * Each of these control msrs has a low and high 32-bit half: A low bit is on
7005 struct nested_vmx_msrs *msrs = &vmcs_conf->nested;
7021 nested_vmx_setup_pinbased_ctls(vmcs_conf, msrs);
7023 nested_vmx_setup_exit_ctls(vmcs_conf, msrs);
7025 nested_vmx_setup_entry_ctls(vmcs_conf, msrs);
7027 nested_vmx_setup_cpubased_ctls(vmcs_conf, msrs);
7029 nested_vmx_setup_secondary_ctls(ept_caps, vmcs_conf, msrs);
7031 nested_vmx_setup_misc_data(vmcs_conf, msrs);
7033 nested_vmx_setup_basic(msrs);
7035 nested_vmx_setup_cr_fixed(msrs);
7037 msrs->vmcs_enum = nested_vmx_calc_vmcs_enum_msr();