Changeset 14799 in vbox for trunk/include
- Timestamp:
- Nov 28, 2008 11:59:56 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/hwacc_vmx.h
r14650 r14799 1203 1203 * @param pVMXOn Physical address of VMXON structure 1204 1204 */ 1205 #if RT_INLINE_ASM_EXTERNAL || HC_ARCH_BITS == 64 1205 #if RT_INLINE_ASM_EXTERNAL || HC_ARCH_BITS == 64 || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 1206 1206 DECLASM(int) VMXEnable(RTHCPHYS pVMXOn); 1207 1207 #else … … 1257 1257 * Executes VMXOFF 1258 1258 */ 1259 #if RT_INLINE_ASM_EXTERNAL || HC_ARCH_BITS == 64 1259 #if RT_INLINE_ASM_EXTERNAL || HC_ARCH_BITS == 64 || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 1260 1260 DECLASM(void) VMXDisable(void); 1261 1261 #else … … 1284 1284 * @param pVMCS Physical address of VM control structure 1285 1285 */ 1286 #if RT_INLINE_ASM_EXTERNAL || HC_ARCH_BITS == 64 1286 #if RT_INLINE_ASM_EXTERNAL || HC_ARCH_BITS == 64 || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 1287 1287 DECLASM(int) VMXClearVMCS(RTHCPHYS pVMCS); 1288 1288 #else … … 1332 1332 * @param pVMCS Physical address of VMCS structure 1333 1333 */ 1334 #if RT_INLINE_ASM_EXTERNAL || HC_ARCH_BITS == 64 1334 #if RT_INLINE_ASM_EXTERNAL || HC_ARCH_BITS == 64 || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 1335 1335 DECLASM(int) VMXActivateVMCS(RTHCPHYS pVMCS); 1336 1336 #else … … 1387 1387 * @param u32Val 32 bits value 1388 1388 */ 1389 #if RT_INLINE_ASM_EXTERNAL || HC_ARCH_BITS == 64 1389 #if RT_INLINE_ASM_EXTERNAL || HC_ARCH_BITS == 64 || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 1390 1390 DECLASM(int) VMXWriteVMCS32(uint32_t idxField, uint32_t u32Val); 1391 1391 #else … … 1432 1432 #endif 1433 1433 1434 /** 1435 * Executes VMWRITE 1436 * 1437 * @returns VBox status code 1438 * @param idxField VMCS index 1439 * @param u64Val 16, 32 or 64 bits value 1440 */ 1441 #if HC_ARCH_BITS == 64 1442 DECLASM(int) VMXWriteVMCS64(uint32_t idxField, uint64_t u64Val); 1443 #else 1444 DECLINLINE(int) VMXWriteVMCS64(uint32_t idxField, uint64_t u64Val) 1445 { 1446 int rc; 1447 1448 rc = VMXWriteVMCS32(idxField, u64Val); 1449 rc |= VMXWriteVMCS32(idxField + 1, (uint32_t)(u64Val >> 32ULL)); 1450 AssertRC(rc); 1451 return rc; 1452 } 1453 #endif 1434 /** 1435 * Executes VMWRITE 1436 * 1437 * @returns VBox status code 1438 * @param idxField VMCS index 1439 * @param u64Val 16, 32 or 64 bits value 1440 */ 1441 #if HC_ARCH_BITS == 64 || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 1442 DECLASM(int) VMXWriteVMCS64(uint32_t idxField, uint64_t u64Val); 1443 #else 1444 DECLINLINE(int) VMXWriteVMCS64(uint32_t idxField, uint64_t u64Val) 1445 { 1446 int rc; 1447 1448 rc = VMXWriteVMCS32(idxField, u64Val); 1449 rc |= VMXWriteVMCS32(idxField + 1, (uint32_t)(u64Val >> 32ULL)); 1450 AssertRC(rc); 1451 return rc; 1452 } 1453 #endif 1454 1454 1455 1455 #if HC_ARCH_BITS == 64 … … 1483 1483 * @param pData Ptr to store VM field value 1484 1484 */ 1485 #if RT_INLINE_ASM_EXTERNAL || HC_ARCH_BITS == 64 1485 #if RT_INLINE_ASM_EXTERNAL || HC_ARCH_BITS == 64 || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 1486 1486 DECLASM(int) VMXReadVMCS32(uint32_t idxField, uint32_t *pData); 1487 1487 #else … … 1531 1531 #endif 1532 1532 1533 #if HC_ARCH_BITS == 64 1534 /** 1535 * Executes VMREAD1536 * 1537 * @ returns VBox status code1538 * @param idxField VMCS index1539 * @param pData Ptr to store VM field value1540 */ 1541 DECLASM(int) VMXReadVMCS64(uint32_t idxField, uint64_t *pData); 1542 #else 1543 DECLINLINE(int) VMXReadVMCS64(uint32_t idxField, uint64_t *pData) 1544 { 1545 int rc; 1546 1547 uint32_t val_hi, val; 1548 rc = VMXReadVMCS32(idxField, &val); 1549 rc |= VMXReadVMCS32(idxField + 1, &val_hi); 1550 AssertRC(rc); 1551 *pData = RT_MAKE_U64(val, val_hi); 1552 return rc; 1553 } 1554 #endif 1533 /** 1534 * Executes VMREAD 1535 * 1536 * @returns VBox status code 1537 * @param idxField VMCS index 1538 * @param pData Ptr to store VM field value 1539 */ 1540 #if HC_ARCH_BITS == 64 || defined(VBOX_WITH_2X_4GB_ADDR_SPACE_IN_R0) 1541 DECLASM(int) VMXReadVMCS64(uint32_t idxField, uint64_t *pData); 1542 #else 1543 DECLINLINE(int) VMXReadVMCS64(uint32_t idxField, uint64_t *pData) 1544 { 1545 int rc; 1546 1547 uint32_t val_hi, val; 1548 rc = VMXReadVMCS32(idxField, &val); 1549 rc |= VMXReadVMCS32(idxField + 1, &val_hi); 1550 AssertRC(rc); 1551 *pData = RT_MAKE_U64(val, val_hi); 1552 return rc; 1553 } 1554 #endif 1555 1555 1556 1556 #if HC_ARCH_BITS == 64
Note:
See TracChangeset
for help on using the changeset viewer.