Lines Matching refs:msrs

360 			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()
1267 vmx->nested.msrs.basic = data; in vmx_restore_vmx_basic()
1271 static void vmx_get_control_msr(struct nested_vmx_msrs *msrs, u32 msr_index, in vmx_get_control_msr() argument
1276 *low = &msrs->pinbased_ctls_low; in vmx_get_control_msr()
1277 *high = &msrs->pinbased_ctls_high; in vmx_get_control_msr()
1280 *low = &msrs->procbased_ctls_low; in vmx_get_control_msr()
1281 *high = &msrs->procbased_ctls_high; in vmx_get_control_msr()
1284 *low = &msrs->exit_ctls_low; in vmx_get_control_msr()
1285 *high = &msrs->exit_ctls_high; in vmx_get_control_msr()
1288 *low = &msrs->entry_ctls_low; in vmx_get_control_msr()
1289 *high = &msrs->entry_ctls_high; in vmx_get_control_msr()
1292 *low = &msrs->secondary_ctls_low; in vmx_get_control_msr()
1293 *high = &msrs->secondary_ctls_high; in vmx_get_control_msr()
1318 vmx_get_control_msr(&vmx->nested.msrs, msr_index, &lowp, &highp); in vmx_restore_control_msr()
1338 if ((vmx->nested.msrs.pinbased_ctls_high & in vmx_restore_vmx_misc()
1353 vmx->nested.msrs.misc_low = data; in vmx_restore_vmx_misc()
1354 vmx->nested.msrs.misc_high = data >> 32; in vmx_restore_vmx_misc()
1368 vmx->nested.msrs.ept_caps = data; in vmx_restore_vmx_ept_vpid_cap()
1369 vmx->nested.msrs.vpid_caps = data >> 32; in vmx_restore_vmx_ept_vpid_cap()
1373 static u64 *vmx_get_fixed0_msr(struct nested_vmx_msrs *msrs, u32 msr_index) in vmx_get_fixed0_msr() argument
1377 return &msrs->cr0_fixed0; in vmx_get_fixed0_msr()
1379 return &msrs->cr4_fixed0; in vmx_get_fixed0_msr()
1396 *vmx_get_fixed0_msr(&vmx->nested.msrs, msr_index) = data; in vmx_restore_fixed0_msr()
1454 vmx->nested.msrs.vmcs_enum = data; in vmx_set_vmx_msr()
1459 vmx->nested.msrs.vmfunc_controls = data; in vmx_set_vmx_msr()
1470 int vmx_get_vmx_msr(struct nested_vmx_msrs *msrs, u32 msr_index, u64 *pdata) in vmx_get_vmx_msr() argument
1474 *pdata = msrs->basic; in vmx_get_vmx_msr()
1479 msrs->pinbased_ctls_low, in vmx_get_vmx_msr()
1480 msrs->pinbased_ctls_high); in vmx_get_vmx_msr()
1487 msrs->procbased_ctls_low, in vmx_get_vmx_msr()
1488 msrs->procbased_ctls_high); in vmx_get_vmx_msr()
1495 msrs->exit_ctls_low, in vmx_get_vmx_msr()
1496 msrs->exit_ctls_high); in vmx_get_vmx_msr()
1503 msrs->entry_ctls_low, in vmx_get_vmx_msr()
1504 msrs->entry_ctls_high); in vmx_get_vmx_msr()
1510 msrs->misc_low, in vmx_get_vmx_msr()
1511 msrs->misc_high); in vmx_get_vmx_msr()
1514 *pdata = msrs->cr0_fixed0; in vmx_get_vmx_msr()
1517 *pdata = msrs->cr0_fixed1; in vmx_get_vmx_msr()
1520 *pdata = msrs->cr4_fixed0; in vmx_get_vmx_msr()
1523 *pdata = msrs->cr4_fixed1; in vmx_get_vmx_msr()
1526 *pdata = msrs->vmcs_enum; in vmx_get_vmx_msr()
1530 msrs->secondary_ctls_low, in vmx_get_vmx_msr()
1531 msrs->secondary_ctls_high); in vmx_get_vmx_msr()
1534 *pdata = msrs->ept_caps | in vmx_get_vmx_msr()
1535 ((u64)msrs->vpid_caps << 32); in vmx_get_vmx_msr()
1538 *pdata = msrs->vmfunc_controls; in vmx_get_vmx_msr()
2670 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_UC_BIT))) in nested_vmx_check_eptp()
2674 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_WB_BIT))) in nested_vmx_check_eptp()
2684 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_PAGE_WALK_5_BIT))) in nested_vmx_check_eptp()
2688 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_PAGE_WALK_4_BIT))) in nested_vmx_check_eptp()
2701 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_AD_BIT))) in nested_vmx_check_eptp()
2717 vmx->nested.msrs.pinbased_ctls_low, in nested_check_vm_execution_controls()
2718 vmx->nested.msrs.pinbased_ctls_high)) || in nested_check_vm_execution_controls()
2720 vmx->nested.msrs.procbased_ctls_low, in nested_check_vm_execution_controls()
2721 vmx->nested.msrs.procbased_ctls_high))) in nested_check_vm_execution_controls()
2726 vmx->nested.msrs.secondary_ctls_low, in nested_check_vm_execution_controls()
2727 vmx->nested.msrs.secondary_ctls_high))) in nested_check_vm_execution_controls()
2754 ~vmx->nested.msrs.vmfunc_controls)) in nested_check_vm_execution_controls()
2776 vmx->nested.msrs.exit_ctls_low, in nested_check_vm_exit_controls()
2777 vmx->nested.msrs.exit_ctls_high)) || in nested_check_vm_exit_controls()
2793 vmx->nested.msrs.entry_ctls_low, in nested_check_vm_entry_controls()
2794 vmx->nested.msrs.entry_ctls_high))) in nested_check_vm_entry_controls()
4776 vmx->nested.msrs.entry_ctls_high |= in nested_vmx_pmu_entry_exit_ctls_update()
4778 vmx->nested.msrs.exit_ctls_high |= in nested_vmx_pmu_entry_exit_ctls_update()
4781 vmx->nested.msrs.entry_ctls_high &= in nested_vmx_pmu_entry_exit_ctls_update()
4783 vmx->nested.msrs.exit_ctls_high &= in nested_vmx_pmu_entry_exit_ctls_update()
5378 if (!(vmx->nested.msrs.secondary_ctls_high & in handle_invept()
5380 !(vmx->nested.msrs.ept_caps & VMX_EPT_INVEPT_BIT)) { in handle_invept()
5391 types = (vmx->nested.msrs.ept_caps >> VMX_EPT_EXTENT_SHIFT) & 6; in handle_invept()
5458 if (!(vmx->nested.msrs.secondary_ctls_high & in handle_invvpid()
5460 !(vmx->nested.msrs.vpid_caps & VMX_VPID_INVVPID_BIT)) { in handle_invvpid()
5471 types = (vmx->nested.msrs.vpid_caps & in handle_invvpid()
6385 void nested_vmx_setup_ctls_msrs(struct nested_vmx_msrs *msrs, u32 ept_caps) in nested_vmx_setup_ctls_msrs() argument
6404 msrs->pinbased_ctls_low, in nested_vmx_setup_ctls_msrs()
6405 msrs->pinbased_ctls_high); in nested_vmx_setup_ctls_msrs()
6406 msrs->pinbased_ctls_low |= in nested_vmx_setup_ctls_msrs()
6408 msrs->pinbased_ctls_high &= in nested_vmx_setup_ctls_msrs()
6413 msrs->pinbased_ctls_high |= in nested_vmx_setup_ctls_msrs()
6419 msrs->exit_ctls_low, in nested_vmx_setup_ctls_msrs()
6420 msrs->exit_ctls_high); in nested_vmx_setup_ctls_msrs()
6421 msrs->exit_ctls_low = in nested_vmx_setup_ctls_msrs()
6424 msrs->exit_ctls_high &= in nested_vmx_setup_ctls_msrs()
6430 msrs->exit_ctls_high |= in nested_vmx_setup_ctls_msrs()
6436 msrs->exit_ctls_low &= ~VM_EXIT_SAVE_DEBUG_CONTROLS; in nested_vmx_setup_ctls_msrs()
6440 msrs->entry_ctls_low, in nested_vmx_setup_ctls_msrs()
6441 msrs->entry_ctls_high); in nested_vmx_setup_ctls_msrs()
6442 msrs->entry_ctls_low = in nested_vmx_setup_ctls_msrs()
6444 msrs->entry_ctls_high &= in nested_vmx_setup_ctls_msrs()
6450 msrs->entry_ctls_high |= in nested_vmx_setup_ctls_msrs()
6454 msrs->entry_ctls_low &= ~VM_ENTRY_LOAD_DEBUG_CONTROLS; in nested_vmx_setup_ctls_msrs()
6458 msrs->procbased_ctls_low, in nested_vmx_setup_ctls_msrs()
6459 msrs->procbased_ctls_high); in nested_vmx_setup_ctls_msrs()
6460 msrs->procbased_ctls_low = in nested_vmx_setup_ctls_msrs()
6462 msrs->procbased_ctls_high &= in nested_vmx_setup_ctls_msrs()
6482 msrs->procbased_ctls_high |= in nested_vmx_setup_ctls_msrs()
6487 msrs->procbased_ctls_low &= in nested_vmx_setup_ctls_msrs()
6495 if (msrs->procbased_ctls_high & CPU_BASED_ACTIVATE_SECONDARY_CONTROLS) in nested_vmx_setup_ctls_msrs()
6497 msrs->secondary_ctls_low, in nested_vmx_setup_ctls_msrs()
6498 msrs->secondary_ctls_high); in nested_vmx_setup_ctls_msrs()
6500 msrs->secondary_ctls_low = 0; in nested_vmx_setup_ctls_msrs()
6501 msrs->secondary_ctls_high &= in nested_vmx_setup_ctls_msrs()
6517 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6522 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6524 msrs->ept_caps = in nested_vmx_setup_ctls_msrs()
6531 msrs->ept_caps &= ept_caps; in nested_vmx_setup_ctls_msrs()
6532 msrs->ept_caps |= VMX_EPT_EXTENT_GLOBAL_BIT | in nested_vmx_setup_ctls_msrs()
6536 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6538 msrs->ept_caps |= VMX_EPT_AD_BIT; in nested_vmx_setup_ctls_msrs()
6543 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6550 msrs->vmfunc_controls = in nested_vmx_setup_ctls_msrs()
6561 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6563 msrs->vpid_caps = VMX_VPID_INVVPID_BIT | in nested_vmx_setup_ctls_msrs()
6568 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6572 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6577 msrs->misc_low, in nested_vmx_setup_ctls_msrs()
6578 msrs->misc_high); in nested_vmx_setup_ctls_msrs()
6579 msrs->misc_low &= VMX_MISC_SAVE_EFER_LMA; in nested_vmx_setup_ctls_msrs()
6580 msrs->misc_low |= in nested_vmx_setup_ctls_msrs()
6584 msrs->misc_high = 0; in nested_vmx_setup_ctls_msrs()
6592 msrs->basic = in nested_vmx_setup_ctls_msrs()
6599 msrs->basic |= VMX_BASIC_INOUT; in nested_vmx_setup_ctls_msrs()
6608 msrs->cr0_fixed0 = VMXON_CR0_ALWAYSON; in nested_vmx_setup_ctls_msrs()
6609 msrs->cr4_fixed0 = VMXON_CR4_ALWAYSON; in nested_vmx_setup_ctls_msrs()
6612 rdmsrl(MSR_IA32_VMX_CR0_FIXED1, msrs->cr0_fixed1); in nested_vmx_setup_ctls_msrs()
6613 rdmsrl(MSR_IA32_VMX_CR4_FIXED1, msrs->cr4_fixed1); in nested_vmx_setup_ctls_msrs()
6616 msrs->vmcs_enum = VMCS12_MAX_FIELD_INDEX << 1; in nested_vmx_setup_ctls_msrs()