Changeset 80084 in vbox
- Timestamp:
- Jul 31, 2019 6:44:47 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 132524
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hmvmxinline.h
r80078 r80084 558 558 559 559 560 /** 561 * Executes VMWRITE for a 16-bit VMCS field. 562 * 563 * @returns VBox status code. 564 * @retval VINF_SUCCESS. 565 * @retval VERR_VMX_INVALID_VMCS_PTR. 566 * @retval VERR_VMX_INVALID_VMCS_FIELD. 567 * 568 * @param uVmcsField The VMCS field. 569 * @param u16Val The 16-bit value to set. 570 * 571 * @remarks The values of the two status codes can be OR'ed together, the result 572 * will be VERR_VMX_INVALID_VMCS_PTR. 573 */ 574 DECLINLINE(int) VMXWriteVmcs16(uint32_t uVmcsField, uint16_t u16Val) 575 { 576 Assert(RT_BF_GET(uVmcsField, VMX_BF_VMCSFIELD_WIDTH) == VMXVMCSFIELDWIDTH_16BIT); 577 return VMXWriteVmcs64(uVmcsField, u16Val); 578 } 579 580 560 581 #ifdef RT_ARCH_AMD64 561 582 # define VMXWriteVmcsHstN VMXWriteVmcs64 … … 715 736 #endif 716 737 738 739 /** 740 * Executes VMREAD for a 64-bit field. 741 * 742 * @returns VBox status code. 743 * @retval VINF_SUCCESS. 744 * @retval VERR_VMX_INVALID_VMCS_PTR. 745 * @retval VERR_VMX_INVALID_VMCS_FIELD. 746 * 747 * @param uVmcsField The VMCS field. 748 * @param pData Where to store VMCS field value. 749 * 750 * @remarks The values of the two status codes can be OR'ed together, the result 751 * will be VERR_VMX_INVALID_VMCS_PTR. 752 */ 753 DECLINLINE(int) VMXReadVmcs16(uint32_t uVmcsField, uint16_t *pData) 754 { 755 AssertMsg(RT_BF_GET(uVmcsField, VMX_BF_VMCSFIELD_WIDTH) == VMXVMCSFIELDWIDTH_16BIT, ("%#RX32\n", uVmcsField)); 756 uint64_t u64Tmp; 757 int rc = VMXReadVmcs64(uVmcsField, &u64Tmp); 758 *pData = (uint16_t)u64Tmp; 759 return rc; 760 } 761 762 717 763 #ifdef RT_ARCH_AMD64 718 764 # define VMXReadVmcsHstN VMXReadVmcs64
Note:
See TracChangeset
for help on using the changeset viewer.