Lines Matching refs:msrs
394 to_vmx(vcpu)->nested.msrs.ept_caps & in nested_ept_new_eptp()
921 u64 vmx_misc = vmx_control_msr(vmx->nested.msrs.misc_low, in nested_vmx_max_atomic_switch_msrs()
922 vmx->nested.msrs.misc_high); in nested_vmx_max_atomic_switch_msrs()
1234 u64 vmx_basic = vmx->nested.msrs.basic; in vmx_restore_vmx_basic()
1253 vmx->nested.msrs.basic = data; in vmx_restore_vmx_basic()
1265 lowp = &vmx->nested.msrs.pinbased_ctls_low; in vmx_restore_control_msr()
1266 highp = &vmx->nested.msrs.pinbased_ctls_high; in vmx_restore_control_msr()
1269 lowp = &vmx->nested.msrs.procbased_ctls_low; in vmx_restore_control_msr()
1270 highp = &vmx->nested.msrs.procbased_ctls_high; in vmx_restore_control_msr()
1273 lowp = &vmx->nested.msrs.exit_ctls_low; in vmx_restore_control_msr()
1274 highp = &vmx->nested.msrs.exit_ctls_high; in vmx_restore_control_msr()
1277 lowp = &vmx->nested.msrs.entry_ctls_low; in vmx_restore_control_msr()
1278 highp = &vmx->nested.msrs.entry_ctls_high; in vmx_restore_control_msr()
1281 lowp = &vmx->nested.msrs.secondary_ctls_low; in vmx_restore_control_msr()
1282 highp = &vmx->nested.msrs.secondary_ctls_high; in vmx_restore_control_msr()
1313 vmx_misc = vmx_control_msr(vmx->nested.msrs.misc_low, in vmx_restore_vmx_misc()
1314 vmx->nested.msrs.misc_high); in vmx_restore_vmx_misc()
1319 if ((vmx->nested.msrs.pinbased_ctls_high & in vmx_restore_vmx_misc()
1334 vmx->nested.msrs.misc_low = data; in vmx_restore_vmx_misc()
1335 vmx->nested.msrs.misc_high = data >> 32; in vmx_restore_vmx_misc()
1344 vmx_ept_vpid_cap = vmx_control_msr(vmx->nested.msrs.ept_caps, in vmx_restore_vmx_ept_vpid_cap()
1345 vmx->nested.msrs.vpid_caps); in vmx_restore_vmx_ept_vpid_cap()
1351 vmx->nested.msrs.ept_caps = data; in vmx_restore_vmx_ept_vpid_cap()
1352 vmx->nested.msrs.vpid_caps = data >> 32; in vmx_restore_vmx_ept_vpid_cap()
1362 msr = &vmx->nested.msrs.cr0_fixed0; in vmx_restore_fixed0_msr()
1365 msr = &vmx->nested.msrs.cr4_fixed0; in vmx_restore_fixed0_msr()
1436 vmx->nested.msrs.vmcs_enum = data; in vmx_set_vmx_msr()
1439 if (data & ~vmx->nested.msrs.vmfunc_controls) in vmx_set_vmx_msr()
1441 vmx->nested.msrs.vmfunc_controls = data; in vmx_set_vmx_msr()
1452 int vmx_get_vmx_msr(struct nested_vmx_msrs *msrs, u32 msr_index, u64 *pdata) in vmx_get_vmx_msr() argument
1456 *pdata = msrs->basic; in vmx_get_vmx_msr()
1461 msrs->pinbased_ctls_low, in vmx_get_vmx_msr()
1462 msrs->pinbased_ctls_high); in vmx_get_vmx_msr()
1469 msrs->procbased_ctls_low, in vmx_get_vmx_msr()
1470 msrs->procbased_ctls_high); in vmx_get_vmx_msr()
1477 msrs->exit_ctls_low, in vmx_get_vmx_msr()
1478 msrs->exit_ctls_high); in vmx_get_vmx_msr()
1485 msrs->entry_ctls_low, in vmx_get_vmx_msr()
1486 msrs->entry_ctls_high); in vmx_get_vmx_msr()
1492 msrs->misc_low, in vmx_get_vmx_msr()
1493 msrs->misc_high); in vmx_get_vmx_msr()
1496 *pdata = msrs->cr0_fixed0; in vmx_get_vmx_msr()
1499 *pdata = msrs->cr0_fixed1; in vmx_get_vmx_msr()
1502 *pdata = msrs->cr4_fixed0; in vmx_get_vmx_msr()
1505 *pdata = msrs->cr4_fixed1; in vmx_get_vmx_msr()
1508 *pdata = msrs->vmcs_enum; in vmx_get_vmx_msr()
1512 msrs->secondary_ctls_low, in vmx_get_vmx_msr()
1513 msrs->secondary_ctls_high); in vmx_get_vmx_msr()
1516 *pdata = msrs->ept_caps | in vmx_get_vmx_msr()
1517 ((u64)msrs->vpid_caps << 32); in vmx_get_vmx_msr()
1520 *pdata = msrs->vmfunc_controls; in vmx_get_vmx_msr()
2665 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_UC_BIT))) in nested_vmx_check_eptp()
2669 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_WB_BIT))) in nested_vmx_check_eptp()
2679 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_PAGE_WALK_5_BIT))) in nested_vmx_check_eptp()
2683 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_PAGE_WALK_4_BIT))) in nested_vmx_check_eptp()
2696 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_AD_BIT))) in nested_vmx_check_eptp()
2712 vmx->nested.msrs.pinbased_ctls_low, in nested_check_vm_execution_controls()
2713 vmx->nested.msrs.pinbased_ctls_high)) || in nested_check_vm_execution_controls()
2715 vmx->nested.msrs.procbased_ctls_low, in nested_check_vm_execution_controls()
2716 vmx->nested.msrs.procbased_ctls_high))) in nested_check_vm_execution_controls()
2721 vmx->nested.msrs.secondary_ctls_low, in nested_check_vm_execution_controls()
2722 vmx->nested.msrs.secondary_ctls_high))) in nested_check_vm_execution_controls()
2749 ~vmx->nested.msrs.vmfunc_controls)) in nested_check_vm_execution_controls()
2771 vmx->nested.msrs.exit_ctls_low, in nested_check_vm_exit_controls()
2772 vmx->nested.msrs.exit_ctls_high)) || in nested_check_vm_exit_controls()
2788 vmx->nested.msrs.entry_ctls_low, in nested_check_vm_entry_controls()
2789 vmx->nested.msrs.entry_ctls_high))) in nested_check_vm_entry_controls()
4799 vmx->nested.msrs.entry_ctls_high |= in nested_vmx_pmu_entry_exit_ctls_update()
4801 vmx->nested.msrs.exit_ctls_high |= in nested_vmx_pmu_entry_exit_ctls_update()
4804 vmx->nested.msrs.entry_ctls_high &= in nested_vmx_pmu_entry_exit_ctls_update()
4806 vmx->nested.msrs.exit_ctls_high &= in nested_vmx_pmu_entry_exit_ctls_update()
5383 if (!(vmx->nested.msrs.secondary_ctls_high & in handle_invept()
5385 !(vmx->nested.msrs.ept_caps & VMX_EPT_INVEPT_BIT)) { in handle_invept()
5396 types = (vmx->nested.msrs.ept_caps >> VMX_EPT_EXTENT_SHIFT) & 6; in handle_invept()
5463 if (!(vmx->nested.msrs.secondary_ctls_high & in handle_invvpid()
5465 !(vmx->nested.msrs.vpid_caps & VMX_VPID_INVVPID_BIT)) { in handle_invvpid()
5476 types = (vmx->nested.msrs.vpid_caps & in handle_invvpid()
6465 void nested_vmx_setup_ctls_msrs(struct nested_vmx_msrs *msrs, u32 ept_caps) in nested_vmx_setup_ctls_msrs() argument
6484 msrs->pinbased_ctls_low, in nested_vmx_setup_ctls_msrs()
6485 msrs->pinbased_ctls_high); in nested_vmx_setup_ctls_msrs()
6486 msrs->pinbased_ctls_low |= in nested_vmx_setup_ctls_msrs()
6488 msrs->pinbased_ctls_high &= in nested_vmx_setup_ctls_msrs()
6493 msrs->pinbased_ctls_high |= in nested_vmx_setup_ctls_msrs()
6499 msrs->exit_ctls_low, in nested_vmx_setup_ctls_msrs()
6500 msrs->exit_ctls_high); in nested_vmx_setup_ctls_msrs()
6501 msrs->exit_ctls_low = in nested_vmx_setup_ctls_msrs()
6504 msrs->exit_ctls_high &= in nested_vmx_setup_ctls_msrs()
6510 msrs->exit_ctls_high |= in nested_vmx_setup_ctls_msrs()
6516 msrs->exit_ctls_low &= ~VM_EXIT_SAVE_DEBUG_CONTROLS; in nested_vmx_setup_ctls_msrs()
6520 msrs->entry_ctls_low, in nested_vmx_setup_ctls_msrs()
6521 msrs->entry_ctls_high); in nested_vmx_setup_ctls_msrs()
6522 msrs->entry_ctls_low = in nested_vmx_setup_ctls_msrs()
6524 msrs->entry_ctls_high &= in nested_vmx_setup_ctls_msrs()
6530 msrs->entry_ctls_high |= in nested_vmx_setup_ctls_msrs()
6534 msrs->entry_ctls_low &= ~VM_ENTRY_LOAD_DEBUG_CONTROLS; in nested_vmx_setup_ctls_msrs()
6538 msrs->procbased_ctls_low, in nested_vmx_setup_ctls_msrs()
6539 msrs->procbased_ctls_high); in nested_vmx_setup_ctls_msrs()
6540 msrs->procbased_ctls_low = in nested_vmx_setup_ctls_msrs()
6542 msrs->procbased_ctls_high &= in nested_vmx_setup_ctls_msrs()
6562 msrs->procbased_ctls_high |= in nested_vmx_setup_ctls_msrs()
6567 msrs->procbased_ctls_low &= in nested_vmx_setup_ctls_msrs()
6575 if (msrs->procbased_ctls_high & CPU_BASED_ACTIVATE_SECONDARY_CONTROLS) in nested_vmx_setup_ctls_msrs()
6577 msrs->secondary_ctls_low, in nested_vmx_setup_ctls_msrs()
6578 msrs->secondary_ctls_high); in nested_vmx_setup_ctls_msrs()
6580 msrs->secondary_ctls_low = 0; in nested_vmx_setup_ctls_msrs()
6581 msrs->secondary_ctls_high &= in nested_vmx_setup_ctls_msrs()
6598 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6603 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6605 msrs->ept_caps = in nested_vmx_setup_ctls_msrs()
6612 msrs->ept_caps &= ept_caps; in nested_vmx_setup_ctls_msrs()
6613 msrs->ept_caps |= VMX_EPT_EXTENT_GLOBAL_BIT | in nested_vmx_setup_ctls_msrs()
6617 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6619 msrs->ept_caps |= VMX_EPT_AD_BIT; in nested_vmx_setup_ctls_msrs()
6624 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6631 msrs->vmfunc_controls = in nested_vmx_setup_ctls_msrs()
6642 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6644 msrs->vpid_caps = VMX_VPID_INVVPID_BIT | in nested_vmx_setup_ctls_msrs()
6649 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6653 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6657 msrs->secondary_ctls_high |= SECONDARY_EXEC_ENCLS_EXITING; in nested_vmx_setup_ctls_msrs()
6661 msrs->misc_low, in nested_vmx_setup_ctls_msrs()
6662 msrs->misc_high); in nested_vmx_setup_ctls_msrs()
6663 msrs->misc_low &= VMX_MISC_SAVE_EFER_LMA; in nested_vmx_setup_ctls_msrs()
6664 msrs->misc_low |= in nested_vmx_setup_ctls_msrs()
6669 msrs->misc_high = 0; in nested_vmx_setup_ctls_msrs()
6677 msrs->basic = in nested_vmx_setup_ctls_msrs()
6684 msrs->basic |= VMX_BASIC_INOUT; in nested_vmx_setup_ctls_msrs()
6693 msrs->cr0_fixed0 = VMXON_CR0_ALWAYSON; in nested_vmx_setup_ctls_msrs()
6694 msrs->cr4_fixed0 = VMXON_CR4_ALWAYSON; in nested_vmx_setup_ctls_msrs()
6697 rdmsrl(MSR_IA32_VMX_CR0_FIXED1, msrs->cr0_fixed1); in nested_vmx_setup_ctls_msrs()
6698 rdmsrl(MSR_IA32_VMX_CR4_FIXED1, msrs->cr4_fixed1); in nested_vmx_setup_ctls_msrs()
6700 msrs->vmcs_enum = nested_vmx_calc_vmcs_enum_msr(); in nested_vmx_setup_ctls_msrs()