Changeset 93207 in vbox
- Timestamp:
- Jan 12, 2022 7:14:56 PM (3 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/Makefile.kmk
r93115 r93207 575 575 VMMR0_SOURCES.linux.amd64 += VMMR0/NEMR0Native-stubs.cpp 576 576 577 if 0 577 578 VMMR0_SOURCES.win.amd64 += \ 578 579 VMMR0/NEMR0Native-win.cpp \ … … 580 581 VMMR0_DEFS.win.amd64 += VBOX_WITH_NATIVE_NEM VBOX_WITH_NEM_R0 581 582 VMMR0/NEMR0Native-win.cpp_SDKS.win = ReorderCompilerIncs $(VBOX_WINDDK) $(VBOX_WINPSDK_INCS) 583 else 584 VMMR0_SOURCES.win.amd64 += VMMR0/NEMR0Native-stubs.cpp 585 endif 582 586 583 587 VMMR0_SOURCES.darwin.amd64 += \ -
trunk/src/VBox/VMM/VMMR3/NEMR3.cpp
r93115 r93207 122 122 123 123 #ifdef RT_OS_WINDOWS 124 # ifndef VBOX_WITH_PGM_NEM_MODE 125 124 126 /** @cfgm{/NEM/UseRing0Runloop, bool, true} 125 127 * Whether to use the ring-0 runloop (if enabled in the build) or the ring-3 one. 126 128 * The latter is generally slower. This option serves as a way out in case 127 129 * something breaks in the ring-0 loop. */ 128 # ifdef NEM_WIN_USE_RING0_RUNLOOP_BY_DEFAULT130 # ifdef NEM_WIN_USE_RING0_RUNLOOP_BY_DEFAULT 129 131 bool fUseRing0Runloop = true; 130 # else132 # else 131 133 bool fUseRing0Runloop = false; 132 # endif134 # endif 133 135 rc = CFGMR3QueryBoolDef(pCfgNem, "UseRing0Runloop", &fUseRing0Runloop, fUseRing0Runloop); 134 136 AssertLogRelRCReturn(rc, rc); 135 137 pVM->nem.s.fUseRing0Runloop = fUseRing0Runloop; 138 # endif 136 139 #endif 137 140 -
trunk/src/VBox/VMM/VMMR3/NEMR3Native-win.cpp
r93115 r93207 1329 1329 */ 1330 1330 rc = nemR3WinInitDiscoverIoControlProperties(pVM, pErrInfo); 1331 #ifndef VBOX_WITH_PGM_NEM_MODE 1331 1332 if (rc == VERR_NEM_RING3_ONLY) 1332 1333 { … … 1338 1339 rc = VINF_SUCCESS; 1339 1340 } 1341 #endif 1340 1342 if (RT_SUCCESS(rc)) 1341 1343 { 1344 #ifndef VBOX_WITH_PGM_NEM_MODE 1342 1345 /* 1343 1346 * Check out our ring-0 capabilities. 1344 1347 */ 1345 1348 rc = SUPR3CallVMMR0Ex(VMCC_GET_VMR0_FOR_CALL(pVM), 0 /*idCpu*/, VMMR0_DO_NEM_INIT_VM, 0, NULL); 1349 #endif 1346 1350 if (RT_SUCCESS(rc)) 1347 1351 { … … 1565 1569 hPartitionDevice = NULL; 1566 1570 } 1571 #ifndef VBOX_WITH_PGM_NEM_MODE 1567 1572 if ( hPartitionDevice == NULL 1568 1573 || hPartitionDevice == (HANDLE)(intptr_t)-1) 1569 1574 return VMSetError(pVM, VERR_NEM_VM_CREATE_FAILED, RT_SRC_POS, 1570 1575 "Failed to get device handle for partition %p: %Rhrc", hPartition, hrc); 1576 #endif 1571 1577 1572 1578 /* Test the handle. */ 1573 1579 HV_PARTITION_PROPERTY uValue; 1574 1580 if (!g_pfnVidGetPartitionProperty(hPartitionDevice, HvPartitionPropertyProcessorVendor, &uValue)) 1581 #ifndef VBOX_WITH_PGM_NEM_MODE 1575 1582 return VMSetError(pVM, VERR_NEM_VM_CREATE_FAILED, RT_SRC_POS, 1576 1583 "Failed to get device handle and/or partition ID for %p (hPartitionDevice=%p, Last=%#x/%u)", 1577 1584 hPartition, hPartitionDevice, RTNtLastStatusValue(), RTNtLastErrorValue()); 1585 #else 1586 hPartitionDevice = INVALID_HANDLE_VALUE; 1587 #endif 1578 1588 LogRel(("NEM: HvPartitionPropertyProcessorVendor=%#llx (%lld)\n", uValue, uValue)); 1579 1589 … … 1590 1600 if (!g_pfnVidGetHvPartitionId(hPartitionDevice, &idHvPartition)) 1591 1601 { 1602 #ifndef VBOX_WITH_PGM_NEM_MODE 1592 1603 if (RTNtLastErrorValue() != ERROR_INVALID_FUNCTION) /* Will try get it later in VMMR0_DO_NEM_INIT_VM_PART_2. */ 1593 1604 return VMSetError(pVM, VERR_NEM_VM_CREATE_FAILED, RT_SRC_POS, … … 1595 1606 hPartition, hPartitionDevice, RTNtLastStatusValue(), RTNtLastErrorValue()); 1596 1607 LogRel(("NEM: VidGetHvPartitionId failed with ERROR_NOT_SUPPORTED, will try again later from ring-0...\n")); 1608 #endif 1597 1609 idHvPartition = HV_PARTITION_ID_INVALID; 1598 1610 } … … 1659 1671 * Do some more ring-0 initialization now that we've got the partition handle. 1660 1672 */ 1673 #ifndef VBOX_WITH_PGM_NEM_MODE 1661 1674 int rc = VMMR3CallR0Emt(pVM, pVM->apCpusR3[0], VMMR0_DO_NEM_INIT_VM_PART_2, 0, NULL); 1675 #else 1676 int rc = VINF_SUCCESS; 1677 #endif 1662 1678 if (RT_SUCCESS(rc)) 1663 1679 { … … 1665 1681 hPartitionDevice, pVM->nem.s.idHvPartition)); 1666 1682 1667 #if 11683 #ifndef VBOX_WITH_PGM_NEM_MODE 1668 1684 VMMR3CallR0Emt(pVM, pVM->apCpusR3[0], VMMR0_DO_NEM_UPDATE_STATISTICS, 0, NULL); 1669 1685 LogRel(("NEM: Memory balance: %#RX64 out of %#RX64 pages in use\n", -
trunk/src/VBox/VMM/include/NEMInternal.h
r93115 r93207 223 223 /** WHvRunVpExitReasonException is supported. */ 224 224 bool fExtendedXcptExit : 1; 225 # ifndef VBOX_WITH_PGM_NEM_MODE 225 226 /** Set if we're using the ring-0 API to do the work. */ 226 227 bool fUseRing0Runloop : 1; 228 # endif 227 229 # ifdef NEM_WIN_WITH_A20 228 230 /** Set if we've started more than one CPU and cannot mess with A20. */
Note:
See TracChangeset
for help on using the changeset viewer.