VirtualBox

Changeset 37424 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Jun 12, 2011 7:28:11 PM (14 years ago)
Author:
vboxsync
Message:

IOM: Moved the inline functions out of IOMInternal.h and into IOMInline.h.

Location:
trunk/src/VBox/VMM/VMMAll
Files:
2 edited

Legend:

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

    r36794 r37424  
    3737#include <VBox/log.h>
    3838#include <iprt/assert.h>
     39#include "IOMInline.h"
    3940
    4041
     
    292293        ||   (unsigned)Port - (unsigned)pRange->Port >= (unsigned)pRange->cPorts)
    293294    {
    294         pRange = iomIOPortGetRange(&pVM->iom.s, Port);
     295        pRange = iomIOPortGetRange(pVM, Port);
    295296        if (pRange)
    296297            pVM->iom.s.CTX_SUFF(pRangeLastRead) = pRange;
     
    387388     * Handler in ring-3?
    388389     */
    389     PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(&pVM->iom.s, Port);
     390    PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(pVM, Port);
    390391    if (pRangeR3)
    391392    {
     
    488489        ||   (unsigned)Port - (unsigned)pRange->Port >= (unsigned)pRange->cPorts)
    489490    {
    490         pRange = iomIOPortGetRange(&pVM->iom.s, Port);
     491        pRange = iomIOPortGetRange(pVM, Port);
    491492        if (pRange)
    492493            pVM->iom.s.CTX_SUFF(pRangeLastRead) = pRange;
     
    569570     * Handler in ring-3?
    570571     */
    571     PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(&pVM->iom.s, Port);
     572    PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(pVM, Port);
    572573    if (pRangeR3)
    573574    {
     
    658659        ||   (unsigned)Port - (unsigned)pRange->Port >= (unsigned)pRange->cPorts)
    659660    {
    660         pRange = iomIOPortGetRange(&pVM->iom.s, Port);
     661        pRange = iomIOPortGetRange(pVM, Port);
    661662        if (pRange)
    662663            pVM->iom.s.CTX_SUFF(pRangeLastWrite) = pRange;
     
    738739     * Handler in ring-3?
    739740     */
    740     PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(&pVM->iom.s, Port);
     741    PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(pVM, Port);
    741742    if (pRangeR3)
    742743    {
     
    828829        ||   (unsigned)Port - (unsigned)pRange->Port >= (unsigned)pRange->cPorts)
    829830    {
    830         pRange = iomIOPortGetRange(&pVM->iom.s, Port);
     831        pRange = iomIOPortGetRange(pVM, Port);
    831832        if (pRange)
    832833            pVM->iom.s.CTX_SUFF(pRangeLastWrite) = pRange;
     
    909910     * Handler in ring-3?
    910911     */
    911     PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(&pVM->iom.s, Port);
     912    PIOMIOPORTRANGER3 pRangeR3 = iomIOPortGetRangeR3(pVM, Port);
    912913    if (pRangeR3)
    913914    {
  • trunk/src/VBox/VMM/VMMAll/IOMAllMMIO.cpp

    r37423 r37424  
    3636#include <VBox/vmm/vmm.h>
    3737#include <VBox/vmm/hwaccm.h>
     38#include "IOMInline.h"
    3839
    3940#include <VBox/dis.h>
     
    8182{
    8283#ifdef VBOX_WITH_STATISTICS
    83     PIOMMMIOSTATS pStats = iomMMIOGetStats(&pVM->iom.s, GCPhysFault, pRange);
     84    PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhysFault, pRange);
    8485    Assert(pStats);
    8586#endif
     
    103104{
    104105#ifdef VBOX_WITH_STATISTICS
    105     PIOMMMIOSTATS pStats = iomMMIOGetStats(&pVM->iom.s, GCPhys, pRange);
     106    PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhys, pRange);
    106107    Assert(pStats);
    107108#endif
     
    455456        PhysDst |= (RTGCUINTPTR)pu8Virt & PAGE_OFFSET_MASK;
    456457        if (    RT_SUCCESS(rc)
    457             &&  (pMMIODst = iomMMIOGetRange(&pVM->iom.s, PhysDst)))
     458            &&  (pMMIODst = iomMMIOGetRange(pVM, PhysDst)))
    458459        {
    459460            /** @todo implement per-device locks for MMIO access. */
     
    10761077    PIOMMMIORANGE pRange = (PIOMMMIORANGE)pvUser;
    10771078    Assert(pRange);
    1078     Assert(pRange == iomMMIOGetRange(&pVM->iom.s, GCPhysFault));
     1079    Assert(pRange == iomMMIOGetRange(pVM, GCPhysFault));
    10791080    /** @todo implement per-device locks for MMIO access. It can replace the IOM
    10801081     *        lock for most of the code, provided that we retake the lock while
     
    10871088     * Locate the statistics, if > PAGE_SIZE we'll use the first byte for everything.
    10881089     */
    1089     PIOMMMIOSTATS pStats = iomMMIOGetStats(&pVM->iom.s, GCPhysFault, pRange);
     1090    PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhysFault, pRange);
    10901091    if (!pStats)
    10911092    {
     
    13091310        return VINF_IOM_HC_MMIO_READ_WRITE;
    13101311#endif
    1311     VBOXSTRICTRC rcStrict = iomMMIOHandler(pVM, (uint32_t)uErrorCode, pCtxCore, GCPhysFault, iomMMIOGetRange(&pVM->iom.s, GCPhysFault));
     1312    VBOXSTRICTRC rcStrict = iomMMIOHandler(pVM, (uint32_t)uErrorCode, pCtxCore, GCPhysFault, iomMMIOGetRange(pVM, GCPhysFault));
    13121313    iomUnlock(pVM);
    13131314    return VBOXSTRICTRC_VAL(rcStrict);
     
    13401341
    13411342    Assert(pRange);
    1342     Assert(pRange == iomMMIOGetRange(&pVM->iom.s, GCPhysFault));
     1343    Assert(pRange == iomMMIOGetRange(pVM, GCPhysFault));
    13431344    /** @todo implement per-device locks for MMIO access. It can replace the IOM
    13441345     *        lock for most of the code, provided that we retake the lock while
     
    13841385     * Lookup the current context range node and statistics.
    13851386     */
    1386     PIOMMMIORANGE pRange = iomMMIOGetRange(&pVM->iom.s, GCPhys);
     1387    PIOMMMIORANGE pRange = iomMMIOGetRange(pVM, GCPhys);
    13871388    AssertMsg(pRange, ("Handlers and page tables are out of sync or something! GCPhys=%RGp cbValue=%d\n", GCPhys, cbValue));
    13881389    if (!pRange)
     
    13941395    Assert(!pRange->CTX_SUFF(pDevIns) || !pRange->CTX_SUFF(pDevIns)->CTX_SUFF(pCritSect));
    13951396#ifdef VBOX_WITH_STATISTICS
    1396     PIOMMMIOSTATS pStats = iomMMIOGetStats(&pVM->iom.s, GCPhys, pRange);
     1397    PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhys, pRange);
    13971398    if (!pStats)
    13981399    {
     
    15131514     * Lookup the current context range node.
    15141515     */
    1515     PIOMMMIORANGE pRange = iomMMIOGetRange(&pVM->iom.s, GCPhys);
     1516    PIOMMMIORANGE pRange = iomMMIOGetRange(pVM, GCPhys);
    15161517    AssertMsg(pRange, ("Handlers and page tables are out of sync or something! GCPhys=%RGp cbValue=%d\n", GCPhys, cbValue));
    15171518    if (!pRange)
     
    15231524    Assert(!pRange->CTX_SUFF(pDevIns) || !pRange->CTX_SUFF(pDevIns)->CTX_SUFF(pCritSect));
    15241525#ifdef VBOX_WITH_STATISTICS
    1525     PIOMMMIOSTATS pStats = iomMMIOGetStats(&pVM->iom.s, GCPhys, pRange);
     1526    PIOMMMIOSTATS pStats = iomMMIOGetStats(pVM, GCPhys, pRange);
    15261527    if (!pStats)
    15271528    {
     
    19341935     * Lookup the context range node the page belongs to.
    19351936     */
    1936     PIOMMMIORANGE pRange = iomMMIOGetRange(&pVM->iom.s, GCPhys);
     1937    PIOMMMIORANGE pRange = iomMMIOGetRange(pVM, GCPhys);
    19371938    AssertMsgReturn(pRange,
    19381939                    ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), VERR_IOM_MMIO_RANGE_NOT_FOUND);
     
    19981999#ifdef VBOX_STRICT
    19992000    /* Can't lock IOM here due to potential deadlocks in the VGA device; not safe to access. */
    2000     PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe(&pVM->iom.s, GCPhys);
     2001    PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe(pVM, GCPhys);
    20012002    AssertMsgReturn(pRange,
    20022003            ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), VERR_IOM_MMIO_RANGE_NOT_FOUND);
     
    20512052#ifdef VBOX_STRICT
    20522053    /* Can't lock IOM here due to potential deadlocks in the VGA device; not safe to access. */
    2053     PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe(&pVM->iom.s, GCPhys);
     2054    PIOMMMIORANGE pRange = iomMMIOGetRangeUnsafe(pVM, GCPhys);
    20542055    AssertMsgReturn(pRange,
    20552056            ("Handlers and page tables are out of sync or something! GCPhys=%RGp\n", GCPhys), VERR_IOM_MMIO_RANGE_NOT_FOUND);
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