VirtualBox

Changeset 5040 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Sep 26, 2007 9:03:00 AM (17 years ago)
Author:
vboxsync
Message:

GC phys/virt to HC virt functions are no longer accessible in our PDM interface.
Rewrote disassembly functions to use the mapping functions.

Code that runs in EMT (like CSAM/PATM) can still use the old conversion functions. Easier to use
and (far) less overhead.

Location:
trunk/include/VBox
Files:
3 edited

Legend:

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

    r4662 r5040  
    107107#define VMMDEV_VERSION_MINOR (0x4)
    108108#define VMMDEV_VERSION ((VMMDEV_VERSION_MAJOR << 16) | VMMDEV_VERSION_MINOR)
     109
     110/* Maximum request packet size */
     111#define VMMDEV_MAX_VMMDEVREQ_SIZE           _1M
    109112
    110113/**
  • trunk/include/VBox/pdmdev.h

    r4787 r5040  
    23432343
    23442344    /**
    2345      * Convert a guest physical address to a host virtual address.
     2345     * Convert a guest physical address to a host virtual address. (OBSOLETE)
    23462346     *
    23472347     * @returns VBox status code.
     
    23552355     * @remark  Do not use the mapping after you return to the caller! (it could get invalidated/changed)
    23562356     */
    2357     DECLR3CALLBACKMEMBER(int, pfnPhys2HCVirt,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, PRTHCPTR ppvHC));
    2358 
    2359     /**
    2360      * Convert a guest virtual address to a host virtual address.
     2357    DECLR3CALLBACKMEMBER(int, pfnObsoletePhys2HCVirt,(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, PRTHCPTR ppvHC));
     2358
     2359    /**
     2360     * Convert a guest virtual address to a host virtual address. (OBSOLETE)
    23612361     *
    23622362     * @returns VBox status code.
     
    23692369     * @remark  Do not use the mapping after you return to the caller! (it could get invalidated/changed)
    23702370     */
    2371     DECLR3CALLBACKMEMBER(int, pfnPhysGCPtr2HCPtr,(PPDMDEVINS pDevIns, RTGCPTR GCPtr, PRTHCPTR pHCPtr));
     2371    DECLR3CALLBACKMEMBER(int, pfnObsoletePhysGCPtr2HCPtr,(PPDMDEVINS pDevIns, RTGCPTR GCPtr, PRTHCPTR pHCPtr));
    23722372
    23732373    /**
     
    32073207
    32083208/**
    3209  * @copydoc PDMDEVHLP::pfnPhys2HCVirt
    3210  */
    3211 DECLINLINE(int) PDMDevHlpPhys2HCVirt(PPDMDEVINS pDevIns, RTGCPHYS GCPhys, RTUINT cbRange, PRTHCPTR ppvHC)
    3212 {
    3213     return pDevIns->pDevHlp->pfnPhys2HCVirt(pDevIns, GCPhys, cbRange, ppvHC);
    3214 }
    3215 
    3216 /**
    3217  * @copydoc PDMDEVHLP::pfnPhysGCPtr2HCPtr
    3218  */
    3219 DECLINLINE(int) PDMDevHlpPhysGCPtr2HCPtr(PPDMDEVINS pDevIns, RTGCPTR GCPtr, PRTHCPTR pHCPtr)
    3220 {
    3221     return pDevIns->pDevHlp->pfnPhysGCPtr2HCPtr(pDevIns, GCPtr, pHCPtr);
    3222 }
    3223 
    3224 /**
    32253209 * @copydoc PDMDEVHLP::pfnPhysGCPtr2GCPhys
    32263210 */
  • trunk/include/VBox/pgm.h

    r4787 r5040  
    837837typedef struct PGMPAGEMAPLOCK
    838838{
     839    /** @todo see PGMPhysIsPageMappingLockValid for possibly incorrect assumptions */
    839840#ifdef IN_GC
    840841    /** Just a dummy for the time being. */
     
    965966PGMDECL(void) PGMPhysReleasePageMappingLock(PVM pVM, PPGMPAGEMAPLOCK pLock);
    966967
     968
     969/**
     970 * Checks if the lock structure is valid
     971 *
     972 * @param   pVM         The VM handle.
     973 * @param   pLock       The lock structure initialized by the mapping function.
     974 */
     975DECLINLINE(bool) PGMPhysIsPageMappingLockValid(PVM pVM, PPGMPAGEMAPLOCK pLock)
     976{
     977    /** @todo -> complete/change this  */
     978#ifdef IN_GC
     979    return !!(pLock->u32Dummy);
     980#else
     981    return !!(pLock->pvPage);
     982#endif
     983}
     984
    967985/**
    968986 * Converts a GC physical address to a HC pointer.
     
    977995 * @param   cbRange Physical range
    978996 * @param   pHCPtr  Where to store the HC pointer on success.
     997 *
     998 * @remark  Do *not* assume this mapping will be around forever!
    979999 */
    9801000PGMDECL(int) PGMPhysGCPhys2HCPtr(PVM pVM, RTGCPHYS GCPhys, RTUINT cbRange, PRTHCPTR pHCPtr);
     
    9891009 * @param   GCPtr       The guest pointer to convert.
    9901010 * @param   pHCPtr      Where to store the HC virtual address.
     1011 *
     1012 * @remark  Do *not* assume this mapping will be around forever!
    9911013 */
    9921014PGMDECL(int) PGMPhysGCPtr2HCPtr(PVM pVM, RTGCPTR GCPtr, PRTHCPTR pHCPtr);
     
    10021024 * @param   pHCPtr      Where to store the HC pointer.
    10031025 *
     1026 * @remark  Do *not* assume this mapping will be around forever!
    10041027 * @remark  This function is used by the REM at a time where PGM could
    10051028 *          potentially not be in sync. It could also be used by a
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