VirtualBox

Changeset 9148 in vbox for trunk/src/VBox


Ignore:
Timestamp:
May 27, 2008 9:21:03 AM (17 years ago)
Author:
vboxsync
Message:

More 64 bits guest preps

Location:
trunk/src/VBox/VMM
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/MMHyper.cpp

    r8155 r9148  
    100100         * Map the VM structure into the hypervisor space.
    101101         */
    102         rc = MMR3HyperMapPages(pVM, pVM, pVM->pVMR0, RT_ALIGN_Z(sizeof(VM), PAGE_SIZE) >> PAGE_SHIFT, pVM->paVMPagesR3, "VM", &pVM->pVMGC);
     102        RTGCPTR GCPtr;
     103        rc = MMR3HyperMapPages(pVM, pVM, pVM->pVMR0, RT_ALIGN_Z(sizeof(VM), PAGE_SIZE) >> PAGE_SHIFT, pVM->paVMPagesR3, "VM", &GCPtr);
    103104        if (VBOX_SUCCESS(rc))
    104105        {
     106            pVM->pVMGC = (RTGCPTR32)GCPtr;
     107
    105108            /* Reserve a page for fencing. */
    106109            MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL);
     
    109112             * Map the heap into the hypervisor space.
    110113             */
    111             rc = mmR3HyperHeapMap(pVM, pVM->mm.s.pHyperHeapHC, &pVM->mm.s.pHyperHeapGC);
     114            rc = mmR3HyperHeapMap(pVM, pVM->mm.s.pHyperHeapHC, &GCPtr);
    112115            if (VBOX_SUCCESS(rc))
    113116            {
     117                pVM->mm.s.pHyperHeapGC = (RTGCPTR32)GCPtr;
     118
    114119                /*
    115120                 * Register info handlers.
  • trunk/src/VBox/VMM/PDMDevice.cpp

    r8564 r9148  
    12611261        &&  (pDevIns->pDevReg->fFlags & PDM_DEVREG_FLAGS_GC))
    12621262    {
    1263         RTGCPTR GCPtrIn = 0;
     1263        RTGCPTR32 GCPtrIn = 0;
    12641264        if (pszIn)
    12651265        {
     
    12671267            AssertMsgRC(rc, ("Failed to resolve %s.%s (pszIn)\n", pDevIns->pDevReg->szGCMod, pszIn));
    12681268        }
    1269         RTGCPTR GCPtrOut = 0;
     1269        RTGCPTR32 GCPtrOut = 0;
    12701270        if (pszOut && VBOX_SUCCESS(rc))
    12711271        {
     
    12731273            AssertMsgRC(rc, ("Failed to resolve %s.%s (pszOut)\n", pDevIns->pDevReg->szGCMod, pszOut));
    12741274        }
    1275         RTGCPTR GCPtrInStr = 0;
     1275        RTGCPTR32 GCPtrInStr = 0;
    12761276        if (pszInStr && VBOX_SUCCESS(rc))
    12771277        {
     
    12791279            AssertMsgRC(rc, ("Failed to resolve %s.%s (pszInStr)\n", pDevIns->pDevReg->szGCMod, pszInStr));
    12801280        }
    1281         RTGCPTR GCPtrOutStr = 0;
     1281        RTGCPTR32 GCPtrOutStr = 0;
    12821282        if (pszOutStr && VBOX_SUCCESS(rc))
    12831283        {
     
    14061406        &&  (pDevIns->pDevReg->fFlags & PDM_DEVREG_FLAGS_GC))
    14071407    {
    1408         RTGCPTR GCPtrWrite = 0;
     1408        RTGCPTR32 GCPtrWrite = 0;
    14091409        if (pszWrite)
    14101410            rc = PDMR3GetSymbolGCLazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szGCMod, pszWrite, &GCPtrWrite);
    1411         RTGCPTR GCPtrRead = 0;
     1411        RTGCPTR32 GCPtrRead = 0;
    14121412        int rc2 = VINF_SUCCESS;
    14131413        if (pszRead)
    14141414            rc2 = PDMR3GetSymbolGCLazy(pDevIns->Internal.s.pVMHC, pDevIns->pDevReg->szGCMod, pszRead, &GCPtrRead);
    1415         RTGCPTR GCPtrFill = 0;
     1415        RTGCPTR32 GCPtrFill = 0;
    14161416        int rc3 = VINF_SUCCESS;
    14171417        if (pszFill)
     
    41444144    PDMDEV_ASSERT_DEVINS(pDevIns);
    41454145    VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC);
    4146     RTGCPTR pGCHelpers = 0;
     4146    RTGCPTR32 pGCHelpers = 0;
    41474147    int rc = PDMR3GetSymbolGC(pDevIns->Internal.s.pVMHC, NULL, "g_pdmGCPicHlp", &pGCHelpers);
    41484148    AssertReleaseRC(rc);
     
    42304230    PDMDEV_ASSERT_DEVINS(pDevIns);
    42314231    VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC);
    4232     RTGCPTR pGCHelpers = 0;
     4232    RTGCPTR32 pGCHelpers = 0;
    42334233    int rc = PDMR3GetSymbolGC(pDevIns->Internal.s.pVMHC, NULL, "g_pdmGCApicHlp", &pGCHelpers);
    42344234    AssertReleaseRC(rc);
     
    42944294    PDMDEV_ASSERT_DEVINS(pDevIns);
    42954295    VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC);
    4296     RTGCPTR pGCHelpers = 0;
     4296    RTGCPTR32 pGCHelpers = 0;
    42974297    int rc = PDMR3GetSymbolGC(pDevIns->Internal.s.pVMHC, NULL, "g_pdmGCIoApicHlp", &pGCHelpers);
    42984298    AssertReleaseRC(rc);
     
    43774377    PDMDEV_ASSERT_DEVINS(pDevIns);
    43784378    VM_ASSERT_EMT(pDevIns->Internal.s.pVMHC);
    4379     RTGCPTR pGCHelpers = 0;
     4379    RTGCPTR32 pGCHelpers = 0;
    43804380    int rc = PDMR3GetSymbolGC(pDevIns->Internal.s.pVMHC, NULL, "g_pdmGCPciHlp", &pGCHelpers);
    43814381    AssertReleaseRC(rc);
  • trunk/src/VBox/VMM/PDMLdr.cpp

    r8155 r9148  
    750750 * @param   pGCPtrValue     Where to store the symbol value.
    751751 */
    752 PDMR3DECL(int) PDMR3GetSymbolGC(PVM pVM, const char *pszModule, const char *pszSymbol, PRTGCPTR pGCPtrValue)
     752PDMR3DECL(int) PDMR3GetSymbolGC(PVM pVM, const char *pszModule, const char *pszSymbol, PRTGCPTR32 pGCPtrValue)
    753753{
    754754#ifdef PDMLDR_FAKE_MODE
     
    806806 * @param   pGCPtrValue     Where to store the symbol value.
    807807 */
    808 PDMR3DECL(int) PDMR3GetSymbolGCLazy(PVM pVM, const char *pszModule, const char *pszSymbol, PRTGCPTR pGCPtrValue)
     808PDMR3DECL(int) PDMR3GetSymbolGCLazy(PVM pVM, const char *pszModule, const char *pszSymbol, PRTGCPTR32 pGCPtrValue)
    809809{
    810810#ifdef PDMLDR_FAKE_MODE
  • trunk/src/VBox/VMM/PGM.cpp

    r9092 r9148  
    15881588PGMR3DECL(int) PGMR3InitDynMap(PVM pVM)
    15891589{
     1590    RTGCPTR GCPtr;
    15901591    /*
    15911592     * Reserve space for mapping the paging pages into guest context.
    15921593     */
    1593     int rc = MMR3HyperReserve(pVM, PAGE_SIZE * (2 + ELEMENTS(pVM->pgm.s.apHCPaePDs) + 1 + 2 + 2), "Paging", &pVM->pgm.s.pGC32BitPD);
     1594    int rc = MMR3HyperReserve(pVM, PAGE_SIZE * (2 + ELEMENTS(pVM->pgm.s.apHCPaePDs) + 1 + 2 + 2), "Paging", &GCPtr);
    15941595    AssertRCReturn(rc, rc);
     1596    pVM->pgm.s.pGC32BitPD = GCPtr;
    15951597    MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL);
    15961598
     
    15991601     */
    16001602    /** @todo r=bird: Need to verify that the checks for crossing PTs are correct here. They seems to be assuming 4MB PTs.. */
    1601     rc = MMR3HyperReserve(pVM, MM_HYPER_DYNAMIC_SIZE, "Dynamic mapping", &pVM->pgm.s.pbDynPageMapBaseGC);
     1603    rc = MMR3HyperReserve(pVM, MM_HYPER_DYNAMIC_SIZE, "Dynamic mapping", &GCPtr);
     1604    if (VBOX_SUCCESS(rc))
     1605        pVM->pgm.s.pbDynPageMapBaseGC = GCPtr;
     1606
    16021607    if (    VBOX_SUCCESS(rc)
    16031608        &&  (pVM->pgm.s.pbDynPageMapBaseGC >> X86_PD_SHIFT) != ((pVM->pgm.s.pbDynPageMapBaseGC + MM_HYPER_DYNAMIC_SIZE - 1) >> X86_PD_SHIFT))
    1604         rc = MMR3HyperReserve(pVM, MM_HYPER_DYNAMIC_SIZE, "Dynamic mapping not crossing", &pVM->pgm.s.pbDynPageMapBaseGC);
     1609    {
     1610        rc = MMR3HyperReserve(pVM, MM_HYPER_DYNAMIC_SIZE, "Dynamic mapping not crossing", &GCPtr);
     1611        if (VBOX_SUCCESS(rc))
     1612            pVM->pgm.s.pbDynPageMapBaseGC = GCPtr;
     1613    }
    16051614    if (VBOX_SUCCESS(rc))
    16061615    {
     
    21222131        SSMR3GetGCPtr(pSSM,     &GCPtr);
    21232132        RTGCUINTPTR cPTs;
    2124         rc = SSMR3GetU32(pSSM, &cPTs);
     2133        rc = SSMR3GetGCUIntPtr(pSSM, &cPTs);
    21252134        if (VBOX_FAILURE(rc))
    21262135            return rc;
  • trunk/src/VBox/VMM/PGMHandler.cpp

    r8625 r9148  
    112112         * Resolve the GC handler.
    113113         */
    114         RTGCPTR pfnHandlerGC = NIL_RTGCPTR;
     114        RTGCPTR32 pfnHandlerGC = NIL_RTGCPTR;
    115115        if (pszHandlerGC)
    116116            rc = PDMR3GetSymbolGCLazy(pVM, pszModGC, pszHandlerGC, &pfnHandlerGC);
     
    250250     * Resolve the GC handler.
    251251     */
    252     RTGCPTR pfnHandlerGC;
     252    RTGCPTR32 pfnHandlerGC;
    253253    int rc = PDMR3GetSymbolGCLazy(pVM, pszModGC, pszHandlerGC, &pfnHandlerGC);
    254254    if (VBOX_SUCCESS(rc))
  • trunk/src/VBox/VMM/TM.cpp

    r8911 r9148  
    213213    AssertMsgRCReturn(rc, ("Failed to get GIP physical address!\n"), rc);
    214214
    215     rc = MMR3HyperMapHCPhys(pVM, pVM->tm.s.pvGIPR3, HCPhysGIP, PAGE_SIZE, "GIP", &pVM->tm.s.pvGIPGC);
     215    RTGCPTR GCPtr;
     216    rc = MMR3HyperMapHCPhys(pVM, pVM->tm.s.pvGIPR3, HCPhysGIP, PAGE_SIZE, "GIP", &GCPtr);
    216217    if (VBOX_FAILURE(rc))
    217218    {
     
    219220        return rc;
    220221    }
     222    pVM->tm.s.pvGIPGC = GCPtr;
    221223    LogFlow(("TMR3Init: HCPhysGIP=%RHp at %VGv\n", HCPhysGIP, pVM->tm.s.pvGIPGC));
    222224    MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL);
  • trunk/src/VBox/VMM/TRPM.cpp

    r8985 r9148  
    552552     * exports in TRPMR3Init().
    553553     */
    554     RTGCPTR aGCPtrs[TRPM_HANDLER_MAX] = {0};
     554    RTGCPTR32 aGCPtrs[TRPM_HANDLER_MAX] = {0};
    555555    int rc;
    556556    rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "TRPMGCHandlerInterupt", &aGCPtrs[TRPM_HANDLER_INT]);
     
    10511051{
    10521052    /** @todo cleanup trpmR3ClearPassThroughHandler()! */
    1053     RTGCPTR aGCPtrs[TRPM_HANDLER_MAX];
     1053    RTGCPTR32 aGCPtrs[TRPM_HANDLER_MAX];
    10541054    int rc;
    10551055
  • trunk/src/VBox/VMM/TRPMInternal.h

    r8155 r9148  
    149149    /** Temporary Hypervisor trap handlers.
    150150     * NULL means default action. */
    151     RTGCPTR         aTmpTrapHandlers[256];
     151    RTGCPTR32       aTmpTrapHandlers[256];
    152152
    153153    /** GC Pointer to the IDT shadow area (aIdt) placed in Hypervisor memory arena. */
    154     RTGCPTR         GCPtrIdt;
     154    RTGCPTR32       GCPtrIdt;
    155155    /** Current (last) Guest's IDTR. */
    156156    VBOXIDTR        GuestIdtr;
     
    160160
    161161    /** Checked trap & interrupt handler array */
    162     RTGCPTR         aGuestTrapHandler[256];
     162    RTGCPTR32       aGuestTrapHandler[256];
    163163
    164164    /** GC: The number of times writes to the Guest IDT were detected. */
  • trunk/src/VBox/VMM/VMM.cpp

    r8841 r9148  
    306306         * Map the code into the GC address space.
    307307         */
    308         rc = MMR3HyperMapHCPhys(pVM, pVM->vmm.s.pvHCCoreCodeR3, pVM->vmm.s.HCPhysCoreCode, cbCoreCode, "Core Code", &pVM->vmm.s.pvGCCoreCode);
     308        RTGCPTR GCPtr;
     309        rc = MMR3HyperMapHCPhys(pVM, pVM->vmm.s.pvHCCoreCodeR3, pVM->vmm.s.HCPhysCoreCode, cbCoreCode, "Core Code", &GCPtr);
    309310        if (VBOX_SUCCESS(rc))
    310311        {
     312            pVM->vmm.s.pvGCCoreCode = GCPtr;
    311313            MMR3HyperReserve(pVM, PAGE_SIZE, "fence", NULL);
    312314            LogRel(("CoreCode: R3=%VHv R0=%VHv GC=%VGv Phys=%VHp cb=%#x\n",
     
    677679     *      -# do a generic hypervisor call.
    678680     */
    679     RTGCPTR GCPtrEP;
     681    RTGCPTR32 GCPtrEP;
    680682    int rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP);
    681683    if (VBOX_SUCCESS(rc))
     
    866868     */
    867869    int rc = VINF_SUCCESS;
    868     RTGCPTR GCPtrLoggerFlush = 0;
     870    RTGCPTR32 GCPtrLoggerFlush = 0;
    869871
    870872    if (pVM->vmm.s.pLoggerHC
     
    880882    if (pVM->vmm.s.pLoggerHC)
    881883    {
    882         RTGCPTR GCPtrLoggerWrapper = 0;
     884        RTGCPTR32 GCPtrLoggerWrapper = 0;
    883885        rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "vmmGCLoggerWrapper", &GCPtrLoggerWrapper);
    884886        AssertReleaseMsgRC(rc, ("vmmGCLoggerWrapper not found! rc=%Vra\n", rc));
     
    892894    if (pVM->vmm.s.pRelLoggerHC)
    893895    {
    894         RTGCPTR GCPtrLoggerWrapper = 0;
     896        RTGCPTR32 GCPtrLoggerWrapper = 0;
    895897        rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "vmmGCRelLoggerWrapper", &GCPtrLoggerWrapper);
    896898        AssertReleaseMsgRC(rc, ("vmmGCRelLoggerWrapper not found! rc=%Vra\n", rc));
     
    15671569VMMR3DECL(const char *) VMMR3GetGCAssertMsg1(PVM pVM)
    15681570{
    1569     RTGCPTR GCPtr;
     1571    RTGCPTR32 GCPtr;
    15701572    int rc = PDMR3GetSymbolGC(pVM, NULL, "g_szRTAssertMsg1", &GCPtr);
    15711573    if (VBOX_SUCCESS(rc))
     
    15831585VMMR3DECL(const char *) VMMR3GetGCAssertMsg2(PVM pVM)
    15841586{
    1585     RTGCPTR GCPtr;
     1587    RTGCPTR32 GCPtr;
    15861588    int rc = PDMR3GetSymbolGC(pVM, NULL, "g_szRTAssertMsg2", &GCPtr);
    15871589    if (VBOX_SUCCESS(rc))
  • trunk/src/VBox/VMM/VMMInternal.h

    r8841 r9148  
    161161    RTR0PTR                     pvHCCoreCodeR0;
    162162    /** Pointer to core code guest context mapping. */
    163     RTGCPTR                     pvGCCoreCode;
     163    RTGCPTR32                   pvGCCoreCode;
    164164#ifdef VBOX_WITH_NMI
    165165    /** The guest context address of the APIC (host) mapping. */
    166     RTGCPTR                     GCPtrApicBase;
    167     RTGCPTR                     pGCPadding0; /**< Alignment padding */
     166    RTGCPTR32                   GCPtrApicBase;
     167    RTGCPTR32                   pGCPadding0; /**< Alignment padding */
    168168#endif
    169169    /** The current switcher.
     
    180180    GCPTRTYPE(PFNVMMSWITCHERGC) pfnGCGuestToHost;
    181181    /** Call Trampoline. See vmmGCCallTrampoline(). */
    182     RTGCPTR                     pfnGCCallTrampoline;
     182    RTGCPTR32                   pfnGCCallTrampoline;
    183183
    184184    /** Resume Guest Execution. See CPUMGCResumeGuest(). */
    185     RTGCPTR                     pfnCPUMGCResumeGuest;
     185    RTGCPTR32                   pfnCPUMGCResumeGuest;
    186186    /** Resume Guest Execution in V86 mode. See CPUMGCResumeGuestV86(). */
    187     RTGCPTR                     pfnCPUMGCResumeGuestV86;
     187    RTGCPTR32                   pfnCPUMGCResumeGuestV86;
    188188    /** The last GC return code. */
    189189    RTINT                       iLastGCRc;
  • trunk/src/VBox/VMM/VMMTests.cpp

    r8899 r9148  
    5656static int vmmR3DoGCTest(PVM pVM, VMMGCOPERATION enmTestcase, unsigned uVariation)
    5757{
    58     RTGCPTR GCPtrEP;
     58    RTGCPTR32 GCPtrEP;
    5959    int rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP);
    6060    if (VBOX_FAILURE(rc))
     
    9090    RTPrintf("VMM: testing 0%x / %d - %s\n", u8Trap, uVariation, pszDesc);
    9191
    92     RTGCPTR GCPtrEP;
     92    RTGCPTR32 GCPtrEP;
    9393    int rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP);
    9494    if (VBOX_FAILURE(rc))
     
    123123    else if (pszFaultEIP)
    124124    {
    125         RTGCPTR GCPtrFault;
     125        RTGCPTR32 GCPtrFault;
    126126        int rc2 = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, pszFaultEIP, &GCPtrFault);
    127127        if (VBOX_FAILURE(rc2))
     
    178178     * Setup stack for calling VMMGCEntry().
    179179     */
    180     RTGCPTR GCPtrEP;
     180    RTGCPTR32 GCPtrEP;
    181181    int rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP);
    182182    if (VBOX_SUCCESS(rc))
     
    485485     * Setup stack for calling VMMGCEntry().
    486486     */
    487     RTGCPTR GCPtrEP;
     487    RTGCPTR32 GCPtrEP;
    488488    rc = PDMR3GetSymbolGC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP);
    489489    if (VBOX_SUCCESS(rc))
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