VirtualBox

Changeset 20567 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Jun 14, 2009 8:31:54 PM (16 years ago)
Author:
vboxsync
Message:

DevATA,ATAController: Do not use MMGCRamReadNoTrapHandler nor MMGCRamWriteNoTrapHandler like that, they may both raise guru meditations. Changed the code to use the same PGMPhys*Read/Write APIs as in ring-3.

Location:
trunk/src/VBox
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/DevATA.cpp

    r20374 r20567  
    54005400}
    54015401
    5402 #ifndef IN_RING0
     5402#ifndef IN_RING0 /** @todo do this in ring-0 as well. */
    54035403/**
    54045404 * Port I/O Handler for primary port range IN string operations.
     
    54355435        cbTransfer = cTransAvailable * cb;
    54365436
    5437 #ifdef IN_RC
    5438         for (uint32_t i = 0; i < cbTransfer; i += cb)
    5439             MMGCRamWriteNoTrapHandler((char *)GCDst + i, s->CTX_SUFF(pbIOBuffer) + s->iIOBufferPIODataStart + i, cb);
    5440 #else /* !IN_RC */
    54415437        rc = PGMPhysSimpleDirtyWriteGCPtr(PDMDevHlpGetVMCPU(pDevIns), GCDst, s->CTX_SUFF(pbIOBuffer) + s->iIOBufferPIODataStart, cbTransfer);
    54425438        Assert(rc == VINF_SUCCESS);
    5443 #endif /* IN_RC */
    54445439
    54455440        if (cbTransfer)
     
    54925487        cbTransfer = cTransAvailable * cb;
    54935488
    5494 #ifdef IN_RC
    5495         for (uint32_t i = 0; i < cbTransfer; i += cb)
    5496             MMGCRamReadNoTrapHandler(s->CTX_SUFF(pbIOBuffer) + s->iIOBufferPIODataStart + i, (char *)GCSrc + i, cb);
    5497 #else /* !IN_RC */
    54985489        rc = PGMPhysSimpleReadGCPtr(PDMDevHlpGetVMCPU(pDevIns), s->CTX_SUFF(pbIOBuffer) + s->iIOBufferPIODataStart, GCSrc, cbTransfer);
    54995490        Assert(rc == VINF_SUCCESS);
    5500 #endif /* IN_RC */
    55015491
    55025492        if (cbTransfer)
  • trunk/src/VBox/VMM/PGMInternal.h

    r20530 r20567  
    449449        /** The HC virtual address of the two PAE page table. (i.e 1024 entries instead of 512) */
    450450        R3PTRTYPE(PX86PTPAE)            paPaePTsR3;
    451         /** The GC virtual address of the 32-bit page table. */
     451        /** The RC virtual address of the 32-bit page table. */
    452452        RCPTRTYPE(PX86PT)               pPTRC;
    453         /** The GC virtual address of the two PAE page table. */
     453        /** The RC virtual address of the two PAE page table. */
    454454        RCPTRTYPE(PX86PTPAE)            paPaePTsRC;
    455         /** The GC virtual address of the 32-bit page table. */
     455        /** The R0 virtual address of the 32-bit page table. */
    456456        R0PTRTYPE(PX86PT)               pPTR0;
    457         /** The GC virtual address of the two PAE page table. */
     457        /** The R0 virtual address of the two PAE page table. */
    458458        R0PTRTYPE(PX86PTPAE)            paPaePTsR0;
    459459    } aPTs[1];
     
    484484    /** User argument for R0 handlers. */
    485485    R0PTRTYPE(void *)                   pvUserR0;
    486     /** Pointer to GC callback function. */
     486    /** Pointer to RC callback function. */
    487487    RCPTRTYPE(PFNPGMRCPHYSHANDLER)      pfnHandlerRC;
    488488    /** User argument for RC handlers. */
  • trunk/src/VBox/VMM/VMMAll/PGMAll.cpp

    r20151 r20567  
    22312231                return VINF_SUCCESS;
    22322232            }
    2233             else
    2234                 LogFlow(("Out of sync entry %d\n", iPage));
     2233            LogFlow(("Out of sync entry %d\n", iPage));
    22352234        }
    22362235    }
     
    22422241     * Update the page tables.
    22432242     */
    2244     register unsigned iPage = pVM->pgm.s.iDynPageMapLast;
     2243    unsigned iPage = pVM->pgm.s.iDynPageMapLast;
    22452244    unsigned i;
    2246     for (i=0;i<(MM_HYPER_DYNAMIC_SIZE >> PAGE_SHIFT);i++)
     2245    for (i = 0; i < (MM_HYPER_DYNAMIC_SIZE >> PAGE_SHIFT); i++)
    22472246    {
    22482247        pVM->pgm.s.iDynPageMapLast = iPage = (iPage + 1) & ((MM_HYPER_DYNAMIC_SIZE >> PAGE_SHIFT) - 1);
  • trunk/src/VBox/VMM/VMMAll/PGMAllPhys.cpp

    r20530 r20567  
    21462146}
    21472147
    2148 #ifndef IN_RC /* Ring 0 & 3 only. (Just not needed in GC.) */
    21492148
    21502149/**
     
    26182617}
    26192618
    2620 #endif /* !IN_RC */
    26212619
    26222620/**
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