VirtualBox

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


Ignore:
Timestamp:
May 22, 2012 12:36:00 PM (13 years ago)
Author:
vboxsync
Message:

PGM: I believe trapping all access to shadowed ROM pages is going too far, see PGMROMPROT_IS_ROM and PGMR3PhysRomProtect.

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

Legend:

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

    r41386 r41388  
    9090    PVMCPU          pVCpu = VMMGetCpu(pVM);
    9191    NOREF(uErrorCode); NOREF(pvFault);
     92
     93    Assert(!(uErrorCode & X86_TRAP_PF_RW)); /* This shall not be used for write access! */
    9294
    9395    Assert(iPage < (pRom->cb >> PAGE_SHIFT));
  • trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp

    r41386 r41388  
    31983198                REMR3NotifyPhysRomRegister(pVM, GCPhys, cb, NULL, true /* fShadowed */);
    31993199#endif
    3200                 rc = PGMR3HandlerPhysicalRegister(pVM,
    3201                                                   fFlags & PGMPHYS_ROM_FLAGS_SHADOWED
    3202                                                   ? PGMPHYSHANDLERTYPE_PHYSICAL_ALL
    3203                                                   : PGMPHYSHANDLERTYPE_PHYSICAL_WRITE,
    3204                                                   GCPhys, GCPhysLast,
     3200                rc = PGMR3HandlerPhysicalRegister(pVM, PGMPHYSHANDLERTYPE_PHYSICAL_WRITE, GCPhys, GCPhysLast,
    32053201                                                  pgmR3PhysRomWriteHandler, pRomNew,
    32063202                                                  NULL, "pgmPhysRomWriteHandler", MMHyperCCToR0(pVM, pRomNew),
     
    32093205            else
    32103206            {
    3211                 rc = PGMR3HandlerPhysicalRegister(pVM,
    3212                                                   fFlags & PGMPHYS_ROM_FLAGS_SHADOWED
    3213                                                   ? PGMPHYSHANDLERTYPE_PHYSICAL_ALL
    3214                                                   : PGMPHYSHANDLERTYPE_PHYSICAL_WRITE,
    3215                                                   GCPhys, GCPhysLast,
     3207                rc = PGMR3HandlerPhysicalRegister(pVM, PGMPHYSHANDLERTYPE_PHYSICAL_WRITE, GCPhys, GCPhysLast,
    32163208                                                  pgmR3PhysRomWriteHandler, pRomNew,
    32173209                                                  NULL, "pgmPhysRomWriteHandler", MMHyperCCToR0(pVM, pRomNew),
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