VirtualBox

Changeset 13813 in vbox


Ignore:
Timestamp:
Nov 4, 2008 9:55:34 PM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
38804
Message:

#1865: Final VMM cleanups.

Location:
trunk
Files:
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm.h

    r13778 r13813  
    129129VMMR3DECL(void)     VMMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
    130130VMMR3DECL(int)      VMMR3UpdateLoggers(PVM pVM);
    131 VMMR3DECL(const char *) VMMR3GetGCAssertMsg1(PVM pVM);
    132 VMMR3DECL(const char *) VMMR3GetGCAssertMsg2(PVM pVM);
     131VMMR3DECL(const char *) VMMR3GetRZAssertMsg1(PVM pVM);
     132VMMR3DECL(const char *) VMMR3GetRZAssertMsg2(PVM pVM);
    133133VMMR3DECL(int)      VMMR3GetImportRC(PVM pVM, const char *pszSymbol, PRTRCPTR pRCPtrValue);
    134134VMMR3DECL(int)      VMMR3SelectSwitcher(PVM pVM, VMMSWITCHER enmSwitcher);
     
    136136VMMR3DECL(int)      VMMR3RawRunGC(PVM pVM);
    137137VMMR3DECL(int)      VMMR3HwAccRunGC(PVM pVM);
    138 VMMR3DECL(int)      VMMR3CallGC(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, ...);
    139 VMMR3DECL(int)      VMMR3CallGCV(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, va_list args);
     138VMMR3DECL(int)      VMMR3CallRC(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, ...);
     139VMMR3DECL(int)      VMMR3CallRCV(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, va_list args);
    140140VMMR3DECL(int)      VMMR3ResumeHyper(PVM pVM);
    141141VMMR3DECL(void)     VMMR3FatalDump(PVM pVM, int rcErr);
  • trunk/include/iprt/initterm.h

    r11841 r13813  
    8282RTR3DECL(int) RTR3InitAndSUPLibWithProgramPath(const char *pszProgramPath);
    8383
    84 /** 
     84/**
    8585 * Initializes the runtime library and possibly also SUPLib too.
    86  * 
     86 *
    8787 * Avoid this interface, it's not considered stable.
    88  * 
     88 *
    8989 * @returns IPRT status code.
    9090 * @param   iVersion        The interface version. Must be 0 atm.
     
    119119#ifdef IN_GC
    120120/**
    121  * Initalizes the guest context runtime library.
     121 * Initializes the raw-mode context runtime library.
    122122 *
    123123 * @returns iprt status code.
     
    125125 * @param   u64ProgramStartNanoTS  The startup timestamp.
    126126 */
    127 RTGCDECL(int) RTGCInit(uint64_t u64ProgramStartNanoTS);
     127RTGCDECL(int) RTRCInit(uint64_t u64ProgramStartNanoTS);
    128128
    129129/**
    130  * Terminates the guest context runtime library.
     130 * Terminates the raw-mode context runtime library.
    131131 */
    132 RTGCDECL(void) RTGCTerm(void);
     132RTGCDECL(void) RTRCTerm(void);
    133133#endif
    134134
  • trunk/src/VBox/Runtime/gc/initterm-gc.cpp

    r8245 r13813  
    11/* $Id$ */
    22/** @file
    3  * IPRT - Init Guest Context.
     3 * IPRT - Init Raw-mode Context.
    44 */
    55
     
    6464
    6565/**
    66  * Initalizes the guest context runtime library.
     66 * Initializes the raw-mode context runtime library.
    6767 *
    6868 * @returns iprt status code.
     
    7070 * @param   u64ProgramStartNanoTS  The startup timestamp.
    7171 */
    72 RTGCDECL(int) RTGCInit(uint64_t u64ProgramStartNanoTS)
     72RTGCDECL(int) RTRCInit(uint64_t u64ProgramStartNanoTS)
    7373{
    7474    /*
     
    8585
    8686/**
    87  * Terminates the guest context runtime library.
     87 * Terminates the raw-mode context runtime library.
    8888 */
    89 RTGCDECL(void) RTGCTerm(void)
     89RTGCDECL(void) RTRCTerm(void)
    9090{
    9191    /* do nothing */
  • trunk/src/VBox/VMM/EM.cpp

    r13796 r13813  
    664664
    665665            case VINF_EM_DBG_HYPER_ASSERTION:
    666                 RTPrintf("\nVINF_EM_DBG_HYPER_ASSERTION:\n%s%s\n", VMMR3GetGCAssertMsg1(pVM), VMMR3GetGCAssertMsg2(pVM));
    667                 rc = DBGFR3EventAssertion(pVM, DBGFEVENT_ASSERTION_HYPER, VMMR3GetGCAssertMsg1(pVM), VMMR3GetGCAssertMsg2(pVM));
     666                RTPrintf("\nVINF_EM_DBG_HYPER_ASSERTION:\n%s%s\n", VMMR3GetRZAssertMsg1(pVM), VMMR3GetRZAssertMsg2(pVM));
     667                rc = DBGFR3EventAssertion(pVM, DBGFEVENT_ASSERTION_HYPER, VMMR3GetRZAssertMsg1(pVM), VMMR3GetRZAssertMsg2(pVM));
    668668                break;
    669669
  • trunk/src/VBox/VMM/VMM.cpp

    r13798 r13813  
    743743
    744744/**
    745  * Gets the pointer to g_szRTAssertMsg1 in GC.
    746  * @returns Pointer to VMMGC::g_szRTAssertMsg1.
    747  *          Returns NULL if not present.
     745 * Gets the pointer to a buffer containing the R0/RC AssertMsg1 output.
     746 *
     747 * @returns Pointer to the buffer.
    748748 * @param   pVM         The VM handle.
    749749 */
    750 VMMR3DECL(const char *) VMMR3GetGCAssertMsg1(PVM pVM)
    751 {
    752     RTGCPTR32 GCPtr;
    753     int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_szRTAssertMsg1", &GCPtr);
     750VMMR3DECL(const char *) VMMR3GetRZAssertMsg1(PVM pVM)
     751{
     752    if (HWACCMIsEnabled(pVM))
     753        return pVM->vmm.s.szRing0AssertMsg1;
     754
     755    RTRCPTR RCPtr;
     756    int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_szRTAssertMsg1", &RCPtr);
    754757    if (VBOX_SUCCESS(rc))
    755         return (const char *)MMHyperGC2HC(pVM, GCPtr);
     758        return (const char *)MMHyperRCToR3(pVM, RCPtr);
     759
    756760    return NULL;
    757761}
     
    759763
    760764/**
    761  * Gets the pointer to g_szRTAssertMsg2 in GC.
    762  * @returns Pointer to VMMGC::g_szRTAssertMsg2.
    763  *          Returns NULL if not present.
     765 * Gets the pointer to a buffer containing the R0/RC AssertMsg2 output.
     766 *
     767 * @returns Pointer to the buffer.
    764768 * @param   pVM         The VM handle.
    765769 */
    766 VMMR3DECL(const char *) VMMR3GetGCAssertMsg2(PVM pVM)
    767 {
    768     RTGCPTR32 GCPtr;
    769     int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_szRTAssertMsg2", &GCPtr);
     770VMMR3DECL(const char *) VMMR3GetRZAssertMsg2(PVM pVM)
     771{
     772    if (HWACCMIsEnabled(pVM))
     773        return pVM->vmm.s.szRing0AssertMsg2;
     774
     775    RTRCPTR RCPtr;
     776    int rc = PDMR3LdrGetSymbolRC(pVM, NULL, "g_szRTAssertMsg2", &RCPtr);
    770777    if (VBOX_SUCCESS(rc))
    771         return (const char *)MMHyperGC2HC(pVM, GCPtr);
     778        return (const char *)MMHyperRCToR3(pVM, RCPtr);
     779
    772780    return NULL;
    773781}
     
    11391147}
    11401148
    1141 /**
    1142  * Calls GC a function.
     1149
     1150/**
     1151 * Calls a RC function.
    11431152 *
    11441153 * @param   pVM         The VM handle.
    1145  * @param   GCPtrEntry  The GC function address.
     1154 * @param   RCPtrEntry  The address of the RC function.
    11461155 * @param   cArgs       The number of arguments in the ....
    11471156 * @param   ...         Arguments to the function.
    11481157 */
    1149 VMMR3DECL(int) VMMR3CallGC(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, ...)
     1158VMMR3DECL(int) VMMR3CallRC(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, ...)
    11501159{
    11511160    va_list args;
    11521161    va_start(args, cArgs);
    1153     int rc = VMMR3CallGCV(pVM, GCPtrEntry, cArgs, args);
     1162    int rc = VMMR3CallRCV(pVM, RCPtrEntry, cArgs, args);
    11541163    va_end(args);
    11551164    return rc;
     
    11581167
    11591168/**
    1160  * Calls GC a function.
     1169 * Calls a RC function.
    11611170 *
    11621171 * @param   pVM         The VM handle.
    1163  * @param   GCPtrEntry  The GC function address.
     1172 * @param   RCPtrEntry  The address of the RC function.
    11641173 * @param   cArgs       The number of arguments in the ....
    11651174 * @param   args        Arguments to the function.
    11661175 */
    1167 VMMR3DECL(int) VMMR3CallGCV(PVM pVM, RTRCPTR GCPtrEntry, unsigned cArgs, va_list args)
    1168 {
    1169     Log2(("VMMR3CallGCV: GCPtrEntry=%VRv cArgs=%d\n", GCPtrEntry, cArgs));
     1176VMMR3DECL(int) VMMR3CallRCV(PVM pVM, RTRCPTR RCPtrEntry, unsigned cArgs, va_list args)
     1177{
     1178    Log2(("VMMR3CallGCV: RCPtrEntry=%VRv cArgs=%d\n", RCPtrEntry, cArgs));
    11701179
    11711180    /*
     
    11811190
    11821191    CPUMPushHyper(pVM, cArgs * sizeof(RTGCUINTPTR32));                          /* stack frame size */
    1183     CPUMPushHyper(pVM, GCPtrEntry);                                             /* what to call */
     1192    CPUMPushHyper(pVM, RCPtrEntry);                                             /* what to call */
    11841193    CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC);
    11851194
     
    12381247VMMR3DECL(int) VMMR3ResumeHyper(PVM pVM)
    12391248{
    1240     Log(("VMMR3ResumeHyper: eip=%VGv esp=%VGv\n", CPUMGetHyperEIP(pVM), CPUMGetHyperESP(pVM)));
     1249    Log(("VMMR3ResumeHyper: eip=%VRv esp=%VRv\n", CPUMGetHyperEIP(pVM), CPUMGetHyperESP(pVM)));
    12411250
    12421251    /*
  • trunk/src/VBox/VMM/VMMGC/VMMGC.cpp

    r13714 r13813  
    11/* $Id$ */
    22/** @file
    3  * VMM - Guest Context.
     3 * VMM - Raw-mode Context.
    44 */
    55
     
    6868    {
    6969        /*
    70          * Init GC modules.
     70         * Init RC modules.
    7171         */
    7272        case VMMGC_DO_VMMGC_INIT:
     
    8787            va_end(va);
    8888
    89             int rc = RTGCInit(u64TS);
     89            int rc = RTRCInit(u64TS);
    9090            Log(("VMMGCEntry: VMMGC_DO_VMMGC_INIT - uArg=%u (svn revision) u64TS=%RX64; rc=%Rrc\n", uArg, u64TS, rc));
    9191            AssertRCReturn(rc, rc);
     
    162162
    163163/**
    164  * Internal GC logger worker: Flush logger.
     164 * Internal RC logger worker: Flush logger.
    165165 *
    166166 * @returns VINF_SUCCESS.
  • trunk/src/VBox/VMM/VMMGC/VMMGC.def

    r13306 r13813  
    11;; @file
    2 ; VMM Guest Context DLL - Definition file.
     2; VMM Raw-mode Context DLL - Definition file.
    33
    44;
  • trunk/src/VBox/VMM/VMMGC/VMMGC.mac

    r8155 r13813  
    11; $Id$
    22;; @file
    3 ; VMMGC - Guest Context Assembly Macros.
     3; VMMGC - Raw-mode Context Assembly Macros.
    44;
    55
  • trunk/src/VBox/VMM/VMMGC/VMMGC99.asm

    r8155 r13813  
    11; $Id$
    22;; @file
    3 ; VMMGC0 - The first object module in the link.
     3; VMMGC99 - The last object module in the link.
    44;
    55
  • trunk/src/VBox/VMM/VMMGC/VMMGCA.asm

    r12989 r13813  
    11; $Id$
    22;; @file
    3 ; VMMGC - Guest Context Virtual Machine Monitor assembly routines.
     3; VMMGC - Raw-mode Context Virtual Machine Monitor assembly routines.
    44;
    55
  • trunk/src/VBox/VMM/VMMGC/VMMGCBuiltin.def

    r8155 r13813  
     1; $Id$
    12;; @file
     3; VMM Raw-mode Context Builtin DLL - Definition file for generating import library.
    24;
    3 ; VMM Guest Context Builtin DLL - Definition file for generating import library.
    45
    56; Copyright (C) 2006-2007 Sun Microsystems, Inc.
  • trunk/src/VBox/VMM/VMMGuruMeditation.cpp

    r13714 r13813  
    231231        {
    232232            bool fIsRing0 = rcErr == VERR_VMM_RING0_ASSERTION;
    233             const char *pszMsg1 = fIsRing0 ? pVM->vmm.s.szRing0AssertMsg1 : VMMR3GetGCAssertMsg1(pVM);
     233            const char *pszMsg1 = VMMR3GetRZAssertMsg1(pVM);
    234234            while (pszMsg1 && *pszMsg1 == '\n')
    235235                pszMsg1++;
    236             const char *pszMsg2 = fIsRing0 ? pVM->vmm.s.szRing0AssertMsg2 : VMMR3GetGCAssertMsg2(pVM);
     236            const char *pszMsg2 = VMMR3GetRZAssertMsg2(pVM);
    237237            while (pszMsg2 && *pszMsg2 == '\n')
    238238                pszMsg2++;
  • trunk/src/VBox/VMM/VMMInternal.h

    r13798 r13813  
    8888
    8989/**
    90  * The ring-0 logger instance.
    91  * We need to be able to find the VM handle from the logger instance.
     90 * The ring-0 logger instance wrapper.
     91 *
     92 * We need to be able to find the VM handle from the logger instance, so we wrap
     93 * it in this structure.
    9294 */
    9395typedef struct VMMR0LOGGER
     
    102104    uint32_t                    u32Alignment;
    103105#endif
    104     /** The ring-0 logger instance. This extends beyond the size.*/
     106    /** The ring-0 logger instance. This extends beyond the size.  */
    105107    RTLOGGER                    Logger;
    106 } VMMR0LOGGER, *PVMMR0LOGGER;
     108} VMMR0LOGGER;
     109/** Pointer to a ring-0 logger instance wrapper. */
     110typedef VMMR0LOGGER *PVMMR0LOGGER;
    107111
    108112
     
    113117typedef struct VMMR0JMPBUF
    114118{
    115     /** Tranditional jmp_buf stuff
     119    /** Traditional jmp_buf stuff
    116120     * @{ */
    117121#if HC_ARCH_BITS == 32
  • trunk/src/VBox/VMM/VMMR0/VMMR0.cpp

    r13812 r13813  
    1919 * additional information or have any questions.
    2020 */
    21 
    2221
    2322/*******************************************************************************
     
    450449}
    451450#endif /* VBOX_WITH_STATISTICS */
    452 
    453451
    454452
     
    10581056
    10591057
    1060 
    10611058/**
    10621059 * Internal R0 logger worker: Flush logger.
     
    11121109
    11131110
    1114 
    11151111/**
    11161112 * Jump back to ring-3 if we're the EMT and the longjmp is armed.
     
    11391135#endif
    11401136}
    1141 
    11421137
    11431138
     
    12111206}
    12121207
    1213 
  • trunk/src/VBox/VMM/VMMSwitcher.cpp

    r13798 r13813  
    2525#define LOG_GROUP LOG_GROUP_VMM
    2626#include <VBox/vmm.h>
    27 #include <VBox/vmapi.h>
    2827#include <VBox/pgm.h>
    29 #include <VBox/cfgm.h>
    30 #include <VBox/pdmqueue.h>
    31 #include <VBox/pdmapi.h>
    32 #include <VBox/cpum.h>
     28#include <VBox/selm.h>
    3329#include <VBox/mm.h>
    34 #include <VBox/iom.h>
    35 #include <VBox/trpm.h>
    36 #include <VBox/selm.h>
    37 #include <VBox/em.h>
    3830#include <VBox/sup.h>
    39 #include <VBox/dbgf.h>
    40 #include <VBox/csam.h>
    41 #include <VBox/patm.h>
    42 #include <VBox/rem.h>
    43 #include <VBox/ssm.h>
    44 #include <VBox/tm.h>
    4531#include "VMMInternal.h"
    4632#include "VMMSwitcher/VMMSwitcher.h"
    4733#include <VBox/vm.h>
     34#include <VBox/dis.h>
    4835
    4936#include <VBox/err.h>
    5037#include <VBox/param.h>
    51 #include <VBox/version.h>
    52 #include <VBox/x86.h>
    53 #include <VBox/hwaccm.h>
    5438#include <iprt/assert.h>
    5539#include <iprt/alloc.h>
    5640#include <iprt/asm.h>
    57 #include <iprt/time.h>
    58 #include <iprt/stream.h>
    5941#include <iprt/string.h>
    60 #include <iprt/stdarg.h>
    6142#include <iprt/ctype.h>
    62 
    63 
    64 
    65 /** The saved state version. */
    66 #define VMM_SAVED_STATE_VERSION     3
    6743
    6844
  • trunk/src/VBox/VMM/VMMSwitcher/VMMSwitcher.mac

    r8155 r13813  
    2020;
    2121
    22 %ifndef __VMMSwitcher_mac__
    23 %define __VMMSwitcher_mac__
     22%ifndef ___VMMSwitcher_mac
     23%define ___VMMSwitcher_mac
    2424
    2525%include "iprt/asmdefs.mac"
     
    140140%endif
    141141
    142 %endif ; !__VMMSwitcher_mac__
     142%endif ; !___VMMSwitcher_mac
    143143
  • trunk/src/VBox/VMM/VMMTests.cpp

    r13714 r13813  
    5656static int vmmR3DoGCTest(PVM pVM, VMMGCOPERATION enmTestcase, unsigned uVariation)
    5757{
    58     RTGCPTR32 GCPtrEP;
    59     int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP);
     58    RTRCPTR RCPtrEP;
     59    int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &RCPtrEP);
    6060    if (VBOX_FAILURE(rc))
    6161        return rc;
     
    6767    CPUMPushHyper(pVM, enmTestcase);
    6868    CPUMPushHyper(pVM, pVM->pVMGC);
    69     CPUMPushHyper(pVM, 3 * sizeof(RTGCPTR32));  /* stack frame size */
    70     CPUMPushHyper(pVM, GCPtrEP);                /* what to call */
     69    CPUMPushHyper(pVM, 3 * sizeof(RTRCPTR));    /* stack frame size */
     70    CPUMPushHyper(pVM, RCPtrEP);                /* what to call */
    7171    CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC);
    7272    rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN);
     
    9393    RTPrintf("VMM: testing 0%x / %d - %s\n", u8Trap, uVariation, pszDesc);
    9494
    95     RTGCPTR32 GCPtrEP;
    96     int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP);
     95    RTRCPTR RCPtrEP;
     96    int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &RCPtrEP);
    9797    if (VBOX_FAILURE(rc))
    9898        return rc;
     
    104104    CPUMPushHyper(pVM, u8Trap + VMMGC_DO_TESTCASE_TRAP_FIRST);
    105105    CPUMPushHyper(pVM, pVM->pVMGC);
    106     CPUMPushHyper(pVM, 3 * sizeof(RTGCPTR32));  /* stack frame size */
    107     CPUMPushHyper(pVM, GCPtrEP);                /* what to call */
     106    CPUMPushHyper(pVM, 3 * sizeof(RTRCPTR));    /* stack frame size */
     107    CPUMPushHyper(pVM, RCPtrEP);                /* what to call */
    108108    CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC);
    109109    rc = SUPCallVMMR0Fast(pVM->pVMR0, VMMR0_DO_RAW_RUN);
     
    128128    else if (pszFaultEIP)
    129129    {
    130         RTGCPTR32 GCPtrFault;
    131         int rc2 = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, pszFaultEIP, &GCPtrFault);
     130        RTRCPTR RCPtrFault;
     131        int rc2 = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, pszFaultEIP, &RCPtrFault);
    132132        if (VBOX_FAILURE(rc2))
    133133            RTPrintf("VMM: FAILURE - Failed to resolve symbol '%s', %Vrc!\n", pszFaultEIP, rc);
    134         else if (GCPtrFault != CPUMGetHyperEIP(pVM))
    135         {
    136             RTPrintf("VMM: FAILURE - EIP=%VGv expected %VGv (%s)\n", CPUMGetHyperEIP(pVM), GCPtrFault, pszFaultEIP);
     134        else if (RCPtrFault != CPUMGetHyperEIP(pVM))
     135        {
     136            RTPrintf("VMM: FAILURE - EIP=%VGv expected %VGv (%s)\n", CPUMGetHyperEIP(pVM), RCPtrFault, pszFaultEIP);
    137137            fDump = true;
    138138        }
     
    183183     * Setup stack for calling VMMGCEntry().
    184184     */
    185     RTGCPTR32 GCPtrEP;
    186     int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP);
     185    RTRCPTR RCPtrEP;
     186    int rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &RCPtrEP);
    187187    if (VBOX_SUCCESS(rc))
    188188    {
    189         RTPrintf("VMM: VMMGCEntry=%VGv\n", GCPtrEP);
     189        RTPrintf("VMM: VMMGCEntry=%VGv\n", RCPtrEP);
    190190
    191191        /*
     
    245245        /* a bad one at VMMGCEntry */
    246246        RTPrintf("VMM: testing hardware bp at VMMGCEntry (hit)\n");
    247         DBGFR3AddrFromFlat(pVM, &Addr, GCPtrEP);
     247        DBGFR3AddrFromFlat(pVM, &Addr, RCPtrEP);
    248248        RTUINT iBp1;
    249249        rc = DBGFR3BpSetReg(pVM, &Addr, 0,  ~(uint64_t)0, X86_DR7_RW_EO, 1, &iBp1);
     
    338338        CPUMPushHyper(pVM, VMMGC_DO_TESTCASE_HYPER_INTERRUPT);
    339339        CPUMPushHyper(pVM, pVM->pVMGC);
    340         CPUMPushHyper(pVM, 3 * sizeof(RTGCPTR32));  /* stack frame size */
    341         CPUMPushHyper(pVM, GCPtrEP);                /* what to call */
     340        CPUMPushHyper(pVM, 3 * sizeof(RTRCPTR));    /* stack frame size */
     341        CPUMPushHyper(pVM, RCPtrEP);                /* what to call */
    342342        CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC);
    343343        Log(("trampoline=%x\n", pVM->vmm.s.pfnCallTrampolineRC));
     
    400400            CPUMPushHyper(pVM, VMMGC_DO_TESTCASE_NOP);
    401401            CPUMPushHyper(pVM, pVM->pVMGC);
    402             CPUMPushHyper(pVM, 3 * sizeof(RTGCPTR32));    /* stack frame size */
    403             CPUMPushHyper(pVM, GCPtrEP);                /* what to call */
     402            CPUMPushHyper(pVM, 3 * sizeof(RTRCPTR));    /* stack frame size */
     403            CPUMPushHyper(pVM, RCPtrEP);                /* what to call */
    404404            CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC);
    405405
     
    494494     * Setup stack for calling VMMGCEntry().
    495495     */
    496     RTGCPTR32 GCPtrEP;
    497     rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &GCPtrEP);
     496    RTRCPTR RCPtrEP;
     497    rc = PDMR3LdrGetSymbolRC(pVM, VMMGC_MAIN_MODULE_NAME, "VMMGCEntry", &RCPtrEP);
    498498    if (VBOX_SUCCESS(rc))
    499499    {
    500         RTPrintf("VMM: VMMGCEntry=%VGv\n", GCPtrEP);
     500        RTPrintf("VMM: VMMGCEntry=%VGv\n", RCPtrEP);
    501501
    502502        CPUMQueryHyperCtxPtr(pVM, &pHyperCtx);
     
    527527            CPUMPushHyper(pVM, VMMGC_DO_TESTCASE_HWACCM_NOP);
    528528            CPUMPushHyper(pVM, pVM->pVMGC);
    529             CPUMPushHyper(pVM, 3 * sizeof(RTGCPTR32));    /* stack frame size */
    530             CPUMPushHyper(pVM, GCPtrEP);                /* what to call */
     529            CPUMPushHyper(pVM, 3 * sizeof(RTRCPTR));    /* stack frame size */
     530            CPUMPushHyper(pVM, RCPtrEP);                /* what to call */
    531531            CPUMSetHyperEIP(pVM, pVM->vmm.s.pfnCallTrampolineRC);
    532532
  • trunk/src/VBox/VMM/testcase/tstMicro.cpp

    r13782 r13813  
    209209        return rc;
    210210    }
    211     RTGCPTR32 GCPtrEntry;
    212     rc = PDMR3LdrGetSymbolRC(pVM, "tstMicroGC.gc", "tstMicroGC", &GCPtrEntry);
     211    RTRCPTR RCPtrEntry;
     212    rc = PDMR3LdrGetSymbolRC(pVM, "tstMicroGC.gc", "tstMicroGC", &RCPtrEntry);
    213213    if (VBOX_FAILURE(rc))
    214214    {
     
    216216        return rc;
    217217    }
    218     RTGCPTR32 GCPtrStart;
    219     rc = PDMR3LdrGetSymbolRC(pVM, "tstMicroGC.gc", "tstMicroGCAsmStart", &GCPtrStart);
     218    RTRCPTR RCPtrStart;
     219    rc = PDMR3LdrGetSymbolRC(pVM, "tstMicroGC.gc", "tstMicroGCAsmStart", &RCPtrStart);
    220220    if (VBOX_FAILURE(rc))
    221221    {
     
    223223        return rc;
    224224    }
    225     RTGCPTR32 GCPtrEnd;
    226     rc = PDMR3LdrGetSymbolRC(pVM, "tstMicroGC.gc", "tstMicroGCAsmEnd", &GCPtrEnd);
     225    RTRCPTR RCPtrEnd;
     226    rc = PDMR3LdrGetSymbolRC(pVM, "tstMicroGC.gc", "tstMicroGCAsmEnd", &RCPtrEnd);
    227227    if (VBOX_FAILURE(rc))
    228228    {
     
    241241        return rc;
    242242    }
    243     pTst->GCPtr = MMHyperHC2GC(pVM, pTst);
    244     pTst->GCPtrStack = MMHyperHC2GC(pVM, &pTst->au8Stack[sizeof(pTst->au8Stack) - 32]);
     243    pTst->RCPtr = MMHyperR3ToRC(pVM, pTst);
     244    pTst->RCPtrStack = MMHyperR3ToRC(pVM, &pTst->au8Stack[sizeof(pTst->au8Stack) - 32]);
    245245
    246246    /* the page must be writable from user mode */
    247     rc = PGMMapModifyPage(pVM, pTst->GCPtr, sizeof(*pTst), X86_PTE_US | X86_PTE_RW, ~(uint64_t)(X86_PTE_US | X86_PTE_RW));
     247    rc = PGMMapModifyPage(pVM, pTst->RCPtr, sizeof(*pTst), X86_PTE_US | X86_PTE_RW, ~(uint64_t)(X86_PTE_US | X86_PTE_RW));
    248248    if (VBOX_FAILURE(rc))
    249249    {
     
    253253
    254254    /* all the code must be executable from R3. */
    255     rc = PGMMapModifyPage(pVM, GCPtrStart, GCPtrEnd - GCPtrStart + PAGE_SIZE, X86_PTE_US, ~(uint64_t)X86_PTE_US);
     255    rc = PGMMapModifyPage(pVM, RCPtrStart, RCPtrEnd - RCPtrStart + PAGE_SIZE, X86_PTE_US, ~(uint64_t)X86_PTE_US);
    256256    if (VBOX_FAILURE(rc))
    257257    {
     
    265265     * Disassemble the assembly...
    266266     */
    267     RTGCPTR GCPtr = GCPtrStart;
    268     while (GCPtr < GCPtrEnd)
     267    RTGCPTR GCPtr = RCPtrStart;
     268    while (GCPtr < RCPtrEnd)
    269269    {
    270270        size_t  cb = 0;
     
    298298        for (int c = 0; c < 100; c++)
    299299        {
    300             int rc2 = VMMR3CallGC(pVM, GCPtrEntry, 2, pTst->GCPtr, enmTest);
     300            int rc2 = VMMR3CallRC(pVM, RCPtrEntry, 2, pTst->RCPtr, enmTest);
    301301            if (VBOX_SUCCESS(rc2))
    302302            {
     
    327327    {
    328328        TSTMICROTEST enmTest = (TSTMICROTEST)i;
    329         rc = VMMR3CallGC(pVM, GCPtrEntry, 2, pTst->GCPtr, enmTest);
     329        rc = VMMR3CallRC(pVM, RCPtrEntry, 2, pTst->RCPtr, enmTest);
    330330        PrintResultTrap(pTst, enmTest, rc);
    331331    }
  • trunk/src/VBox/VMM/testcase/tstMicro.h

    r8155 r13813  
    7575typedef struct TSTMICRO
    7676{
    77     /** The GC address of this structure. */
    78     RTGCPTR     GCPtr;
     77    /** The RC address of this structure. */
     78    RTRCPTR     RCPtr;
    7979    /** Just for proper alignment. */
    80     RTGCPTR     GCPtrStack;
     80    RTRCPTR     RCPtrStack;
    8181
    8282    /** TSC sampled right before leaving R0. */
  • trunk/src/VBox/VMM/testcase/tstMicro.mac

    r8155 r13813  
    2525
    2626struc TSTMICRO
    27     .GCPtr                   resd 1
    28     .GCPtrStack              resd 1
     27    .RCPtr                   resd 1
     28    .RCPtrStack              resd 1
    2929    .u64TSCR0Start           resq 1
    3030    .u64TSCRxStart           resq 1
  • trunk/src/VBox/VMM/testcase/tstMicroGCA.asm

    r8155 r13813  
    303303    mov     ds, eax
    304304    push    dword 01069h                ; ss
    305     push    dword [ebx + TSTMICRO.GCPtrStack] ; esp
     305    push    dword [ebx + TSTMICRO.RCPtrStack] ; esp
    306306    push    dword 0000h                 ; eflags
    307307    push    dword 01061h                ; cs
     
    343343    mov     ds, eax
    344344    push    0206ah                      ; ss
    345     push    dword [ebx + TSTMICRO.GCPtrStack] ; esp
     345    push    dword [ebx + TSTMICRO.RCPtrStack] ; esp
    346346    push    dword 0000h                 ; eflags
    347347    push    02062h                      ; cs
     
    383383    mov     ds, eax
    384384    push    0306bh                      ; ss
    385     push    dword [ebx + TSTMICRO.GCPtrStack] ; esp
     385    push    dword [ebx + TSTMICRO.RCPtrStack] ; esp
    386386    push    dword 0000h                 ; eflags
    387387    push    03063h                      ; cs
Note: See TracChangeset for help on using the changeset viewer.

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