Changeset 80655 in vbox
- Timestamp:
- Sep 9, 2019 4:13:04 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp
r80622 r80655 4539 4539 * 4540 4540 * @returns true if we need to load guest EFER, false otherwise. 4541 * @param pVCpu The cross context virtual CPU structure. 4541 * @param pVCpu The cross context virtual CPU structure. 4542 * @param pVmxTransient The VMX-transient structure. 4542 4543 * 4543 4544 * @remarks Requires EFER, CR4. 4544 4545 * @remarks No-long-jump zone!!! 4545 4546 */ 4546 static bool hmR0VmxShouldSwapEferMsr(PCVMCPUCC pVCpu )4547 static bool hmR0VmxShouldSwapEferMsr(PCVMCPUCC pVCpu, PCVMXTRANSIENT pVmxTransient) 4547 4548 { 4548 4549 #ifdef HMVMX_ALWAYS_SWAP_EFER 4549 RT_NOREF (pVCpu);4550 RT_NOREF2(pVCpu, pVmxTransient); 4550 4551 return true; 4551 4552 #else … … 4554 4555 uint64_t const u64HostEfer = pVM->hm.s.vmx.u64HostMsrEfer; 4555 4556 uint64_t const u64GuestEfer = pCtx->msrEFER; 4557 4558 # ifdef VBOX_WITH_NESTED_HWVIRT_VMX 4559 /* 4560 * For nested-guests, we shall honor swapping the EFER MSR when requested by 4561 * the nested-guest. 4562 */ 4563 if ( pVmxTransient->fIsNestedGuest 4564 && ( CPUMIsGuestVmxEntryCtlsSet(pVCpu, pCtx, VMX_ENTRY_CTLS_LOAD_EFER_MSR) 4565 || CPUMIsGuestVmxExitCtlsSet(pVCpu, pCtx, VMX_EXIT_CTLS_SAVE_EFER_MSR) 4566 || CPUMIsGuestVmxExitCtlsSet(pVCpu, pCtx, VMX_EXIT_CTLS_LOAD_EFER_MSR))) 4567 return true; 4568 # else 4569 RT_NOREF(pVmxTransient); 4570 #endif 4556 4571 4557 4572 /* … … 4663 4678 */ 4664 4679 if ( pVM->hm.s.vmx.fSupportsVmcsEfer 4665 && hmR0VmxShouldSwapEferMsr(pVCpu ))4680 && hmR0VmxShouldSwapEferMsr(pVCpu, pVmxTransient)) 4666 4681 fVal |= VMX_ENTRY_CTLS_LOAD_EFER_MSR; 4667 4682 else … … 4730 4745 */ 4731 4746 if ( pVM->hm.s.vmx.fSupportsVmcsEfer 4732 && hmR0VmxShouldSwapEferMsr(pVCpu ))4747 && hmR0VmxShouldSwapEferMsr(pVCpu, pVmxTransient)) 4733 4748 { 4734 4749 fVal |= VMX_EXIT_CTLS_SAVE_EFER_MSR … … 6442 6457 HMVMX_CPUMCTX_ASSERT(pVCpu, CPUMCTX_EXTRN_EFER); 6443 6458 6444 if (hmR0VmxShouldSwapEferMsr(pVCpu ))6459 if (hmR0VmxShouldSwapEferMsr(pVCpu, pVmxTransient)) 6445 6460 { 6446 6461 /*
Note:
See TracChangeset
for help on using the changeset viewer.