Changeset 92120 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Oct 28, 2021 12:31:35 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 147939
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/NEMR3.cpp
r91848 r92120 406 406 407 407 408 #ifndef VBOX_WITH_NATIVE_NEM 408 409 VMMR3_INT_DECL(bool) NEMR3CanExecuteGuest(PVM pVM, PVMCPU pVCpu) 409 410 { 410 Assert(VM_IS_NEM_ENABLED(pVM)); 411 #ifdef VBOX_WITH_NATIVE_NEM 412 return nemR3NativeCanExecuteGuest(pVM, pVCpu); 413 #else 414 NOREF(pVM); NOREF(pVCpu); 411 RT_NOREF(pVM, pVCpu); 415 412 return false; 416 #endif 417 } 413 } 414 #endif 418 415 419 416 … … 441 438 442 439 440 #ifndef VBOX_WITH_NATIVE_NEM 443 441 VMMR3_INT_DECL(void) NEMR3NotifySetA20(PVMCPU pVCpu, bool fEnabled) 444 442 { 445 #ifdef VBOX_WITH_NATIVE_NEM 446 if (pVCpu->pVMR3->bMainExecutionEngine == VM_EXEC_ENGINE_NATIVE_API) 447 nemR3NativeNotifySetA20(pVCpu, fEnabled); 448 #else 449 NOREF(pVCpu); NOREF(fEnabled); 450 #endif 451 } 452 443 RT_NOREF(pVCpu, fEnabled); 444 } 445 #endif 446 -
trunk/src/VBox/VMM/VMMR3/NEMR3Native-win.cpp
r91958 r92120 1279 1279 * Some state init. 1280 1280 */ 1281 #ifdef NEM_WIN_WITH_A20 1281 1282 pVM->nem.s.fA20Enabled = true; 1283 #endif 1282 1284 #if 0 1283 1285 for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++) … … 1814 1816 void nemR3NativeReset(PVM pVM) 1815 1817 { 1818 #if 0 1816 1819 /* Unfix the A20 gate. */ 1817 1820 pVM->nem.s.fA20Fixed = false; 1821 #else 1822 RT_NOREF(pVM); 1823 #endif 1818 1824 } 1819 1825 … … 1828 1834 void nemR3NativeResetCpu(PVMCPU pVCpu, bool fInitIpi) 1829 1835 { 1836 #ifdef NEM_WIN_WITH_A20 1830 1837 /* Lock the A20 gate if INIT IPI, make sure it's enabled. */ 1831 1838 if (fInitIpi && pVCpu->idCpu > 0) … … 1837 1844 pVM->nem.s.fA20Fixed = true; 1838 1845 } 1846 #else 1847 RT_NOREF(pVCpu, fInitIpi); 1848 #endif 1839 1849 } 1840 1850 … … 1886 1896 1887 1897 1888 bool nemR3NativeCanExecuteGuest(PVM pVM, PVMCPU pVCpu) 1889 { 1890 NOREF(pVM); NOREF(pVCpu); 1898 VMMR3_INT_DECL(bool) NEMR3CanExecuteGuest(PVM pVM, PVMCPU pVCpu) 1899 { 1900 Assert(VM_IS_NEM_ENABLED(pVM)); 1901 1902 #ifndef NEM_WIN_WITH_A20 1903 /* 1904 * Only execute when the A20 gate is enabled because this lovely Hyper-V 1905 * blackbox does not seem to have any way to enable or disable A20. 1906 */ 1907 RT_NOREF(pVM); 1908 return PGMPhysIsA20Enabled(pVCpu); 1909 #else 1910 RT_NOREF(pVM, pVCpu); 1891 1911 return true; 1912 #endif 1892 1913 } 1893 1914 … … 2023 2044 *pu2State = NEM_WIN_PAGE_STATE_UNMAPPED; 2024 2045 } 2046 RT_NOREF(pvRam); 2025 2047 2026 2048 #else … … 2206 2228 2207 2229 2230 #ifdef NEM_WIN_WITH_A20 2208 2231 /** 2209 2232 * Unmaps a page from Hyper-V for the purpose of emulating A20 gate behavior. … … 2220 2243 nemR3WinUnsetForA20CheckerCallback, NULL); 2221 2244 } 2245 #endif 2222 2246 2223 2247 … … 2232 2256 * @param fEnabled Whether it was enabled (true) or disabled. 2233 2257 */ 2234 void nemR3NativeNotifySetA20(PVMCPU pVCpu, bool fEnabled)2258 VMMR3_INT_DECL(void) NEMR3NotifySetA20(PVMCPU pVCpu, bool fEnabled) 2235 2259 { 2236 2260 Log(("nemR3NativeNotifySetA20: fEnabled=%RTbool\n", fEnabled)); 2261 Assert(VM_IS_NEM_ENABLED(pVCpu->CTX_SUFF(pVM))); 2262 #ifdef NEM_WIN_WITH_A20 2237 2263 PVM pVM = pVCpu->CTX_SUFF(pVM); 2238 2264 if (!pVM->nem.s.fA20Fixed) … … 2242 2268 nemR3WinUnmapPageForA20Gate(pVM, pVCpu, GCPhys); 2243 2269 } 2270 #else 2271 RT_NOREF(pVCpu, fEnabled); 2272 #endif 2244 2273 } 2245 2274 … … 2446 2475 * (e.g. possiblity of two CPUs with different A20 status). 2447 2476 * 2448 * Workaround: Only do A20 on CPU 0, restricting the emulation to HMA. We 2449 * unmap all pages related to HMA (0x100000..0x10ffff) when the A20 state 2450 * changes, lazily syncing the right pages back when accessed. 2477 * Workaround #1 (obsolete): Only do A20 on CPU 0, restricting the emulation 2478 * to HMA. We unmap all pages related to HMA (0x100000..0x10ffff) when the A20 2479 * state changes, lazily syncing the right pages back when accessed. 2480 * 2481 * Workaround #2 (used): Use IEM when the A20 gate is disabled. 2451 2482 * 2452 2483 *
Note:
See TracChangeset
for help on using the changeset viewer.