Lines Matching refs:msrs

443 	bool execonly = vmx->nested.msrs.ept_caps & VMX_EPT_EXECUTE_ONLY_BIT;
444 int ept_lpage_level = ept_caps_to_lpage_level(vmx->nested.msrs.ept_caps);
923 u64 vmx_misc = vmx_control_msr(vmx->nested.msrs.misc_low,
924 vmx->nested.msrs.misc_high);
1255 vmx->nested.msrs.basic = data;
1259 static void vmx_get_control_msr(struct nested_vmx_msrs *msrs, u32 msr_index,
1264 *low = &msrs->pinbased_ctls_low;
1265 *high = &msrs->pinbased_ctls_high;
1268 *low = &msrs->procbased_ctls_low;
1269 *high = &msrs->procbased_ctls_high;
1272 *low = &msrs->exit_ctls_low;
1273 *high = &msrs->exit_ctls_high;
1276 *low = &msrs->entry_ctls_low;
1277 *high = &msrs->entry_ctls_high;
1280 *low = &msrs->secondary_ctls_low;
1281 *high = &msrs->secondary_ctls_high;
1306 vmx_get_control_msr(&vmx->nested.msrs, msr_index, &lowp, &highp);
1326 if ((vmx->nested.msrs.pinbased_ctls_high &
1341 vmx->nested.msrs.misc_low = data;
1342 vmx->nested.msrs.misc_high = data >> 32;
1356 vmx->nested.msrs.ept_caps = data;
1357 vmx->nested.msrs.vpid_caps = data >> 32;
1361 static u64 *vmx_get_fixed0_msr(struct nested_vmx_msrs *msrs, u32 msr_index)
1365 return &msrs->cr0_fixed0;
1367 return &msrs->cr4_fixed0;
1384 *vmx_get_fixed0_msr(&vmx->nested.msrs, msr_index) = data;
1442 vmx->nested.msrs.vmcs_enum = data;
1447 vmx->nested.msrs.vmfunc_controls = data;
1458 int vmx_get_vmx_msr(struct nested_vmx_msrs *msrs, u32 msr_index, u64 *pdata)
1462 *pdata = msrs->basic;
1467 msrs->pinbased_ctls_low,
1468 msrs->pinbased_ctls_high);
1475 msrs->procbased_ctls_low,
1476 msrs->procbased_ctls_high);
1483 msrs->exit_ctls_low,
1484 msrs->exit_ctls_high);
1491 msrs->entry_ctls_low,
1492 msrs->entry_ctls_high);
1498 msrs->misc_low,
1499 msrs->misc_high);
1502 *pdata = msrs->cr0_fixed0;
1505 *pdata = msrs->cr0_fixed1;
1508 *pdata = msrs->cr4_fixed0;
1511 *pdata = msrs->cr4_fixed1;
1514 *pdata = msrs->vmcs_enum;
1518 msrs->secondary_ctls_low,
1519 msrs->secondary_ctls_high);
1522 *pdata = msrs->ept_caps |
1523 ((u64)msrs->vpid_caps << 32);
1526 *pdata = msrs->vmfunc_controls;
2730 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_UC_BIT)))
2734 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_WB_BIT)))
2744 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_PAGE_WALK_5_BIT)))
2748 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_PAGE_WALK_4_BIT)))
2761 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_AD_BIT)))
2777 vmx->nested.msrs.pinbased_ctls_low,
2778 vmx->nested.msrs.pinbased_ctls_high)) ||
2780 vmx->nested.msrs.procbased_ctls_low,
2781 vmx->nested.msrs.procbased_ctls_high)))
2786 vmx->nested.msrs.secondary_ctls_low,
2787 vmx->nested.msrs.secondary_ctls_high)))
2814 ~vmx->nested.msrs.vmfunc_controls))
2836 vmx->nested.msrs.exit_ctls_low,
2837 vmx->nested.msrs.exit_ctls_high)) ||
2853 vmx->nested.msrs.entry_ctls_low,
2854 vmx->nested.msrs.entry_ctls_high)))
5715 if (!(vmx->nested.msrs.secondary_ctls_high &
5717 !(vmx->nested.msrs.ept_caps & VMX_EPT_INVEPT_BIT)) {
5729 types = (vmx->nested.msrs.ept_caps >> VMX_EPT_EXTENT_SHIFT) & 6;
5796 if (!(vmx->nested.msrs.secondary_ctls_high &
5798 !(vmx->nested.msrs.vpid_caps & VMX_VPID_INVVPID_BIT)) {
5810 types = (vmx->nested.msrs.vpid_caps &
6807 struct nested_vmx_msrs *msrs)
6809 msrs->pinbased_ctls_low =
6812 msrs->pinbased_ctls_high = vmcs_conf->pin_based_exec_ctrl;
6813 msrs->pinbased_ctls_high &=
6818 msrs->pinbased_ctls_high |=
6824 struct nested_vmx_msrs *msrs)
6826 msrs->exit_ctls_low =
6829 msrs->exit_ctls_high = vmcs_conf->vmexit_ctrl;
6830 msrs->exit_ctls_high &=
6836 msrs->exit_ctls_high |=
6843 msrs->exit_ctls_low &= ~VM_EXIT_SAVE_DEBUG_CONTROLS;
6847 struct nested_vmx_msrs *msrs)
6849 msrs->entry_ctls_low =
6852 msrs->entry_ctls_high = vmcs_conf->vmentry_ctrl;
6853 msrs->entry_ctls_high &=
6858 msrs->entry_ctls_high |=
6863 msrs->entry_ctls_low &= ~VM_ENTRY_LOAD_DEBUG_CONTROLS;
6867 struct nested_vmx_msrs *msrs)
6869 msrs->procbased_ctls_low =
6872 msrs->procbased_ctls_high = vmcs_conf->cpu_based_exec_ctrl;
6873 msrs->procbased_ctls_high &=
6893 msrs->procbased_ctls_high |=
6898 msrs->procbased_ctls_low &=
6904 struct nested_vmx_msrs *msrs)
6906 msrs->secondary_ctls_low = 0;
6908 msrs->secondary_ctls_high = vmcs_conf->cpu_based_2nd_exec_ctrl;
6909 msrs->secondary_ctls_high &=
6928 msrs->secondary_ctls_high |=
6933 msrs->secondary_ctls_high |=
6935 msrs->ept_caps =
6942 msrs->ept_caps &= ept_caps;
6943 msrs->ept_caps |= VMX_EPT_EXTENT_GLOBAL_BIT |
6947 msrs->secondary_ctls_high |=
6949 msrs->ept_caps |= VMX_EPT_AD_BIT;
6957 msrs->vmfunc_controls = VMX_VMFUNC_EPTP_SWITCHING;
6967 msrs->secondary_ctls_high |=
6969 msrs->vpid_caps = VMX_VPID_INVVPID_BIT |
6974 msrs->secondary_ctls_high |=
6978 msrs->secondary_ctls_high |=
6982 msrs->secondary_ctls_high |= SECONDARY_EXEC_ENCLS_EXITING;
6986 struct nested_vmx_msrs *msrs)
6988 msrs->misc_low = (u32)vmcs_conf->misc & VMX_MISC_SAVE_EFER_LMA;
6989 msrs->misc_low |=
6994 msrs->misc_high = 0;
6997 static void nested_vmx_setup_basic(struct nested_vmx_msrs *msrs)
7005 msrs->basic =
7012 msrs->basic |= VMX_BASIC_INOUT;
7015 static void nested_vmx_setup_cr_fixed(struct nested_vmx_msrs *msrs)
7024 msrs->cr0_fixed0 = VMXON_CR0_ALWAYSON;
7025 msrs->cr4_fixed0 = VMXON_CR4_ALWAYSON;
7028 rdmsrl(MSR_IA32_VMX_CR0_FIXED1, msrs->cr0_fixed1);
7029 rdmsrl(MSR_IA32_VMX_CR4_FIXED1, msrs->cr4_fixed1);
7032 msrs->cr4_fixed1 |= X86_CR4_UMIP;
7040 * Each of these control msrs has a low and high 32-bit half: A low bit is on
7047 struct nested_vmx_msrs *msrs = &vmcs_conf->nested;
7063 nested_vmx_setup_pinbased_ctls(vmcs_conf, msrs);
7065 nested_vmx_setup_exit_ctls(vmcs_conf, msrs);
7067 nested_vmx_setup_entry_ctls(vmcs_conf, msrs);
7069 nested_vmx_setup_cpubased_ctls(vmcs_conf, msrs);
7071 nested_vmx_setup_secondary_ctls(ept_caps, vmcs_conf, msrs);
7073 nested_vmx_setup_misc_data(vmcs_conf, msrs);
7075 nested_vmx_setup_basic(msrs);
7077 nested_vmx_setup_cr_fixed(msrs);
7079 msrs->vmcs_enum = nested_vmx_calc_vmcs_enum_msr();