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