VirtualBox

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


Ignore:
Timestamp:
Apr 26, 2013 10:35:59 PM (12 years ago)
Author:
vboxsync
Message:

Move HMRCA.asm into the switcher code so we don't need VMMRC.rc.

Location:
trunk/src/VBox/VMM/VMMR0
Files:
6 edited

Legend:

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

    r45749 r45786  
    15851585    STAM_COUNTER_INC(&pVCpu->hm.s.StatFpu64SwitchBack);
    15861586    if (pVM->hm.s.vmx.fSupported)
    1587         return VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnSaveGuestFPU64, 0, NULL);
    1588     return SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnSaveGuestFPU64, 0, NULL);
     1587        return VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_HMRCSaveGuestFPU64, 0, NULL);
     1588    return SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_HMRCSaveGuestFPU64, 0, NULL);
    15891589}
    15901590
     
    16021602    STAM_COUNTER_INC(&pVCpu->hm.s.StatDebug64SwitchBack);
    16031603    if (pVM->hm.s.vmx.fSupported)
    1604         return VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnSaveGuestDebug64, 0, NULL);
    1605     return SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnSaveGuestDebug64, 0, NULL);
     1604        return VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_HMRCSaveGuestDebug64, 0, NULL);
     1605    return SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_HMRCSaveGuestDebug64, 0, NULL);
    16061606}
    16071607
     
    16221622    STAM_PROFILE_ADV_START(&pVCpu->hm.s.StatWorldSwitch3264, z);
    16231623    if (pVM->hm.s.vmx.fSupported)
    1624         rc = VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnTest64, 5, &aParam[0]);
     1624        rc = VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_HMRCTestSwitcher64, 5, &aParam[0]);
    16251625    else
    1626         rc = SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnTest64, 5, &aParam[0]);
     1626        rc = SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_HMRCTestSwitcher64, 5, &aParam[0]);
    16271627    STAM_PROFILE_ADV_STOP(&pVCpu->hm.s.StatWorldSwitch3264, z);
    16281628
  • trunk/src/VBox/VMM/VMMR0/HMVMXR0.cpp

    r45785 r45786  
    40244024 * @param   pVCpu       Pointer to the VMCPU.
    40254025 * @param   pCtx        Pointer to the guest CPU context.
    4026  * @param   pfnHandler  Pointer to the RC handler function.
     4026 * @param   enmOp       The operation to perform.
    40274027 * @param   cbParam     Number of parameters.
    40284028 * @param   paParam     Array of 32-bit parameters.
    40294029 */
    4030 VMMR0DECL(int) VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTRCPTR pfnHandler, uint32_t cbParam,
     4030VMMR0DECL(int) VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, HM64ON32OP enmOp, uint32_t cbParam,
    40314031                                         uint32_t *paParam)
    40324032{
     
    40374037
    40384038    AssertReturn(pVM->hm.s.pfnHost32ToGuest64R0, VERR_HM_NO_32_TO_64_SWITCHER);
    4039     Assert(pfnHandler);
     4039    Assert(enmOp > HM64ON32OP_INVALID && enmOp < HM64ON32OP_END);
    40404040    Assert(pVCpu->hm.s.vmx.VMCSCache.Write.cValidEntries <= RT_ELEMENTS(pVCpu->hm.s.vmx.VMCSCache.Write.aField));
    40414041    Assert(pVCpu->hm.s.vmx.VMCSCache.Read.cValidEntries <= RT_ELEMENTS(pVCpu->hm.s.vmx.VMCSCache.Read.aField));
     
    40694069
    40704070    CPUMSetHyperESP(pVCpu, VMMGetStackRC(pVCpu));
    4071     CPUMSetHyperEIP(pVCpu, pfnHandler);
     4071    CPUMSetHyperEIP(pVCpu, enmOp);
    40724072    for (int i = (int)cbParam - 1; i >= 0; i--)
    40734073        CPUMPushHyper(pVCpu, paParam[i]);
     
    41174117    RTHCPHYS        HCPhysCpuPage = 0;
    41184118    int             rc            = VERR_INTERNAL_ERROR_5;
     4119    AssertReturn(pVM->hm.s.pfnVMXGCStartVM64, VERR_HM_IPE_5);
    41194120
    41204121    pCpu = HMR0GetCurrentCpu();
     
    41484149    *(uint32_t *)(pVM->hm.s.vmx.pScratch + 16 + 8) = 1;
    41494150#endif
    4150     rc = VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnVMXGCStartVM64, 6, &aParam[0]);
     4151    rc = VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_VMXRCStartVM64, 6, &aParam[0]);
    41514152
    41524153#ifdef VBOX_WITH_CRASHDUMP_MAGIC
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.cpp

    r45749 r45786  
    31223122    aParam[3] = (uint32_t)(HCPhysVMCB >> 32);                /* Param 2: HCPhysVMCB - Hi. */
    31233123
    3124     return SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnSVMGCVMRun64, 4, &aParam[0]);
     3124    return SVMR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_SVMRCVMRun64, 4, &aParam[0]);
    31253125}
    31263126
     
    31333133 * @param   pVCpu       Pointer to the VMCPU.
    31343134 * @param   pCtx        Pointer to the guest CPU context.
    3135  * @param   pfnHandler  Pointer to the RC handler function.
     3135 * @param   enmOp       The operation to perform.
    31363136 * @param   cbParam     Number of parameters.
    31373137 * @param   paParam     Array of 32-bit parameters.
    31383138 */
    3139 VMMR0DECL(int) SVMR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTRCPTR pfnHandler, uint32_t cbParam,
     3139VMMR0DECL(int) SVMR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, HM64ON32OP enmOp, uint32_t cbParam,
    31403140                                         uint32_t *paParam)
    31413141{
     
    31433143    RTHCUINTREG     uOldEFlags;
    31443144
    3145     Assert(pfnHandler);
     3145    AssertReturn(pVM->hm.s.pfnHost32ToGuest64R0, VERR_HM_NO_32_TO_64_SWITCHER);
     3146    Assert(enmOp > HM64ON32OP_INVALID && enmOp < HM64ON32OP_END);
    31463147
    31473148    /* Disable interrupts. */
     
    31543155
    31553156    CPUMSetHyperESP(pVCpu, VMMGetStackRC(pVCpu));
    3156     CPUMSetHyperEIP(pVCpu, pfnHandler);
     3157    CPUMSetHyperEIP(pVCpu, enmOp);
    31573158    for (int i = (int)cbParam - 1; i >= 0; i--)
    31583159        CPUMPushHyper(pVCpu, paParam[i]);
  • trunk/src/VBox/VMM/VMMR0/HWSVMR0.h

    r43455 r45786  
    127127
    128128#if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
    129 /**
    130  * Prepares for and executes VMRUN (64-bit guests from a 32-bit host).
    131  *
    132  * @returns VBox status code.
    133  * @param   pVMCBHostPhys   Physical address of host VMCB.
    134  * @param   pVMCBPhys       Physical address of the VMCB.
    135  * @param   pCtx            Pointer to the guest CPU context.
    136  * @param   pVM             Pointer to the VM.
    137  * @param   pVCpu           Pointer to the VMCPU. (not used)
    138  */
    139 DECLASM(int) SVMR0VMSwitcherRun64(RTHCPHYS pVMCBHostPhys, RTHCPHYS pVMCBPhys, PCPUMCTX pCtx, PVM pVM, PVMCPU pVCpu);
    140 
    141 /**
    142  * Executes the specified handler in 64-bit mode.
    143  *
    144  * @returns VBox status code.
    145  * @param   pVM         Pointer to the VM.
    146  * @param   pVCpu       Pointer to the VMCPU.
    147  * @param   pCtx        Pointer to the guest CPU context.
    148  * @param   pfnHandler  Pointer to the RC handler function.
    149  * @param   cbParam     Number of parameters.
    150  * @param   paParam     Array of 32-bit parameters.
    151  */
    152 VMMR0DECL(int) SVMR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTRCPTR pfnHandler, uint32_t cbParam,
     129DECLASM(int)   SVMR0VMSwitcherRun64(RTHCPHYS pVMCBHostPhys, RTHCPHYS pVMCBPhys, PCPUMCTX pCtx, PVM pVM, PVMCPU pVCpu);
     130VMMR0DECL(int) SVMR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, HM64ON32OP enmOp, uint32_t cbParam,
    153131                                         uint32_t *paParam);
    154132#endif /* HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL) */
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.cpp

    r45749 r45786  
    54785478    *(uint32_t *)(pVM->hm.s.vmx.pScratch + 16 + 8) = 1;
    54795479#endif
    5480     rc = VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, pVM->hm.s.pfnVMXGCStartVM64, 6, &aParam[0]);
     5480    rc = VMXR0Execute64BitsHandler(pVM, pVCpu, pCtx, HM64ON32OP_VMXRCStartVM64, 6, &aParam[0]);
    54815481
    54825482#ifdef VBOX_WITH_CRASHDUMP_MAGIC
     
    56105610 * @param   pVCpu       Pointer to the VMCPU.
    56115611 * @param   pCtx        Pointer to the guest CPU context.
    5612  * @param   pfnHandler  Pointer to the RC handler function.
     5612 * @param   enmOp       The operation to perform.
    56135613 * @param   cbParam     Number of parameters.
    56145614 * @param   paParam     Array of 32-bit parameters.
    56155615 */
    5616 VMMR0DECL(int) VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTRCPTR pfnHandler, uint32_t cbParam,
     5616VMMR0DECL(int) VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, HM64ON32OP enmOp, uint32_t cbParam,
    56175617                                         uint32_t *paParam)
    56185618{
     
    56235623
    56245624    AssertReturn(pVM->hm.s.pfnHost32ToGuest64R0, VERR_HM_NO_32_TO_64_SWITCHER);
    5625     Assert(pfnHandler);
     5625    Assert(enmOp > HM64ON32OP_INVALID && enmOp < HM64ON32OP_END);
    56265626    Assert(pVCpu->hm.s.vmx.VMCSCache.Write.cValidEntries <= RT_ELEMENTS(pVCpu->hm.s.vmx.VMCSCache.Write.aField));
    56275627    Assert(pVCpu->hm.s.vmx.VMCSCache.Read.cValidEntries <= RT_ELEMENTS(pVCpu->hm.s.vmx.VMCSCache.Read.aField));
     
    56555655
    56565656    CPUMSetHyperESP(pVCpu, VMMGetStackRC(pVCpu));
    5657     CPUMSetHyperEIP(pVCpu, pfnHandler);
     5657    CPUMSetHyperEIP(pVCpu, enmOp);
    56585658    for (int i=(int)cbParam-1;i>=0;i--)
    56595659        CPUMPushHyper(pVCpu, paParam[i]);
  • trunk/src/VBox/VMM/VMMR0/HWVMXR0.h

    r45681 r45786  
    4646# if HC_ARCH_BITS == 32 && defined(VBOX_WITH_64_BITS_GUESTS) && !defined(VBOX_WITH_HYBRID_32BIT_KERNEL)
    4747DECLASM(int)    VMXR0SwitcherStartVM64(RTHCUINT fResume, PCPUMCTX pCtx, PVMCSCACHE pCache, PVM pVM, PVMCPU pVCpu);
    48 VMMR0DECL(int)  VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, RTRCPTR pfnHandler, uint32_t cbParam,
     48VMMR0DECL(int)  VMXR0Execute64BitsHandler(PVM pVM, PVMCPU pVCpu, PCPUMCTX pCtx, HM64ON32OP enmOp, uint32_t cbParam,
    4949                                         uint32_t *paParam);
    5050# endif
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