Changeset 92409 in vbox
- Timestamp:
- Nov 12, 2021 10:17:42 PM (3 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
include/VBox/vmm/pgm.h (modified) (1 diff)
-
src/VBox/VMM/VMMR3/PDMDevice.cpp (modified) (2 diffs)
-
src/VBox/VMM/VMMR3/PGM.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/pgm.h
r92368 r92409 695 695 */ 696 696 VMMR3_INT_DECL(void) PGMR3EnableNemMode(PVM pVM); 697 VMMR3_INT_DECL(bool) PGMR3IsNemModeEnabled(PVM pVM); 697 698 VMMR3DECL(int) PGMR3Init(PVM pVM); 698 699 VMMR3DECL(int) PGMR3InitFinalize(PVM pVM); -
trunk/src/VBox/VMM/VMMR3/PDMDevice.cpp
r91895 r92409 278 278 bool fR0Enabled = false; 279 279 bool fRCEnabled = false; 280 if (pReg->fFlags & (PDM_DEVREG_FLAGS_R0 | PDM_DEVREG_FLAGS_RC)) 280 if ( (pReg->fFlags & (PDM_DEVREG_FLAGS_R0 | PDM_DEVREG_FLAGS_RC)) 281 && !PGMR3IsNemModeEnabled(pVM) /* No ring-0 in simplified memory mode. */ ) 281 282 { 282 283 if (pReg->fFlags & PDM_DEVREG_FLAGS_R0) … … 414 415 VERR_ALLOCATION_TOO_BIG); 415 416 417 #if 0 /* Several devices demands cacheline aligned data, if not page aligned. Real problem in NEM mode. */ 416 418 rc = MMR3HeapAllocZEx(pVM, MM_TAG_PDM_DEVICE, cb, (void **)&pDevIns); 417 419 AssertLogRelMsgRCReturn(rc, ("Failed to allocate %zu bytes of instance data for device '%s'. rc=%Rrc\n", 418 420 cb, pReg->szName, rc), rc); 421 #else 422 pDevIns = (PPDMDEVINS)RTMemPageAllocZ(cb); 423 AssertLogRelMsgReturn(pDevIns, ("Failed to allocate %zu bytes of instance data for device '%s'\n", cb, pReg->szName), 424 VERR_NO_PAGE_MEMORY); 425 #endif 419 426 420 427 /* Initialize it: */ -
trunk/src/VBox/VMM/VMMR3/PGM.cpp
r92385 r92409 712 712 #endif 713 713 714 715 714 #ifdef VBOX_WITH_PGM_NEM_MODE 715 716 716 /** 717 717 * Interface that NEM uses to switch PGM into simplified memory managment mode. … … 726 726 pVM->pgm.s.fNemMode = true; 727 727 } 728 #endif 729 728 729 730 /** 731 * Checks whether the simplificed memory management mode for NEM is enabled. 732 * 733 * @returns true if enabled, false if not. 734 * @param pVM The cross context VM structure. 735 */ 736 VMMR3_INT_DECL(bool) PGMR3IsNemModeEnabled(PVM pVM) 737 { 738 return pVM->pgm.s.fNemMode; 739 } 740 741 #endif /* VBOX_WITH_PGM_NEM_MODE */ 730 742 731 743 /**
Note:
See TracChangeset
for help on using the changeset viewer.

