Changeset 44362 in vbox for trunk/src/VBox/VMM/VMMAll/PATMAll.cpp
- Timestamp:
- Jan 24, 2013 9:11:05 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/PATMAll.cpp
r41965 r44362 5 5 6 6 /* 7 * Copyright (C) 2006-20 07Oracle Corporation7 * Copyright (C) 2006-2013 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 47 47 * @see pg_raw 48 48 */ 49 VMM DECL(void) PATMRawEnter(PVM pVM, PCPUMCTXCORE pCtxCore)49 VMM_INT_DECL(void) PATMRawEnter(PVM pVM, PCPUMCTXCORE pCtxCore) 50 50 { 51 51 bool fPatchCode = PATMIsPatchGCAddr(pVM, pCtxCore->eip); … … 118 118 * @see @ref pg_raw 119 119 */ 120 VMM DECL(void) PATMRawLeave(PVM pVM, PCPUMCTXCORE pCtxCore, int rawRC)120 VMM_INT_DECL(void) PATMRawLeave(PVM pVM, PCPUMCTXCORE pCtxCore, int rawRC) 121 121 { 122 122 bool fPatchCode = PATMIsPatchGCAddr(pVM, pCtxCore->eip); … … 158 158 if (enmState == PATMTRANS_SAFE) 159 159 { 160 Assert(! PATMFindActivePatchByEntrypoint(pVM, pOrgInstrGC));160 Assert(!patmFindActivePatchByEntrypoint(pVM, pOrgInstrGC)); 161 161 Log(("Switchback from %RRv to %RRv (Psp=%x)\n", pCtxCore->eip, pOrgInstrGC, CTXSUFF(pVM->patm.s.pGCState)->Psp)); 162 162 STAM_COUNTER_INC(&pVM->patm.s.StatSwitchBack); … … 210 210 * @param pCtxCore The context core. 211 211 */ 212 VMM DECL(uint32_t) PATMRawGetEFlags(PVM pVM, PCCPUMCTXCORE pCtxCore)212 VMM_INT_DECL(uint32_t) PATMRawGetEFlags(PVM pVM, PCCPUMCTXCORE pCtxCore) 213 213 { 214 214 uint32_t efl = pCtxCore->eflags.u32; … … 226 226 * @param efl The new EFLAGS value. 227 227 */ 228 VMM DECL(void) PATMRawSetEFlags(PVM pVM, PCPUMCTXCORE pCtxCore, uint32_t efl)228 VMM_INT_DECL(void) PATMRawSetEFlags(PVM pVM, PCPUMCTXCORE pCtxCore, uint32_t efl) 229 229 { 230 230 pVM->patm.s.CTXSUFF(pGCState)->uVMFlags = efl & PATM_VIRTUAL_FLAGS_MASK; … … 240 240 * @param pAddrGC Guest context address 241 241 */ 242 VMM DECL(bool) PATMShouldUseRawMode(PVM pVM, RTRCPTR pAddrGC)242 VMM_INT_DECL(bool) PATMShouldUseRawMode(PVM pVM, RTRCPTR pAddrGC) 243 243 { 244 244 return ( PATMIsEnabled(pVM) … … 252 252 * @param pVM Pointer to the VM. 253 253 */ 254 VMM DECL(RCPTRTYPE(PPATMGCSTATE)) PATMQueryGCState(PVM pVM)254 VMM_INT_DECL(RCPTRTYPE(PPATMGCSTATE)) PATMQueryGCState(PVM pVM) 255 255 { 256 256 return pVM->patm.s.pGCStateGC; … … 263 263 * @param pVM Pointer to the VM. 264 264 * @param pAddrGC Guest context address 265 * @internal 265 266 */ 266 267 VMMDECL(bool) PATMIsPatchGCAddr(PVM pVM, RTRCUINTPTR pAddrGC) … … 277 278 * @param pCachedData GC pointer to cached data 278 279 */ 279 VMM DECL(int) PATMSetMMIOPatchInfo(PVM pVM, RTGCPHYS GCPhys, RTRCPTR pCachedData)280 VMM_INT_DECL(int) PATMSetMMIOPatchInfo(PVM pVM, RTGCPHYS GCPhys, RTRCPTR pCachedData) 280 281 { 281 282 pVM->patm.s.mmio.GCPhys = GCPhys; … … 293 294 * @param pVM Pointer to the VM. 294 295 */ 295 VMM DECL(bool) PATMAreInterruptsEnabled(PVM pVM)296 VMM_INT_DECL(bool) PATMAreInterruptsEnabled(PVM pVM) 296 297 { 297 298 PCPUMCTX pCtx = CPUMQueryGuestCtxPtr(VMMGetCpu(pVM)); … … 309 310 * @param pCtxCore CPU context 310 311 */ 311 VMM DECL(bool) PATMAreInterruptsEnabledByCtxCore(PVM pVM, PCPUMCTXCORE pCtxCore)312 VMM_INT_DECL(bool) PATMAreInterruptsEnabledByCtxCore(PVM pVM, PCPUMCTXCORE pCtxCore) 312 313 { 313 314 if (PATMIsEnabled(pVM)) … … 327 328 * 328 329 */ 329 VMMDECL(PPATMPATCHREC) PATMQueryFunctionPatch(PVM pVM, RTRCPTR pInstrGC)330 PPATMPATCHREC patmQueryFunctionPatch(PVM pVM, RTRCPTR pInstrGC) 330 331 { 331 332 PPATMPATCHREC pRec; … … 351 352 * @param pSize Original instruction size (out, optional) 352 353 */ 353 VMM DECL(bool) PATMIsInt3Patch(PVM pVM, RTRCPTR pInstrGC, uint32_t *pOpcode, uint32_t *pSize)354 VMM_INT_DECL(bool) PATMIsInt3Patch(PVM pVM, RTRCPTR pInstrGC, uint32_t *pOpcode, uint32_t *pSize) 354 355 { 355 356 PPATMPATCHREC pRec; … … 450 451 * @param pRelBranchPatch Relative duplicated function address 451 452 */ 452 VMMDECL(int) PATMAddBranchToLookupCache(PVM pVM, RTRCPTR pJumpTableGC, RTRCPTR pBranchTarget, RTRCUINTPTR pRelBranchPatch)453 int patmAddBranchToLookupCache(PVM pVM, RTRCPTR pJumpTableGC, RTRCPTR pBranchTarget, RTRCUINTPTR pRelBranchPatch) 453 454 { 454 455 PPATCHJUMPTABLE pJumpTable; … … 516 517 * @param fPatchFlags Patch flags 517 518 */ 518 VMMDECL(const char *)patmGetInstructionString(uint32_t opcode, uint32_t fPatchFlags)519 const char *patmGetInstructionString(uint32_t opcode, uint32_t fPatchFlags) 519 520 { 520 521 const char *pszInstr = NULL;
Note:
See TracChangeset
for help on using the changeset viewer.