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()
2459 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_UC_BIT))) in valid_ept_address()
2463 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_WB_BIT))) in valid_ept_address()
2480 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_AD_BIT))) in valid_ept_address()
2496 vmx->nested.msrs.pinbased_ctls_low, in nested_check_vm_execution_controls()
2497 vmx->nested.msrs.pinbased_ctls_high)) || in nested_check_vm_execution_controls()
2499 vmx->nested.msrs.procbased_ctls_low, in nested_check_vm_execution_controls()
2500 vmx->nested.msrs.procbased_ctls_high))) in nested_check_vm_execution_controls()
2505 vmx->nested.msrs.secondary_ctls_low, in nested_check_vm_execution_controls()
2506 vmx->nested.msrs.secondary_ctls_high))) in nested_check_vm_execution_controls()
2533 ~vmx->nested.msrs.vmfunc_controls)) in nested_check_vm_execution_controls()
2555 vmx->nested.msrs.exit_ctls_low, in nested_check_vm_exit_controls()
2556 vmx->nested.msrs.exit_ctls_high)) || in nested_check_vm_exit_controls()
2572 vmx->nested.msrs.entry_ctls_low, in nested_check_vm_entry_controls()
2573 vmx->nested.msrs.entry_ctls_high))) in nested_check_vm_entry_controls()
4917 if (!(vmx->nested.msrs.secondary_ctls_high & in handle_invept()
4919 !(vmx->nested.msrs.ept_caps & VMX_EPT_INVEPT_BIT)) { in handle_invept()
4930 types = (vmx->nested.msrs.ept_caps >> VMX_EPT_EXTENT_SHIFT) & 6; in handle_invept()
4976 if (!(vmx->nested.msrs.secondary_ctls_high & in handle_invvpid()
4978 !(vmx->nested.msrs.vpid_caps & VMX_VPID_INVVPID_BIT)) { in handle_invvpid()
4989 types = (vmx->nested.msrs.vpid_caps & in handle_invvpid()
5787 void nested_vmx_setup_ctls_msrs(struct nested_vmx_msrs *msrs, u32 ept_caps, in nested_vmx_setup_ctls_msrs() argument
5807 msrs->pinbased_ctls_low, in nested_vmx_setup_ctls_msrs()
5808 msrs->pinbased_ctls_high); in nested_vmx_setup_ctls_msrs()
5809 msrs->pinbased_ctls_low |= in nested_vmx_setup_ctls_msrs()
5811 msrs->pinbased_ctls_high &= in nested_vmx_setup_ctls_msrs()
5816 msrs->pinbased_ctls_high |= in nested_vmx_setup_ctls_msrs()
5822 msrs->exit_ctls_low, in nested_vmx_setup_ctls_msrs()
5823 msrs->exit_ctls_high); in nested_vmx_setup_ctls_msrs()
5824 msrs->exit_ctls_low = in nested_vmx_setup_ctls_msrs()
5827 msrs->exit_ctls_high &= in nested_vmx_setup_ctls_msrs()
5832 msrs->exit_ctls_high |= in nested_vmx_setup_ctls_msrs()
5838 msrs->exit_ctls_low &= ~VM_EXIT_SAVE_DEBUG_CONTROLS; in nested_vmx_setup_ctls_msrs()
5842 msrs->entry_ctls_low, in nested_vmx_setup_ctls_msrs()
5843 msrs->entry_ctls_high); in nested_vmx_setup_ctls_msrs()
5844 msrs->entry_ctls_low = in nested_vmx_setup_ctls_msrs()
5846 msrs->entry_ctls_high &= in nested_vmx_setup_ctls_msrs()
5851 msrs->entry_ctls_high |= in nested_vmx_setup_ctls_msrs()
5855 msrs->entry_ctls_low &= ~VM_ENTRY_LOAD_DEBUG_CONTROLS; in nested_vmx_setup_ctls_msrs()
5859 msrs->procbased_ctls_low, in nested_vmx_setup_ctls_msrs()
5860 msrs->procbased_ctls_high); in nested_vmx_setup_ctls_msrs()
5861 msrs->procbased_ctls_low = in nested_vmx_setup_ctls_msrs()
5863 msrs->procbased_ctls_high &= in nested_vmx_setup_ctls_msrs()
5883 msrs->procbased_ctls_high |= in nested_vmx_setup_ctls_msrs()
5888 msrs->procbased_ctls_low &= in nested_vmx_setup_ctls_msrs()
5895 if (msrs->procbased_ctls_high & CPU_BASED_ACTIVATE_SECONDARY_CONTROLS) in nested_vmx_setup_ctls_msrs()
5897 msrs->secondary_ctls_low, in nested_vmx_setup_ctls_msrs()
5898 msrs->secondary_ctls_high); in nested_vmx_setup_ctls_msrs()
5900 msrs->secondary_ctls_low = 0; in nested_vmx_setup_ctls_msrs()
5901 msrs->secondary_ctls_high &= in nested_vmx_setup_ctls_msrs()
5917 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5922 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5924 msrs->ept_caps = VMX_EPT_PAGE_WALK_4_BIT | in nested_vmx_setup_ctls_msrs()
5927 msrs->ept_caps |= in nested_vmx_setup_ctls_msrs()
5929 msrs->ept_caps &= ept_caps; in nested_vmx_setup_ctls_msrs()
5930 msrs->ept_caps |= VMX_EPT_EXTENT_GLOBAL_BIT | in nested_vmx_setup_ctls_msrs()
5934 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5936 msrs->ept_caps |= VMX_EPT_AD_BIT; in nested_vmx_setup_ctls_msrs()
5941 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5948 msrs->vmfunc_controls = in nested_vmx_setup_ctls_msrs()
5959 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5961 msrs->vpid_caps = VMX_VPID_INVVPID_BIT | in nested_vmx_setup_ctls_msrs()
5966 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5970 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
5975 msrs->misc_low, in nested_vmx_setup_ctls_msrs()
5976 msrs->misc_high); in nested_vmx_setup_ctls_msrs()
5977 msrs->misc_low &= VMX_MISC_SAVE_EFER_LMA; in nested_vmx_setup_ctls_msrs()
5978 msrs->misc_low |= in nested_vmx_setup_ctls_msrs()
5982 msrs->misc_high = 0; in nested_vmx_setup_ctls_msrs()
5990 msrs->basic = in nested_vmx_setup_ctls_msrs()
5997 msrs->basic |= VMX_BASIC_INOUT; in nested_vmx_setup_ctls_msrs()
6006 msrs->cr0_fixed0 = VMXON_CR0_ALWAYSON; in nested_vmx_setup_ctls_msrs()
6007 msrs->cr4_fixed0 = VMXON_CR4_ALWAYSON; in nested_vmx_setup_ctls_msrs()
6010 rdmsrl(MSR_IA32_VMX_CR0_FIXED1, msrs->cr0_fixed1); in nested_vmx_setup_ctls_msrs()
6011 rdmsrl(MSR_IA32_VMX_CR4_FIXED1, msrs->cr4_fixed1); in nested_vmx_setup_ctls_msrs()
6014 msrs->vmcs_enum = VMCS12_MAX_FIELD_INDEX << 1; in nested_vmx_setup_ctls_msrs()