VirtualBox

Changeset 61371 in vbox for trunk/src/VBox/VMM


Ignore:
Timestamp:
Jun 1, 2016 12:58:24 PM (9 years ago)
Author:
vboxsync
Message:

iomMmioHandler: Gracefully deal with large MMIO writes and read (FXSAVE and such) in ring-0 and raw-mode by deflecting them to ring-3. These things shouldn't normally happen.

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

Legend:

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

    r60874 r61371  
    754754    STAM_COUNTER_INC(&pVM->iom.s.StatR3MMIOHandler);
    755755
    756     AssertMsg(cbBuf >= 1 && cbBuf <= 16, ("%zu\n", cbBuf));
     756    NOREF(pvPhys); NOREF(enmOrigin);
    757757    AssertPtr(pRange);
    758     NOREF(pvPhys); NOREF(enmOrigin);
     758    AssertMsg(cbBuf >= 1, ("%zu\n", cbBuf));
     759
     760
     761#ifndef IN_RING3
     762    /*
     763     * If someone is doing FXSAVE, FXRSTOR, XSAVE, XRSTOR or other stuff dealing with
     764     * large amounts of data, just go to ring-3 where we don't need to deal with partial
     765     * successes.  No chance any of these will be problematic read-modify-write stuff.
     766     */
     767    if (cbBuf > sizeof(pVCpu->iom.s.PendingMmioWrite.abValue))
     768        return enmAccessType == PGMACCESSTYPE_WRITE ? VINF_IOM_R3_MMIO_WRITE : VINF_IOM_R3_MMIO_READ;
     769#endif
    759770
    760771    /*
  • trunk/src/VBox/VMM/include/IOMInternal.h

    r60874 r61371  
    418418        RTGCPHYS                        GCPhys;
    419419        /** The value to write. */
    420         uint8_t                         abValue[24];
     420        uint8_t                         abValue[128];
    421421        /** The number of bytes to write (0 if nothing pending). */
    422422        uint32_t                        cbValue;
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