Lines Matching refs:msrs
359 to_vmx(vcpu)->nested.msrs.ept_caps & in nested_ept_init_mmu_context()
879 u64 vmx_misc = vmx_control_msr(vmx->nested.msrs.misc_low, in nested_vmx_max_atomic_switch_msrs()
880 vmx->nested.msrs.misc_high); in nested_vmx_max_atomic_switch_msrs()
1238 u64 vmx_basic = vmx->nested.msrs.basic; in vmx_restore_vmx_basic()
1257 vmx->nested.msrs.basic = data; in vmx_restore_vmx_basic()
1269 lowp = &vmx->nested.msrs.pinbased_ctls_low; in vmx_restore_control_msr()
1270 highp = &vmx->nested.msrs.pinbased_ctls_high; in vmx_restore_control_msr()
1273 lowp = &vmx->nested.msrs.procbased_ctls_low; in vmx_restore_control_msr()
1274 highp = &vmx->nested.msrs.procbased_ctls_high; in vmx_restore_control_msr()
1277 lowp = &vmx->nested.msrs.exit_ctls_low; in vmx_restore_control_msr()
1278 highp = &vmx->nested.msrs.exit_ctls_high; in vmx_restore_control_msr()
1281 lowp = &vmx->nested.msrs.entry_ctls_low; in vmx_restore_control_msr()
1282 highp = &vmx->nested.msrs.entry_ctls_high; in vmx_restore_control_msr()
1285 lowp = &vmx->nested.msrs.secondary_ctls_low; in vmx_restore_control_msr()
1286 highp = &vmx->nested.msrs.secondary_ctls_high; in vmx_restore_control_msr()
1317 vmx_misc = vmx_control_msr(vmx->nested.msrs.misc_low, in vmx_restore_vmx_misc()
1318 vmx->nested.msrs.misc_high); in vmx_restore_vmx_misc()
1323 if ((vmx->nested.msrs.pinbased_ctls_high & in vmx_restore_vmx_misc()
1338 vmx->nested.msrs.misc_low = data; in vmx_restore_vmx_misc()
1339 vmx->nested.msrs.misc_high = data >> 32; in vmx_restore_vmx_misc()
1348 vmx_ept_vpid_cap = vmx_control_msr(vmx->nested.msrs.ept_caps, in vmx_restore_vmx_ept_vpid_cap()
1349 vmx->nested.msrs.vpid_caps); in vmx_restore_vmx_ept_vpid_cap()
1355 vmx->nested.msrs.ept_caps = data; in vmx_restore_vmx_ept_vpid_cap()
1356 vmx->nested.msrs.vpid_caps = data >> 32; in vmx_restore_vmx_ept_vpid_cap()
1366 msr = &vmx->nested.msrs.cr0_fixed0; in vmx_restore_fixed0_msr()
1369 msr = &vmx->nested.msrs.cr4_fixed0; in vmx_restore_fixed0_msr()
1440 vmx->nested.msrs.vmcs_enum = data; in vmx_set_vmx_msr()
1443 if (data & ~vmx->nested.msrs.vmfunc_controls) in vmx_set_vmx_msr()
1445 vmx->nested.msrs.vmfunc_controls = data; in vmx_set_vmx_msr()
1456 int vmx_get_vmx_msr(struct nested_vmx_msrs *msrs, u32 msr_index, u64 *pdata) in vmx_get_vmx_msr() argument
1460 *pdata = msrs->basic; in vmx_get_vmx_msr()
1465 msrs->pinbased_ctls_low, in vmx_get_vmx_msr()
1466 msrs->pinbased_ctls_high); in vmx_get_vmx_msr()
1473 msrs->procbased_ctls_low, in vmx_get_vmx_msr()
1474 msrs->procbased_ctls_high); in vmx_get_vmx_msr()
1481 msrs->exit_ctls_low, in vmx_get_vmx_msr()
1482 msrs->exit_ctls_high); in vmx_get_vmx_msr()
1489 msrs->entry_ctls_low, in vmx_get_vmx_msr()
1490 msrs->entry_ctls_high); in vmx_get_vmx_msr()
1496 msrs->misc_low, in vmx_get_vmx_msr()
1497 msrs->misc_high); in vmx_get_vmx_msr()
1500 *pdata = msrs->cr0_fixed0; in vmx_get_vmx_msr()
1503 *pdata = msrs->cr0_fixed1; in vmx_get_vmx_msr()
1506 *pdata = msrs->cr4_fixed0; in vmx_get_vmx_msr()
1509 *pdata = msrs->cr4_fixed1; in vmx_get_vmx_msr()
1512 *pdata = msrs->vmcs_enum; in vmx_get_vmx_msr()
1516 msrs->secondary_ctls_low, in vmx_get_vmx_msr()
1517 msrs->secondary_ctls_high); in vmx_get_vmx_msr()
1520 *pdata = msrs->ept_caps | in vmx_get_vmx_msr()
1521 ((u64)msrs->vpid_caps << 32); in vmx_get_vmx_msr()
1524 *pdata = msrs->vmfunc_controls; in vmx_get_vmx_msr()
2643 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_UC_BIT))) in nested_vmx_check_eptp()
2647 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPTP_WB_BIT))) in nested_vmx_check_eptp()
2657 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_PAGE_WALK_5_BIT))) in nested_vmx_check_eptp()
2661 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_PAGE_WALK_4_BIT))) in nested_vmx_check_eptp()
2674 if (CC(!(vmx->nested.msrs.ept_caps & VMX_EPT_AD_BIT))) in nested_vmx_check_eptp()
2690 vmx->nested.msrs.pinbased_ctls_low, in nested_check_vm_execution_controls()
2691 vmx->nested.msrs.pinbased_ctls_high)) || in nested_check_vm_execution_controls()
2693 vmx->nested.msrs.procbased_ctls_low, in nested_check_vm_execution_controls()
2694 vmx->nested.msrs.procbased_ctls_high))) in nested_check_vm_execution_controls()
2699 vmx->nested.msrs.secondary_ctls_low, in nested_check_vm_execution_controls()
2700 vmx->nested.msrs.secondary_ctls_high))) in nested_check_vm_execution_controls()
2727 ~vmx->nested.msrs.vmfunc_controls)) in nested_check_vm_execution_controls()
2749 vmx->nested.msrs.exit_ctls_low, in nested_check_vm_exit_controls()
2750 vmx->nested.msrs.exit_ctls_high)) || in nested_check_vm_exit_controls()
2766 vmx->nested.msrs.entry_ctls_low, in nested_check_vm_entry_controls()
2767 vmx->nested.msrs.entry_ctls_high))) in nested_check_vm_entry_controls()
4687 vmx->nested.msrs.entry_ctls_high |= in nested_vmx_pmu_entry_exit_ctls_update()
4689 vmx->nested.msrs.exit_ctls_high |= in nested_vmx_pmu_entry_exit_ctls_update()
4692 vmx->nested.msrs.entry_ctls_high &= in nested_vmx_pmu_entry_exit_ctls_update()
4694 vmx->nested.msrs.exit_ctls_high &= in nested_vmx_pmu_entry_exit_ctls_update()
5284 if (!(vmx->nested.msrs.secondary_ctls_high & in handle_invept()
5286 !(vmx->nested.msrs.ept_caps & VMX_EPT_INVEPT_BIT)) { in handle_invept()
5297 types = (vmx->nested.msrs.ept_caps >> VMX_EPT_EXTENT_SHIFT) & 6; in handle_invept()
5364 if (!(vmx->nested.msrs.secondary_ctls_high & in handle_invvpid()
5366 !(vmx->nested.msrs.vpid_caps & VMX_VPID_INVVPID_BIT)) { in handle_invvpid()
5377 types = (vmx->nested.msrs.vpid_caps & in handle_invvpid()
6288 void nested_vmx_setup_ctls_msrs(struct nested_vmx_msrs *msrs, u32 ept_caps) in nested_vmx_setup_ctls_msrs() argument
6307 msrs->pinbased_ctls_low, in nested_vmx_setup_ctls_msrs()
6308 msrs->pinbased_ctls_high); in nested_vmx_setup_ctls_msrs()
6309 msrs->pinbased_ctls_low |= in nested_vmx_setup_ctls_msrs()
6311 msrs->pinbased_ctls_high &= in nested_vmx_setup_ctls_msrs()
6316 msrs->pinbased_ctls_high |= in nested_vmx_setup_ctls_msrs()
6322 msrs->exit_ctls_low, in nested_vmx_setup_ctls_msrs()
6323 msrs->exit_ctls_high); in nested_vmx_setup_ctls_msrs()
6324 msrs->exit_ctls_low = in nested_vmx_setup_ctls_msrs()
6327 msrs->exit_ctls_high &= in nested_vmx_setup_ctls_msrs()
6333 msrs->exit_ctls_high |= in nested_vmx_setup_ctls_msrs()
6339 msrs->exit_ctls_low &= ~VM_EXIT_SAVE_DEBUG_CONTROLS; in nested_vmx_setup_ctls_msrs()
6343 msrs->entry_ctls_low, in nested_vmx_setup_ctls_msrs()
6344 msrs->entry_ctls_high); in nested_vmx_setup_ctls_msrs()
6345 msrs->entry_ctls_low = in nested_vmx_setup_ctls_msrs()
6347 msrs->entry_ctls_high &= in nested_vmx_setup_ctls_msrs()
6353 msrs->entry_ctls_high |= in nested_vmx_setup_ctls_msrs()
6357 msrs->entry_ctls_low &= ~VM_ENTRY_LOAD_DEBUG_CONTROLS; in nested_vmx_setup_ctls_msrs()
6361 msrs->procbased_ctls_low, in nested_vmx_setup_ctls_msrs()
6362 msrs->procbased_ctls_high); in nested_vmx_setup_ctls_msrs()
6363 msrs->procbased_ctls_low = in nested_vmx_setup_ctls_msrs()
6365 msrs->procbased_ctls_high &= in nested_vmx_setup_ctls_msrs()
6385 msrs->procbased_ctls_high |= in nested_vmx_setup_ctls_msrs()
6390 msrs->procbased_ctls_low &= in nested_vmx_setup_ctls_msrs()
6398 if (msrs->procbased_ctls_high & CPU_BASED_ACTIVATE_SECONDARY_CONTROLS) in nested_vmx_setup_ctls_msrs()
6400 msrs->secondary_ctls_low, in nested_vmx_setup_ctls_msrs()
6401 msrs->secondary_ctls_high); in nested_vmx_setup_ctls_msrs()
6403 msrs->secondary_ctls_low = 0; in nested_vmx_setup_ctls_msrs()
6404 msrs->secondary_ctls_high &= in nested_vmx_setup_ctls_msrs()
6420 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6425 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6427 msrs->ept_caps = in nested_vmx_setup_ctls_msrs()
6434 msrs->ept_caps &= ept_caps; in nested_vmx_setup_ctls_msrs()
6435 msrs->ept_caps |= VMX_EPT_EXTENT_GLOBAL_BIT | in nested_vmx_setup_ctls_msrs()
6439 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6441 msrs->ept_caps |= VMX_EPT_AD_BIT; in nested_vmx_setup_ctls_msrs()
6446 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6453 msrs->vmfunc_controls = in nested_vmx_setup_ctls_msrs()
6464 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6466 msrs->vpid_caps = VMX_VPID_INVVPID_BIT | in nested_vmx_setup_ctls_msrs()
6471 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6475 msrs->secondary_ctls_high |= in nested_vmx_setup_ctls_msrs()
6480 msrs->misc_low, in nested_vmx_setup_ctls_msrs()
6481 msrs->misc_high); in nested_vmx_setup_ctls_msrs()
6482 msrs->misc_low &= VMX_MISC_SAVE_EFER_LMA; in nested_vmx_setup_ctls_msrs()
6483 msrs->misc_low |= in nested_vmx_setup_ctls_msrs()
6487 msrs->misc_high = 0; in nested_vmx_setup_ctls_msrs()
6495 msrs->basic = in nested_vmx_setup_ctls_msrs()
6502 msrs->basic |= VMX_BASIC_INOUT; in nested_vmx_setup_ctls_msrs()
6511 msrs->cr0_fixed0 = VMXON_CR0_ALWAYSON; in nested_vmx_setup_ctls_msrs()
6512 msrs->cr4_fixed0 = VMXON_CR4_ALWAYSON; in nested_vmx_setup_ctls_msrs()
6515 rdmsrl(MSR_IA32_VMX_CR0_FIXED1, msrs->cr0_fixed1); in nested_vmx_setup_ctls_msrs()
6516 rdmsrl(MSR_IA32_VMX_CR4_FIXED1, msrs->cr4_fixed1); in nested_vmx_setup_ctls_msrs()
6519 msrs->vmcs_enum = VMCS12_MAX_FIELD_INDEX << 1; in nested_vmx_setup_ctls_msrs()