VirtualBox

Changeset 80084 in vbox


Ignore:
Timestamp:
Jul 31, 2019 6:44:47 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
132524
Message:

hmvmxinline.h: Kicking out 32-bit host support, added VMX[Read|Write]Vmcs16 for upcoming changes bugref:9511

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/hmvmxinline.h

    r80078 r80084  
    558558
    559559
     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 */
     574DECLINLINE(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
    560581#ifdef RT_ARCH_AMD64
    561582# define VMXWriteVmcsHstN       VMXWriteVmcs64
     
    715736#endif
    716737
     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 */
     753DECLINLINE(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
    717763#ifdef RT_ARCH_AMD64
    718764# define VMXReadVmcsHstN        VMXReadVmcs64
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette