VirtualBox

Changeset 92129 in vbox


Ignore:
Timestamp:
Oct 28, 2021 9:41:23 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147948
Message:

VMM/PGM,NEM: RAM registration notification must return a u2State value too. bugref:10122

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/nem.h

    r91848 r92129  
    6262VMMR3_INT_DECL(void) NEMR3NotifyFF(PVM pVM, PVMCPU pVCpu, uint32_t fFlags);
    6363
    64 VMMR3_INT_DECL(int)  NEMR3NotifyPhysRamRegister(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, void *pvR3);
     64VMMR3_INT_DECL(int)  NEMR3NotifyPhysRamRegister(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, void *pvR3, uint8_t *pu2State);
    6565VMMR3_INT_DECL(int)  NEMR3NotifyPhysMmioExMapEarly(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, uint32_t fFlags,
    6666                                                   void *pvRam, void *pvMmio2, uint8_t *pu2State);
  • trunk/src/VBox/VMM/VMMR3/NEMR3Native-win.cpp

    r92120 r92129  
    19721972
    19731973
    1974 VMMR3_INT_DECL(int) NEMR3NotifyPhysRamRegister(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, void *pvR3)
     1974VMMR3_INT_DECL(int) NEMR3NotifyPhysRamRegister(PVM pVM, RTGCPHYS GCPhys, RTGCPHYS cb, void *pvR3, uint8_t *pu2State)
    19751975{
    19761976    Log5(("NEMR3NotifyPhysRamRegister: %RGp LB %RGp, pvR3=%p\n", GCPhys, cb, pvR3));
     1977    *pu2State = UINT8_MAX;
    19771978#if !defined(NEM_WIN_USE_HYPERCALLS_FOR_PAGES) && defined(VBOX_WITH_PGM_NEM_MODE)
    19781979    if (pvR3)
     
    19811982                                     WHvMapGpaRangeFlagRead | WHvMapGpaRangeFlagWrite | WHvMapGpaRangeFlagExecute);
    19821983        if (SUCCEEDED(hrc))
    1983         { /* likely */ }
     1984            *pu2State = NEM_WIN_PAGE_STATE_WRITABLE;
    19841985        else
    19851986        {
  • trunk/src/VBox/VMM/VMMR3/PGMPhys.cpp

    r92117 r92129  
    17611761    if (VM_IS_NEM_ENABLED(pVM))
    17621762    {
    1763         int rc = NEMR3NotifyPhysRamRegister(pVM, GCPhys, pNew->cb, pNew->pvR3);
    1764         if (RT_FAILURE(rc))
     1763        uint8_t u2State = UINT8_MAX;
     1764        int rc = NEMR3NotifyPhysRamRegister(pVM, GCPhys, pNew->cb, pNew->pvR3, &u2State);
     1765        if (RT_SUCCESS(rc))
     1766        {
     1767            if (u2State != UINT8_MAX)
     1768                pgmPhysSetNemStateForPages(&pNew->aPages[0], cPages, u2State);
     1769        }
     1770        else
    17651771            pgmR3PhysUnlinkRamRange2(pVM, pNew, pPrev);
    17661772        return rc;
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