Changeset 100826 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Aug 9, 2023 1:57:40 AM (20 months ago)
- svn:sync-xref-src-repo-rev:
- 158725
- Location:
- trunk/src/VBox/VMM/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMInline.h
r100822 r100826 3445 3445 3446 3446 #define TMPL_MEM_NO_STORE 3447 #define TMPL_MEM_NO_MAPPING 3447 3448 #define TMPL_MEM_TYPE uint64_t 3448 3449 #define TMPL_MEM_TYPE_ALIGN 15 -
trunk/src/VBox/VMM/include/IEMInternal.h
r100822 r100826 1809 1809 /** @} */ 1810 1810 1811 typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINROU8,(uint8_t const *pu8Dst, uint8_t u8Src, uint32_t *pEFlags)); 1812 typedef FNIEMAIMPLBINROU8 *PFNIEMAIMPLBINROU8; 1813 typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINROU16,(uint16_t const *pu16Dst, uint16_t u16Src, uint32_t *pEFlags)); 1814 typedef FNIEMAIMPLBINROU16 *PFNIEMAIMPLBINROU16; 1815 typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINROU32,(uint32_t const *pu32Dst, uint32_t u32Src, uint32_t *pEFlags)); 1816 typedef FNIEMAIMPLBINROU32 *PFNIEMAIMPLBINROU32; 1817 typedef IEM_DECL_IMPL_TYPE(void, FNIEMAIMPLBINROU64,(uint64_t const *pu64Dst, uint64_t u64Src, uint32_t *pEFlags)); 1818 typedef FNIEMAIMPLBINROU64 *PFNIEMAIMPLBINROU64; 1819 1811 1820 /** @name Compare operations (thrown in with the binary ops). 1812 1821 * @{ */ 1813 FNIEMAIMPLBIN U8 iemAImpl_cmp_u8;1822 FNIEMAIMPLBINROU8 iemAImpl_cmp_u8; 1814 1823 FNIEMAIMPLBINU16 iemAImpl_cmp_u16; 1815 1824 FNIEMAIMPLBINU32 iemAImpl_cmp_u32; … … 1819 1828 /** @name Test operations (thrown in with the binary ops). 1820 1829 * @{ */ 1821 FNIEMAIMPLBIN U8 iemAImpl_test_u8;1830 FNIEMAIMPLBINROU8 iemAImpl_test_u8; 1822 1831 FNIEMAIMPLBINU16 iemAImpl_test_u16; 1823 1832 FNIEMAIMPLBINU32 iemAImpl_test_u32; … … 4651 4660 void iemMemStoreDataU256Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTUINT256U pu256Value) IEM_NOEXCEPT_MAY_LONGJMP; 4652 4661 void iemMemStoreDataU256AlignedAvxJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTUINT256U pu256Value) IEM_NOEXCEPT_MAY_LONGJMP; 4662 #endif 4663 4664 #ifdef IEM_WITH_SETJMP 4665 uint8_t *iemMemMapDataU8RwSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4666 uint8_t *iemMemMapDataU8WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4667 uint8_t const *iemMemMapDataU8RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4668 uint16_t *iemMemMapDataU16RwSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4669 uint16_t *iemMemMapDataU16WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4670 uint16_t const *iemMemMapDataU16RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4671 uint32_t *iemMemMapDataU32RwSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4672 uint32_t *iemMemMapDataU32WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4673 uint32_t const *iemMemMapDataU32RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4674 uint64_t *iemMemMapDataU64RwSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4675 uint64_t *iemMemMapDataU64WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4676 uint64_t const *iemMemMapDataU64RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP; 4653 4677 #endif 4654 4678 -
trunk/src/VBox/VMM/include/IEMMc.h
r100820 r100826 1325 1325 * The purpose is to pass it to an operand implementation, thus the a_iArg. 1326 1326 * @remarks May return. 1327 * @deprecated 1327 1328 */ 1328 1329 #define IEM_MC_MEM_MAP(a_pMem, a_fAccess, a_iSeg, a_GCPtrMem, a_iArg) \ … … 1330 1331 (a_GCPtrMem), (a_fAccess), sizeof(*(a_pMem)) - 1)) 1331 1332 1332 /** Flat variant of IEM_MC_MEM_MAP. */ 1333 /** Flat variant of IEM_MC_MEM_MAP. 1334 * @deprecated 1335 */ 1333 1336 #define IEM_MC_MEM_FLAT_MAP(a_pMem, a_fAccess, a_GCPtrMem, a_iArg) \ 1334 1337 IEM_MC_RETURN_ON_FAILURE(iemMemMap(pVCpu, (void **)&(a_pMem), sizeof(*(a_pMem)), UINT8_MAX, \ … … 1338 1341 * The purpose is to pass it to an operand implementation, thus the a_iArg. 1339 1342 * @remarks May return. 1343 * @deprecated 1340 1344 */ 1341 1345 #define IEM_MC_MEM_MAP_EX(a_pvMem, a_fAccess, a_cbMem, a_iSeg, a_GCPtrMem, a_cbAlign, a_iArg) \ … … 1343 1347 (a_GCPtrMem), (a_fAccess), (a_cbAlign))) 1344 1348 1345 /** Flat variant of IEM_MC_MEM_MAP_EX. */ 1349 /** Flat variant of IEM_MC_MEM_MAP_EX. 1350 * @deprecated 1351 */ 1346 1352 #define IEM_MC_MEM_FLAT_MAP_EX(a_pvMem, a_fAccess, a_cbMem, a_GCPtrMem, a_cbAlign, a_iArg) \ 1347 1353 IEM_MC_RETURN_ON_FAILURE(iemMemMap(pVCpu, (void **)&(a_pvMem), (a_cbMem), UINT8_MAX, \ … … 1350 1356 /** Commits the memory and unmaps the guest memory. 1351 1357 * @remarks May return. 1358 * @deprecated 1352 1359 */ 1353 1360 #define IEM_MC_MEM_COMMIT_AND_UNMAP(a_pvMem, a_fAccess) \ 1354 1361 IEM_MC_RETURN_ON_FAILURE(iemMemCommitAndUnmap(pVCpu, (a_pvMem), (a_fAccess))) 1362 1363 1364 /** 1365 * Maps guest memory for byte read+write direct (or bounce) buffer acccess. 1366 * 1367 * @param[out] a_pu8Mem Where to return the pointer to the mapping. 1368 * @param[out] a_bUnmapInfo Where to return umapping instructions. uint8_t. 1369 * @param[in] a_iSeg The segment register to access via. No UINT8_MAX! 1370 * @param[in] a_GCPtrMem The memory address. 1371 * @remarks Will return/long jump on errors. 1372 * @see IEM_MC_MEM_COMMIT_AND_UNMAP_RW 1373 */ 1374 #ifndef IEM_WITH_SETJMP 1375 # define IEM_MC_MEM_MAP_U8_RW(a_pu8Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) do { \ 1376 IEM_MC_RETURN_ON_FAILURE(iemMemMap(pVCpu, (void **)&(a_pu8Mem), sizeof(uint8_t), (a_iSeg), \ 1377 (a_GCPtrMem), IEM_ACCESS_DATA_RW, 0)); \ 1378 a_bUnmapInfo = 1 | ((IEM_ACCESS_TYPE_READ | IEM_ACCESS_TYPE_WRITE) << 4); \ 1379 } while (0) 1380 #else 1381 # define IEM_MC_MEM_MAP_U8_RW(a_pu8Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) \ 1382 (a_pu8Mem) = iemMemMapDataU8RwJmp(pVCpu, &(a_bUnmapInfo), (a_iSeg), (a_GCPtrMem)) 1383 #endif 1384 1385 /** 1386 * Maps guest memory for byte writeonly direct (or bounce) buffer acccess. 1387 * 1388 * @param[out] a_pu8Mem Where to return the pointer to the mapping. 1389 * @param[out] a_bUnmapInfo Where to return umapping instructions. uint8_t. 1390 * @param[in] a_iSeg The segment register to access via. No UINT8_MAX! 1391 * @param[in] a_GCPtrMem The memory address. 1392 * @remarks Will return/long jump on errors. 1393 * @see IEM_MC_MEM_COMMIT_AND_UNMAP_WO 1394 */ 1395 #ifndef IEM_WITH_SETJMP 1396 # define IEM_MC_MEM_MAP_U8_WO(a_pu8Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) do { \ 1397 IEM_MC_RETURN_ON_FAILURE(iemMemMap(pVCpu, (void **)&(a_pu8Mem), sizeof(uint8_t), (a_iSeg), \ 1398 (a_GCPtrMem), IEM_ACCESS_DATA_W, 0)); \ 1399 a_bUnmapInfo = 1 | (IEM_ACCESS_TYPE_WRITE << 4); \ 1400 } while (0) 1401 #else 1402 # define IEM_MC_MEM_MAP_U8_WO(a_pu8Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) \ 1403 (a_pu8Mem) = iemMemMapDataU8WoJmp(pVCpu, &(a_bUnmapInfo), (a_iSeg), (a_GCPtrMem)) 1404 #endif 1405 1406 /** 1407 * Maps guest memory for byte readonly direct (or bounce) buffer acccess. 1408 * 1409 * @param[out] a_pu8Mem Where to return the pointer to the mapping. 1410 * @param[out] a_bUnmapInfo Where to return umapping instructions. uint8_t. 1411 * @param[in] a_iSeg The segment register to access via. No UINT8_MAX! 1412 * @param[in] a_GCPtrMem The memory address. 1413 * @remarks Will return/long jump on errors. 1414 * @see IEM_MC_MEM_COMMIT_AND_UNMAP_RO 1415 */ 1416 #ifndef IEM_WITH_SETJMP 1417 # define IEM_MC_MEM_MAP_U8_RO(a_pu8Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) do { \ 1418 IEM_MC_RETURN_ON_FAILURE(iemMemMap(pVCpu, (void **)&(a_pu8Mem), sizeof(uint8_t), (a_iSeg), \ 1419 (a_GCPtrMem), IEM_ACCESS_DATA_R, 0)); \ 1420 a_bUnmapInfo = 1 | (IEM_ACCESS_TYPE_READ << 4); \ 1421 } while (0) 1422 #else 1423 # define IEM_MC_MEM_MAP_U8_RO(a_pu8Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) \ 1424 (a_pu8Mem) = iemMemMapDataU8RoJmp(pVCpu, &(a_bUnmapInfo), (a_iSeg), (a_GCPtrMem)) 1425 #endif 1426 1427 /** 1428 * Maps guest memory for byte read+write direct (or bounce) buffer acccess, flat 1429 * address variant. 1430 * 1431 * @param[out] a_pu8Mem Where to return the pointer to the mapping. 1432 * @param[out] a_bUnmapInfo Where to return umapping instructions. uint8_t. 1433 * @param[in] a_GCPtrMem The memory address. 1434 * @remarks Will return/long jump on errors. 1435 * @see IEM_MC_MEM_COMMIT_AND_UNMAP_RW 1436 */ 1437 #ifndef IEM_WITH_SETJMP 1438 # define IEM_MC_MEM_FLAT_MAP_U8_RW(a_pu8Mem, a_bUnmapInfo, a_GCPtrMem) do { \ 1439 IEM_MC_RETURN_ON_FAILURE(iemMemMap(pVCpu, (void **)&(a_pu8Mem), sizeof(uint8_t), UINT8_MAX, \ 1440 (a_GCPtrMem), IEM_ACCESS_DATA_RW, 0)); \ 1441 a_bUnmapInfo = 1 | ((IEM_ACCESS_TYPE_READ | IEM_ACCESS_TYPE_WRITE) << 4); \ 1442 } while (0) 1443 #else 1444 # define IEM_MC_MEM_FLAT_MAP_U8_RW(a_pu8Mem, a_bUnmapInfo, a_GCPtrMem) \ 1445 (a_pu8Mem) = iemMemFlatMapDataU8RwJmp(pVCpu, &(a_bUnmapInfo), (a_GCPtrMem)) 1446 #endif 1447 1448 /** 1449 * Maps guest memory for byte writeonly direct (or bounce) buffer acccess, flat 1450 * address variant. 1451 * 1452 * @param[out] a_pu8Mem Where to return the pointer to the mapping. 1453 * @param[out] a_bUnmapInfo Where to return umapping instructions. uint8_t. 1454 * @param[in] a_GCPtrMem The memory address. 1455 * @remarks Will return/long jump on errors. 1456 * @see IEM_MC_MEM_COMMIT_AND_UNMAP_WO 1457 */ 1458 #ifndef IEM_WITH_SETJMP 1459 # define IEM_MC_MEM_FLAT_MAP_U8_WO(a_pu8Mem, a_bUnmapInfo, a_GCPtrMem) do { \ 1460 IEM_MC_RETURN_ON_FAILURE(iemMemMap(pVCpu, (void **)&(a_pu8Mem), sizeof(uint8_t), UINT8_MAX, \ 1461 (a_GCPtrMem), IEM_ACCESS_DATA_W, 0)); \ 1462 a_bUnmapInfo = 1 | (IEM_ACCESS_TYPE_WRITE << 4); \ 1463 } while (0) 1464 #else 1465 # define IEM_MC_MEM_FLAT_MAP_U8_WO(a_pu8Mem, a_bUnmapInfo, a_GCPtrMem) \ 1466 (a_pu8Mem) = iemMemFlatMapDataU8WoJmp(pVCpu, &(a_bUnmapInfo), (a_GCPtrMem)) 1467 #endif 1468 1469 /** 1470 * Maps guest memory for byte readonly direct (or bounce) buffer acccess, flat 1471 * address variant. 1472 * 1473 * @param[out] a_pu8Mem Where to return the pointer to the mapping. 1474 * @param[out] a_bUnmapInfo Where to return umapping instructions. uint8_t. 1475 * @param[in] a_GCPtrMem The memory address. 1476 * @remarks Will return/long jump on errors. 1477 * @see IEM_MC_MEM_COMMIT_AND_UNMAP_RO 1478 */ 1479 #ifndef IEM_WITH_SETJMP 1480 # define IEM_MC_MEM_FLAT_MAP_U8_RO(a_pu8Mem, a_bUnmapInfo, a_GCPtrMem) do { \ 1481 IEM_MC_RETURN_ON_FAILURE(iemMemMap(pVCpu, (void **)&(a_pu8Mem), sizeof(uint8_t), UINT8_MAX, \ 1482 (a_GCPtrMem), IEM_ACCESS_DATA_R, 0)); \ 1483 a_bUnmapInfo = 1 | (IEM_ACCESS_TYPE_READ << 4); \ 1484 } while (0) 1485 #else 1486 # define IEM_MC_MEM_FLAT_MAP_U8_RO(a_pu8Mem, a_bUnmapInfo, a_GCPtrMem) \ 1487 (a_pu8Mem) = iemMemFlatMapDataU8RoJmp(pVCpu, &(a_bUnmapInfo), (a_GCPtrMem)) 1488 #endif 1489 1490 1491 /** Commits the memory and unmaps guest memory previously mapped RW. 1492 * @remarks May return. 1493 */ 1494 #define IEM_MC_MEM_COMMIT_AND_UNMAP_RW(a_pvMem, a_bMapInfo) do { \ 1495 RT_NOREF_PV(a_bMapInfo); Assert(a_bMapInfo == (1 | ((IEM_ACCESS_TYPE_READ | IEM_ACCESS_TYPE_WRITE) << 4)) ); \ 1496 IEM_MC_RETURN_ON_FAILURE(iemMemCommitAndUnmap(pVCpu, (a_pvMem), IEM_ACCESS_DATA_RW)); \ 1497 } while (0) 1498 1499 /** Commits the memory and unmaps guest memory previously mapped W. 1500 * @remarks May return. 1501 */ 1502 #define IEM_MC_MEM_COMMIT_AND_UNMAP_WO(a_pvMem, a_bMapInfo) do { \ 1503 RT_NOREF_PV(a_bMapInfo); Assert(a_bMapInfo == (1 | (IEM_ACCESS_TYPE_WRITE << 4)) ); \ 1504 IEM_MC_RETURN_ON_FAILURE(iemMemCommitAndUnmap(pVCpu, (a_pvMem), IEM_ACCESS_DATA_W)); \ 1505 } while (0) 1506 1507 /** Commits the memory and unmaps guest memory previously mapped R. 1508 * @remarks May return. 1509 */ 1510 #define IEM_MC_MEM_COMMIT_AND_UNMAP_RO(a_pvMem, a_bMapInfo) do { \ 1511 RT_NOREF_PV(a_bMapInfo); Assert(a_bMapInfo == (1 | (IEM_ACCESS_TYPE_READ << 4)) ); \ 1512 IEM_MC_RETURN_ON_FAILURE(iemMemCommitAndUnmap(pVCpu, (void *)(a_pvMem), IEM_ACCESS_DATA_R)); \ 1513 } while (0) 1514 1355 1515 1356 1516 /** Commits the memory and unmaps the guest memory unless the FPU status word … … 1370 1530 IEM_MC_RETURN_ON_FAILURE(iemMemCommitAndUnmap(pVCpu, (a_pvMem), (a_fAccess))); \ 1371 1531 } while (0) 1532 1533 1372 1534 1373 1535 /** Calculate efficient address from R/M. */
Note:
See TracChangeset
for help on using the changeset viewer.