Changeset 70003 in vbox for trunk/src/VBox/VMM/VMMR0
- Timestamp:
- Dec 8, 2017 6:52:19 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r70002 r70003 1445 1445 1446 1446 1447 #ifdef VBOX_WITH_NESTED_HWVIRT1448 /**1449 * Loads the nested-guest control registers (CR0, CR2, CR3, CR4) into the VMCB.1450 *1451 * @returns VBox status code.1452 * @param pVCpu The cross context virtual CPU structure.1453 * @param pVmcbNstGst Pointer to the nested-guest VM control block.1454 * @param pCtx Pointer to the guest-CPU context.1455 *1456 * @remarks No-long-jump zone!!!1457 */1458 static int hmR0SvmLoadGuestControlRegsNested(PVMCPU pVCpu, PSVMVMCB pVmcbNstGst, PCPUMCTX pCtx)1459 {1460 /*1461 * Guest CR0.1462 */1463 if (HMCPU_CF_IS_PENDING(pVCpu, HM_CHANGED_GUEST_CR0))1464 {1465 pVmcbNstGst->guest.u64CR0 = pCtx->cr0;1466 pVmcbNstGst->ctrl.u64VmcbCleanBits &= ~HMSVM_VMCB_CLEAN_CRX_EFER;1467 HMCPU_CF_CLEAR(pVCpu, HM_CHANGED_GUEST_CR0);1468 }1469 1470 return hmR0SvmLoadGuestControlRegs(pVCpu, pVmcbNstGst, pCtx);1471 }1472 #endif1473 1474 1475 1447 /** 1476 1448 * Loads the guest segment registers into the VMCB. … … 2249 2221 2250 2222 hmR0SvmVmRunSetupVmcb(pVCpu, pCtx); 2223 2224 int rc = hmR0SvmLoadGuestControlRegs(pVCpu, pVmcbNstGst, pCtx); 2225 AssertRCReturn(rc, rc); 2226 2251 2227 hmR0SvmLoadGuestSegmentRegs(pVCpu, pVmcbNstGst, pCtx); 2252 2228 hmR0SvmLoadGuestMsrs(pVCpu, pVmcbNstGst, pCtx); 2229 hmR0SvmLoadGuestApicStateNested(pVCpu, pVmcbNstGst); 2253 2230 2254 2231 pVmcbNstGst->guest.u64RIP = pCtx->rip; … … 2257 2234 pVmcbNstGst->guest.u64RAX = pCtx->rax; 2258 2235 2259 int rc = hmR0SvmLoadGuestControlRegsNested(pVCpu, pVmcbNstGst, pCtx);2260 AssertRCReturn(rc, rc);2261 2262 hmR0SvmLoadGuestApicStateNested(pVCpu, pVmcbNstGst);2263 2236 hmR0SvmLoadGuestXcptInterceptsNested(pVCpu, pVmcbNstGst, pCtx); 2264 2237 … … 5022 4995 case SVM_EXIT_SHUTDOWN: 5023 4996 { 4997 /** @todo think about this... intercepting shutdown on host CPU shouldn't be needed 4998 * for nested guest? */ 5024 4999 if (HMIsGuestSvmCtrlInterceptSet(pVCpu, pCtx, SVM_CTRL_INTERCEPT_SHUTDOWN)) 5025 5000 return HM_SVM_VMEXIT_NESTED(pVCpu, uExitCode, uExitInfo1, uExitInfo2);
Note:
See TracChangeset
for help on using the changeset viewer.