Lines Matching refs:msrs
352 to_vmx(vcpu)->nested.msrs.ept_caps & in nested_ept_init_mmu_context()
882 u64 vmx_misc = vmx_control_msr(vmx->nested.msrs.misc_low, in nested_vmx_max_atomic_switch_msrs()
883 vmx->nested.msrs.misc_high); in nested_vmx_max_atomic_switch_msrs()
1063 u64 vmx_basic = vmx->nested.msrs.basic; in vmx_restore_vmx_basic()
1082 vmx->nested.msrs.basic = data; in vmx_restore_vmx_basic()
1094 lowp = &vmx->nested.msrs.pinbased_ctls_low; in vmx_restore_control_msr()
1095 highp = &vmx->nested.msrs.pinbased_ctls_high; in vmx_restore_control_msr()
1098 lowp = &vmx->nested.msrs.procbased_ctls_low; in vmx_restore_control_msr()
1099 highp = &vmx->nested.msrs.procbased_ctls_high; in vmx_restore_control_msr()
1102 lowp = &vmx->nested.msrs.exit_ctls_low; in vmx_restore_control_msr()
1103 highp = &vmx->nested.msrs.exit_ctls_high; in vmx_restore_control_msr()
1106 lowp = &vmx->nested.msrs.entry_ctls_low; in vmx_restore_control_msr()
1107 highp = &vmx->nested.msrs.entry_ctls_high; in vmx_restore_control_msr()
1110 lowp = &vmx->nested.msrs.secondary_ctls_low; in vmx_restore_control_msr()
1111 highp = &vmx->nested.msrs.secondary_ctls_high; in vmx_restore_control_msr()
1142 vmx_misc = vmx_control_msr(vmx->nested.msrs.misc_low, in vmx_restore_vmx_misc()
1143 vmx->nested.msrs.misc_high); in vmx_restore_vmx_misc()
1148 if ((vmx->nested.msrs.pinbased_ctls_high & in vmx_restore_vmx_misc()
1163 vmx->nested.msrs.misc_low = data; in vmx_restore_vmx_misc()
1164 vmx->nested.msrs.misc_high = data >> 32; in vmx_restore_vmx_misc()
1173 vmx_ept_vpid_cap = vmx_control_msr(vmx->nested.msrs.ept_caps, in vmx_restore_vmx_ept_vpid_cap()
1174 vmx->nested.msrs.vpid_caps); in vmx_restore_vmx_ept_vpid_cap()
1180 vmx->nested.msrs.ept_caps = data; in vmx_restore_vmx_ept_vpid_cap()
1181 vmx->nested.msrs.vpid_caps = data >> 32; in vmx_restore_vmx_ept_vpid_cap()
1191 msr = &vmx->nested.msrs.cr0_fixed0; in vmx_restore_fixed0_msr()
1194 msr = &vmx->nested.msrs.cr4_fixed0; in vmx_restore_fixed0_msr()
1265 vmx->nested.msrs.vmcs_enum = data; in vmx_set_vmx_msr()
1268 if (data & ~vmx->nested.msrs.vmfunc_controls) in vmx_set_vmx_msr()
1270 vmx->nested.msrs.vmfunc_controls = data; in vmx_set_vmx_msr()
1281 int vmx_get_vmx_msr(struct nested_vmx_msrs *msrs, u32 msr_index, u64 *pdata) in vmx_get_vmx_msr() argument
1285 *pdata = msrs->basic; in vmx_get_vmx_msr()
1290 msrs->pinbased_ctls_low, in vmx_get_vmx_msr()
1291 msrs->pinbased_ctls_high); in vmx_get_vmx_msr()
1298 msrs->procbased_ctls_low, in vmx_get_vmx_msr()
1299 msrs->procbased_ctls_high); in vmx_get_vmx_msr()
1306 msrs->exit_ctls_low, in vmx_get_vmx_msr()
1307 msrs->exit_ctls_high); in vmx_get_vmx_msr()
1314 msrs->entry_ctls_low, in vmx_get_vmx_msr()
1315 msrs->entry_ctls_high); in vmx_get_vmx_msr()
1321 msrs->misc_low, in vmx_get_vmx_msr()
1322 msrs->misc_high); in vmx_get_vmx_msr()
1325 *pdata = msrs->cr0_fixed0; in vmx_get_vmx_msr()
1328 *pdata = msrs->cr0_fixed1; in vmx_get_vmx_msr()
1331 *pdata = msrs->cr4_fixed0; in vmx_get_vmx_msr()
1334 *pdata = msrs->cr4_fixed1; in vmx_get_vmx_msr()
1337 *pdata = msrs->vmcs_enum; in vmx_get_vmx_msr()
1341 msrs->secondary_ctls_low, in vmx_get_vmx_msr()
1342 msrs->secondary_ctls_high); in vmx_get_vmx_msr()
1345 *pdata = msrs->ept_caps | in vmx_get_vmx_msr()
1346 ((u64)msrs->vpid_caps << 32); in vmx_get_vmx_msr()
1349 *pdata = msrs->vmfunc_controls; in vmx_get_vmx_msr()
2469 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_UC_BIT))) in valid_ept_address()
2473 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_WB_BIT))) in valid_ept_address()
2490 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_AD_BIT))) in valid_ept_address()
2506 vmx->nested.msrs.pinbased_ctls_low, in nested_check_vm_execution_controls()
2507 vmx->nested.msrs.pinbased_ctls_high)) || in nested_check_vm_execution_controls()
2509 vmx->nested.msrs.procbased_ctls_low, in nested_check_vm_execution_controls()
2510 vmx->nested.msrs.procbased_ctls_high))) in nested_check_vm_execution_controls()
2515 vmx->nested.msrs.secondary_ctls_low, in nested_check_vm_execution_controls()
2516 vmx->nested.msrs.secondary_ctls_high))) in nested_check_vm_execution_controls()
2543 ~vmx->nested.msrs.vmfunc_controls)) in nested_check_vm_execution_controls()
2565 vmx->nested.msrs.exit_ctls_low, in nested_check_vm_exit_controls()
2566 vmx->nested.msrs.exit_ctls_high)) || in nested_check_vm_exit_controls()
2582 vmx->nested.msrs.entry_ctls_low, in nested_check_vm_entry_controls()
2583 vmx->nested.msrs.entry_ctls_high))) in nested_check_vm_entry_controls()
4927 if (!(vmx->nested.msrs.secondary_ctls_high & in handle_invept()
4929 !(vmx->nested.msrs.ept_caps & VMX_EPT_INVEPT_BIT)) { in handle_invept()
4940 types = (vmx->nested.msrs.ept_caps >> VMX_EPT_EXTENT_SHIFT) & 6; in handle_invept()
4986 if (!(vmx->nested.msrs.secondary_ctls_high & in handle_invvpid()
4988 !(vmx->nested.msrs.vpid_caps & VMX_VPID_INVVPID_BIT)) { in handle_invvpid()
4999 types = (vmx->nested.msrs.vpid_caps & in handle_invvpid()
5797 void nested_vmx_setup_ctls_msrs(struct nested_vmx_msrs *msrs, u32 ept_caps, in nested_vmx_setup_ctls_msrs() argument
5817 msrs->pinbased_ctls_low, in nested_vmx_setup_ctls_msrs()
5818 msrs->pinbased_ctls_high); in nested_vmx_setup_ctls_msrs()
5819 msrs->pinbased_ctls_low |= in nested_vmx_setup_ctls_msrs()
5821 msrs->pinbased_ctls_high &= in nested_vmx_setup_ctls_msrs()
5826 msrs->pinbased_ctls_high |= in nested_vmx_setup_ctls_msrs()
5832 msrs->exit_ctls_low, in nested_vmx_setup_ctls_msrs()
5833 msrs->exit_ctls_high); in nested_vmx_setup_ctls_msrs()
5834 msrs->exit_ctls_low = in nested_vmx_setup_ctls_msrs()
5837 msrs->exit_ctls_high &= in nested_vmx_setup_ctls_msrs()
5842 msrs->exit_ctls_high |= in nested_vmx_setup_ctls_msrs()
5848 msrs->exit_ctls_low &= ~VM_EXIT_SAVE_DEBUG_CONTROLS; in nested_vmx_setup_ctls_msrs()
5852 msrs->entry_ctls_low, in nested_vmx_setup_ctls_msrs()
5853 msrs->entry_ctls_high); in nested_vmx_setup_ctls_msrs()
5854 msrs->entry_ctls_low = in nested_vmx_setup_ctls_msrs()
5856 msrs->entry_ctls_high &= in nested_vmx_setup_ctls_msrs()
5861 msrs->entry_ctls_high |= in nested_vmx_setup_ctls_msrs()
5865 msrs->entry_ctls_low &= ~VM_ENTRY_LOAD_DEBUG_CONTROLS; in nested_vmx_setup_ctls_msrs()
5869 msrs->procbased_ctls_low, in nested_vmx_setup_ctls_msrs()
5870 msrs->procbased_ctls_high); in nested_vmx_setup_ctls_msrs()
5871 msrs->procbased_ctls_low = in nested_vmx_setup_ctls_msrs()
5873 msrs->procbased_ctls_high &= in nested_vmx_setup_ctls_msrs()
5893 msrs->procbased_ctls_high |= in nested_vmx_setup_ctls_msrs()
5898 msrs->procbased_ctls_low &= in nested_vmx_setup_ctls_msrs()
5905 if (msrs->procbased_ctls_high & CPU_BASED_ACTIVATE_SECONDARY_CONTROLS) in nested_vmx_setup_ctls_msrs()
5907 msrs->secondary_ctls_low, in nested_vmx_setup_ctls_msrs()
5908 msrs->secondary_ctls_high); in nested_vmx_setup_ctls_msrs()
5910 msrs->secondary_ctls_low = 0; in nested_vmx_setup_ctls_msrs()
5911 msrs->secondary_ctls_high &= in nested_vmx_setup_ctls_msrs()
5927 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5932 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5934 msrs->ept_caps = VMX_EPT_PAGE_WALK_4_BIT | in nested_vmx_setup_ctls_msrs()
5937 msrs->ept_caps |= in nested_vmx_setup_ctls_msrs()
5939 msrs->ept_caps &= ept_caps; in nested_vmx_setup_ctls_msrs()
5940 msrs->ept_caps |= VMX_EPT_EXTENT_GLOBAL_BIT | in nested_vmx_setup_ctls_msrs()
5944 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5946 msrs->ept_caps |= VMX_EPT_AD_BIT; in nested_vmx_setup_ctls_msrs()
5951 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5958 msrs->vmfunc_controls = in nested_vmx_setup_ctls_msrs()
5969 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5971 msrs->vpid_caps = VMX_VPID_INVVPID_BIT | in nested_vmx_setup_ctls_msrs()
5976 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5980 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5985 msrs->misc_low, in nested_vmx_setup_ctls_msrs()
5986 msrs->misc_high); in nested_vmx_setup_ctls_msrs()
5987 msrs->misc_low &= VMX_MISC_SAVE_EFER_LMA; in nested_vmx_setup_ctls_msrs()
5988 msrs->misc_low |= in nested_vmx_setup_ctls_msrs()
5992 msrs->misc_high = 0; in nested_vmx_setup_ctls_msrs()
6000 msrs->basic = in nested_vmx_setup_ctls_msrs()
6007 msrs->basic |= VMX_BASIC_INOUT; in nested_vmx_setup_ctls_msrs()
6016 msrs->cr0_fixed0 = VMXON_CR0_ALWAYSON; in nested_vmx_setup_ctls_msrs()
6017 msrs->cr4_fixed0 = VMXON_CR4_ALWAYSON; in nested_vmx_setup_ctls_msrs()
6020 rdmsrl(MSR_IA32_VMX_CR0_FIXED1, msrs->cr0_fixed1); in nested_vmx_setup_ctls_msrs()
6021 rdmsrl(MSR_IA32_VMX_CR4_FIXED1, msrs->cr4_fixed1); in nested_vmx_setup_ctls_msrs()
6024 msrs->vmcs_enum = VMCS12_MAX_FIELD_INDEX << 1; in nested_vmx_setup_ctls_msrs()