VirtualBox

Changeset 70003 in vbox for trunk/src/VBox/VMM/VMMR0


Ignore:
Timestamp:
Dec 8, 2017 6:52:19 AM (7 years ago)
Author:
vboxsync
Message:

VMM/HMSVMR0: Nested hw.virt: bits, remove unneeded code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp

    r70002 r70003  
    14451445
    14461446
    1447 #ifdef VBOX_WITH_NESTED_HWVIRT
    1448 /**
    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 #endif
    1473 
    1474 
    14751447/**
    14761448 * Loads the guest segment registers into the VMCB.
     
    22492221
    22502222    hmR0SvmVmRunSetupVmcb(pVCpu, pCtx);
     2223
     2224    int rc = hmR0SvmLoadGuestControlRegs(pVCpu, pVmcbNstGst, pCtx);
     2225    AssertRCReturn(rc, rc);
     2226
    22512227    hmR0SvmLoadGuestSegmentRegs(pVCpu, pVmcbNstGst, pCtx);
    22522228    hmR0SvmLoadGuestMsrs(pVCpu, pVmcbNstGst, pCtx);
     2229    hmR0SvmLoadGuestApicStateNested(pVCpu, pVmcbNstGst);
    22532230
    22542231    pVmcbNstGst->guest.u64RIP    = pCtx->rip;
     
    22572234    pVmcbNstGst->guest.u64RAX    = pCtx->rax;
    22582235
    2259     int rc = hmR0SvmLoadGuestControlRegsNested(pVCpu, pVmcbNstGst, pCtx);
    2260     AssertRCReturn(rc, rc);
    2261 
    2262     hmR0SvmLoadGuestApicStateNested(pVCpu, pVmcbNstGst);
    22632236    hmR0SvmLoadGuestXcptInterceptsNested(pVCpu, pVmcbNstGst, pCtx);
    22642237
     
    50224995                case SVM_EXIT_SHUTDOWN:
    50234996                {
     4997                    /** @todo think about this... intercepting shutdown on host CPU shouldn't be needed
     4998                     *        for nested guest? */
    50244999                    if (HMIsGuestSvmCtrlInterceptSet(pVCpu, pCtx, SVM_CTRL_INTERCEPT_SHUTDOWN))
    50255000                        return HM_SVM_VMEXIT_NESTED(pVCpu, uExitCode, uExitInfo1, uExitInfo2);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette