VirtualBox

Ignore:
Timestamp:
Jan 24, 2013 9:11:05 PM (12 years ago)
Author:
vboxsync
Message:

PATM: Changed two Main APIs to use PUVM instead of PVM (one of them directly accessed it). Lot's of function scope cleanups.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/PATMAll.cpp

    r41965 r44362  
    55
    66/*
    7  * Copyright (C) 2006-2007 Oracle Corporation
     7 * Copyright (C) 2006-2013 Oracle Corporation
    88 *
    99 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    4747 * @see     pg_raw
    4848 */
    49 VMMDECL(void) PATMRawEnter(PVM pVM, PCPUMCTXCORE pCtxCore)
     49VMM_INT_DECL(void) PATMRawEnter(PVM pVM, PCPUMCTXCORE pCtxCore)
    5050{
    5151    bool fPatchCode = PATMIsPatchGCAddr(pVM, pCtxCore->eip);
     
    118118 * @see     @ref pg_raw
    119119 */
    120 VMMDECL(void) PATMRawLeave(PVM pVM, PCPUMCTXCORE pCtxCore, int rawRC)
     120VMM_INT_DECL(void) PATMRawLeave(PVM pVM, PCPUMCTXCORE pCtxCore, int rawRC)
    121121{
    122122    bool fPatchCode = PATMIsPatchGCAddr(pVM, pCtxCore->eip);
     
    158158                if (enmState == PATMTRANS_SAFE)
    159159                {
    160                     Assert(!PATMFindActivePatchByEntrypoint(pVM, pOrgInstrGC));
     160                    Assert(!patmFindActivePatchByEntrypoint(pVM, pOrgInstrGC));
    161161                    Log(("Switchback from %RRv to %RRv (Psp=%x)\n", pCtxCore->eip, pOrgInstrGC, CTXSUFF(pVM->patm.s.pGCState)->Psp));
    162162                    STAM_COUNTER_INC(&pVM->patm.s.StatSwitchBack);
     
    210210 * @param   pCtxCore    The context core.
    211211 */
    212 VMMDECL(uint32_t) PATMRawGetEFlags(PVM pVM, PCCPUMCTXCORE pCtxCore)
     212VMM_INT_DECL(uint32_t) PATMRawGetEFlags(PVM pVM, PCCPUMCTXCORE pCtxCore)
    213213{
    214214    uint32_t efl = pCtxCore->eflags.u32;
     
    226226 * @param   efl         The new EFLAGS value.
    227227 */
    228 VMMDECL(void) PATMRawSetEFlags(PVM pVM, PCPUMCTXCORE pCtxCore, uint32_t efl)
     228VMM_INT_DECL(void) PATMRawSetEFlags(PVM pVM, PCPUMCTXCORE pCtxCore, uint32_t efl)
    229229{
    230230    pVM->patm.s.CTXSUFF(pGCState)->uVMFlags = efl & PATM_VIRTUAL_FLAGS_MASK;
     
    240240 * @param   pAddrGC     Guest context address
    241241 */
    242 VMMDECL(bool) PATMShouldUseRawMode(PVM pVM, RTRCPTR pAddrGC)
     242VMM_INT_DECL(bool) PATMShouldUseRawMode(PVM pVM, RTRCPTR pAddrGC)
    243243{
    244244    return (    PATMIsEnabled(pVM)
     
    252252 * @param   pVM         Pointer to the VM.
    253253 */
    254 VMMDECL(RCPTRTYPE(PPATMGCSTATE)) PATMQueryGCState(PVM pVM)
     254VMM_INT_DECL(RCPTRTYPE(PPATMGCSTATE)) PATMQueryGCState(PVM pVM)
    255255{
    256256    return pVM->patm.s.pGCStateGC;
     
    263263 * @param   pVM         Pointer to the VM.
    264264 * @param   pAddrGC     Guest context address
     265 * @internal
    265266 */
    266267VMMDECL(bool) PATMIsPatchGCAddr(PVM pVM, RTRCUINTPTR pAddrGC)
     
    277278 * @param   pCachedData     GC pointer to cached data
    278279 */
    279 VMMDECL(int) PATMSetMMIOPatchInfo(PVM pVM, RTGCPHYS GCPhys, RTRCPTR pCachedData)
     280VMM_INT_DECL(int) PATMSetMMIOPatchInfo(PVM pVM, RTGCPHYS GCPhys, RTRCPTR pCachedData)
    280281{
    281282    pVM->patm.s.mmio.GCPhys = GCPhys;
     
    293294 * @param   pVM         Pointer to the VM.
    294295 */
    295 VMMDECL(bool) PATMAreInterruptsEnabled(PVM pVM)
     296VMM_INT_DECL(bool) PATMAreInterruptsEnabled(PVM pVM)
    296297{
    297298    PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(VMMGetCpu(pVM));
     
    309310 * @param   pCtxCore    CPU context
    310311 */
    311 VMMDECL(bool) PATMAreInterruptsEnabledByCtxCore(PVM pVM, PCPUMCTXCORE pCtxCore)
     312VMM_INT_DECL(bool) PATMAreInterruptsEnabledByCtxCore(PVM pVM, PCPUMCTXCORE pCtxCore)
    312313{
    313314    if (PATMIsEnabled(pVM))
     
    327328 *
    328329 */
    329 VMMDECL(PPATMPATCHREC) PATMQueryFunctionPatch(PVM pVM, RTRCPTR pInstrGC)
     330PPATMPATCHREC patmQueryFunctionPatch(PVM pVM, RTRCPTR pInstrGC)
    330331{
    331332    PPATMPATCHREC pRec;
     
    351352 * @param   pSize       Original instruction size (out, optional)
    352353 */
    353 VMMDECL(bool) PATMIsInt3Patch(PVM pVM, RTRCPTR pInstrGC, uint32_t *pOpcode, uint32_t *pSize)
     354VMM_INT_DECL(bool) PATMIsInt3Patch(PVM pVM, RTRCPTR pInstrGC, uint32_t *pOpcode, uint32_t *pSize)
    354355{
    355356    PPATMPATCHREC pRec;
     
    450451 * @param   pRelBranchPatch     Relative duplicated function address
    451452 */
    452 VMMDECL(int) PATMAddBranchToLookupCache(PVM pVM, RTRCPTR pJumpTableGC, RTRCPTR pBranchTarget, RTRCUINTPTR pRelBranchPatch)
     453int patmAddBranchToLookupCache(PVM pVM, RTRCPTR pJumpTableGC, RTRCPTR pBranchTarget, RTRCUINTPTR pRelBranchPatch)
    453454{
    454455    PPATCHJUMPTABLE pJumpTable;
     
    516517 * @param   fPatchFlags Patch flags
    517518 */
    518 VMMDECL(const char *) patmGetInstructionString(uint32_t opcode, uint32_t fPatchFlags)
     519const char *patmGetInstructionString(uint32_t opcode, uint32_t fPatchFlags)
    519520{
    520521    const char *pszInstr = NULL;
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