Changeset 100847 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Aug 9, 2023 11:27:22 PM (18 months ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAll.cpp
r100820 r100847 6841 6841 } 6842 6842 6843 6844 /** Fallback for iemMemCommitAndUnmapRwJmp. */ 6845 void iemMemCommitAndUnmapRwSafeJmp(PVMCPUCC pVCpu, void *pvMem, uint8_t bMapInfo) IEM_NOEXCEPT_MAY_LONGJMP 6846 { 6847 Assert(bMapInfo == (1 | ((IEM_ACCESS_TYPE_READ | IEM_ACCESS_TYPE_WRITE) << 4)) ); RT_NOREF_PV(bMapInfo); 6848 iemMemCommitAndUnmapJmp(pVCpu, pvMem, IEM_ACCESS_DATA_RW); 6849 } 6850 6851 6852 /** Fallback for iemMemCommitAndUnmapWoJmp. */ 6853 void iemMemCommitAndUnmapWoSafeJmp(PVMCPUCC pVCpu, void *pvMem, uint8_t bMapInfo) IEM_NOEXCEPT_MAY_LONGJMP 6854 { 6855 Assert(bMapInfo == (1 | (IEM_ACCESS_TYPE_WRITE << 4)) ); RT_NOREF_PV(bMapInfo); 6856 iemMemCommitAndUnmapJmp(pVCpu, pvMem, IEM_ACCESS_DATA_W); 6857 } 6858 6859 6860 /** Fallback for iemMemCommitAndUnmapRoJmp. */ 6861 void iemMemCommitAndUnmapRoSafeJmp(PVMCPUCC pVCpu, const void *pvMem, uint8_t bMapInfo) IEM_NOEXCEPT_MAY_LONGJMP 6862 { 6863 Assert(bMapInfo == (1 | (IEM_ACCESS_TYPE_READ << 4)) ); RT_NOREF_PV(bMapInfo); 6864 iemMemCommitAndUnmapJmp(pVCpu, (void *)pvMem, IEM_ACCESS_DATA_R); 6865 } 6866 6843 6867 #endif /* IEM_WITH_SETJMP */ 6844 6868 -
trunk/src/VBox/VMM/include/IEMInline.h
r100830 r100847 3412 3412 } 3413 3413 3414 3415 /* 3416 * Unmap helpers. 3417 */ 3418 3419 #ifdef IEM_WITH_SETJMP 3420 3421 DECL_INLINE_THROW(void) iemMemCommitAndUnmapRwJmp(PVMCPUCC pVCpu, void *pvMem, uint8_t bMapInfo) IEM_NOEXCEPT_MAY_LONGJMP 3422 { 3423 iemMemCommitAndUnmapRwSafeJmp(pVCpu, pvMem, bMapInfo); 3424 } 3425 3426 3427 DECL_INLINE_THROW(void) iemMemCommitAndUnmapWoJmp(PVMCPUCC pVCpu, void *pvMem, uint8_t bMapInfo) IEM_NOEXCEPT_MAY_LONGJMP 3428 { 3429 iemMemCommitAndUnmapWoSafeJmp(pVCpu, pvMem, bMapInfo); 3430 } 3431 3432 3433 DECL_INLINE_THROW(void) iemMemCommitAndUnmapRoJmp(PVMCPUCC pVCpu, const void *pvMem, uint8_t bMapInfo) IEM_NOEXCEPT_MAY_LONGJMP 3434 { 3435 iemMemCommitAndUnmapRoSafeJmp(pVCpu, pvMem, bMapInfo); 3436 } 3437 3438 #endif /* IEM_WITH_SETJMP */ 3439 3440 3414 3441 /* 3415 3442 * Instantiate R/W inline templates. -
trunk/src/VBox/VMM/include/IEMInternal.h
r100840 r100847 4675 4675 uint64_t *iemMemMapDataU64WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4676 4676 uint64_t const *iemMemMapDataU64RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4677 4678 void iemMemCommitAndUnmapRwSafeJmp(PVMCPUCC pVCpu, void *pvMem, uint8_t bMapInfo) IEM_NOEXCEPT_MAY_LONGJMP; 4679 void iemMemCommitAndUnmapWoSafeJmp(PVMCPUCC pVCpu, void *pvMem, uint8_t bMapInfo) IEM_NOEXCEPT_MAY_LONGJMP; 4680 void iemMemCommitAndUnmapRoSafeJmp(PVMCPUCC pVCpu, const void *pvMem, uint8_t bMapInfo) IEM_NOEXCEPT_MAY_LONGJMP; 4677 4681 #endif 4678 4682 -
trunk/src/VBox/VMM/include/IEMMc.h
r100840 r100847 48 48 { \ 49 49 VBOXSTRICTRC rcStrict2 = a_Expr; \ 50 if (rcStrict2 != VINF_SUCCESS) \ 50 if (rcStrict2 == VINF_SUCCESS) \ 51 { /* likely */ } \ 52 else \ 51 53 return rcStrict2; \ 52 54 } while (0) … … 1887 1889 * @remarks May return. 1888 1890 */ 1889 #define IEM_MC_MEM_COMMIT_AND_UNMAP_RW(a_pvMem, a_bMapInfo) do { \ 1891 #ifndef IEM_WITH_SETJMP 1892 # define IEM_MC_MEM_COMMIT_AND_UNMAP_RW(a_pvMem, a_bMapInfo) do { \ 1890 1893 RT_NOREF_PV(a_bMapInfo); Assert(a_bMapInfo == (1 | ((IEM_ACCESS_TYPE_READ | IEM_ACCESS_TYPE_WRITE) << 4)) ); \ 1891 1894 IEM_MC_RETURN_ON_FAILURE(iemMemCommitAndUnmap(pVCpu, (a_pvMem), IEM_ACCESS_DATA_RW)); \ 1892 1895 } while (0) 1896 #else 1897 # define IEM_MC_MEM_COMMIT_AND_UNMAP_RW(a_pvMem, a_bMapInfo) \ 1898 iemMemCommitAndUnmapRwJmp(pVCpu, (a_pvMem), (a_bMapInfo)) 1899 #endif 1893 1900 1894 1901 /** Commits the memory and unmaps guest memory previously mapped W. 1895 1902 * @remarks May return. 1896 1903 */ 1897 #define IEM_MC_MEM_COMMIT_AND_UNMAP_WO(a_pvMem, a_bMapInfo) do { \ 1904 #ifndef IEM_WITH_SETJMP 1905 # define IEM_MC_MEM_COMMIT_AND_UNMAP_WO(a_pvMem, a_bMapInfo) do { \ 1898 1906 RT_NOREF_PV(a_bMapInfo); Assert(a_bMapInfo == (1 | (IEM_ACCESS_TYPE_WRITE << 4)) ); \ 1899 1907 IEM_MC_RETURN_ON_FAILURE(iemMemCommitAndUnmap(pVCpu, (a_pvMem), IEM_ACCESS_DATA_W)); \ 1900 1908 } while (0) 1909 #else 1910 # define IEM_MC_MEM_COMMIT_AND_UNMAP_WO(a_pvMem, a_bMapInfo) \ 1911 iemMemCommitAndUnmapWoJmp(pVCpu, (a_pvMem), (a_bMapInfo)) 1912 #endif 1901 1913 1902 1914 /** Commits the memory and unmaps guest memory previously mapped R. 1903 1915 * @remarks May return. 1904 1916 */ 1905 #define IEM_MC_MEM_COMMIT_AND_UNMAP_RO(a_pvMem, a_bMapInfo) do { \ 1917 #ifndef IEM_WITH_SETJMP 1918 # define IEM_MC_MEM_COMMIT_AND_UNMAP_RO(a_pvMem, a_bMapInfo) do { \ 1906 1919 RT_NOREF_PV(a_bMapInfo); Assert(a_bMapInfo == (1 | (IEM_ACCESS_TYPE_READ << 4)) ); \ 1907 1920 IEM_MC_RETURN_ON_FAILURE(iemMemCommitAndUnmap(pVCpu, (void *)(a_pvMem), IEM_ACCESS_DATA_R)); \ 1908 1921 } while (0) 1922 #else 1923 # define IEM_MC_MEM_COMMIT_AND_UNMAP_RO(a_pvMem, a_bMapInfo) \ 1924 iemMemCommitAndUnmapRoJmp(pVCpu, (a_pvMem), (a_bMapInfo)) 1925 #endif 1909 1926 1910 1927
Note:
See TracChangeset
for help on using the changeset viewer.