VirtualBox

Changeset 102427 in vbox for trunk/src/VBox/VMM/include


Ignore:
Timestamp:
Dec 1, 2023 11:21:47 PM (17 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160570
Message:

VMM/IEM: Continue refactoring IEM_MC_MEM_MAP into type specific MCs using bUnmapInfo. bugref:10371

Location:
trunk/src/VBox/VMM/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/include/IEMInline.h

    r102424 r102427  
    38393839#include "../VMMAll/IEMAllMemRWTmplInline.cpp.h"
    38403840
     3841#define TMPL_MEM_TYPE       RTPBCD80U
     3842#define TMPL_MEM_TYPE_ALIGN 7           /** @todo RTPBCD80U alignment testcase */
     3843#define TMPL_MEM_TYPE_SIZE  10
     3844#define TMPL_MEM_FN_SUFF    D80
     3845#define TMPL_MEM_FMT_TYPE   "%.10Rhxs"
     3846#define TMPL_MEM_FMT_DESC   "tword"
     3847#include "../VMMAll/IEMAllMemRWTmplInline.cpp.h"
     3848
    38413849#undef TMPL_MEM_CHECK_UNALIGNED_WITHIN_PAGE_OK
    38423850
  • trunk/src/VBox/VMM/include/IEMInternal.h

    r102424 r102427  
    51115111uint64_t        iemMemFetchDataU64Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
    51125112uint64_t        iemMemFetchDataU64AlignedU128Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
    5113 void            iemMemFetchDataR80Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PRTFLOAT80U pr80Dst) IEM_NOEXCEPT_MAY_LONGJMP;
     5113void            iemMemFetchDataR80Jmp(PVMCPUCC pVCpu, PRTFLOAT80U pr80Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
     5114void            iemMemFetchDataD80Jmp(PVMCPUCC pVCpu, PRTPBCD80U pd80Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
    51145115# endif
    5115 void            iemMemFetchDataD80Jmp(PVMCPUCC pVCpu, PRTPBCD80U pd80Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
    51165116void            iemMemFetchDataU128Jmp(PVMCPUCC pVCpu, PRTUINT128U pu128Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
    51175117void            iemMemFetchDataU128AlignedSseJmp(PVMCPUCC pVCpu, PRTUINT128U pu128Dst, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
     
    51455145void            iemMemStoreDataU256AlignedAvxSafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTUINT256U pu256Value) IEM_NOEXCEPT_MAY_LONGJMP;
    51465146void            iemMemStoreDataR80SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTFLOAT80U pr80Value) IEM_NOEXCEPT_MAY_LONGJMP;
     5147void            iemMemStoreDataD80SafeJmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, PCRTPBCD80U pd80Value) IEM_NOEXCEPT_MAY_LONGJMP;
    51475148#if 0
    51485149void            iemMemStoreDataU8Jmp(PVMCPUCC pVCpu, uint8_t iSegReg, RTGCPTR GCPtrMem, uint8_t u8Value) IEM_NOEXCEPT_MAY_LONGJMP;
     
    51735174PRTFLOAT80U     iemMemMapDataR80WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
    51745175PCRTFLOAT80U    iemMemMapDataR80RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
     5176PRTPBCD80U      iemMemMapDataD80RwSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
     5177PRTPBCD80U      iemMemMapDataD80WoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
     5178PCRTPBCD80U     iemMemMapDataD80RoSafeJmp(PVMCPUCC pVCpu, uint8_t *pbUnmapInfo, uint8_t iSegReg, RTGCPTR GCPtrMem) IEM_NOEXCEPT_MAY_LONGJMP;
    51755179
    51765180void            iemMemCommitAndUnmapRwSafeJmp(PVMCPUCC pVCpu, void *pvMem, uint8_t bMapInfo) IEM_NOEXCEPT_MAY_LONGJMP;
  • trunk/src/VBox/VMM/include/IEMMc.h

    r102426 r102427  
    21942194    (a_pr80Mem) = iemMemFlatMapDataR80WoJmp(pVCpu, &(a_bUnmapInfo), (a_GCPtrMem))
    21952195#endif
     2196
     2197
     2198/**
     2199 * Maps guest memory for 80-bit BCD writeonly direct (or bounce) buffer acccess.
     2200 *
     2201 * @param[out] a_pd80Mem    Where to return the pointer to the mapping.
     2202 * @param[out] a_bUnmapInfo Where to return umapping instructions. uint8_t.
     2203 * @param[in]  a_iSeg       The segment register to access via. No UINT8_MAX!
     2204 * @param[in]  a_GCPtrMem   The memory address.
     2205 * @remarks Will return/long jump on errors.
     2206 * @see     IEM_MC_MEM_COMMIT_AND_UNMAP_WO
     2207 */
     2208#ifndef IEM_WITH_SETJMP
     2209# define IEM_MC_MEM_MAP_D80_WO(a_pd80Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) do { \
     2210        IEM_MC_RETURN_ON_FAILURE(iemMemMap(pVCpu, (void **)&(a_pd80Mem), sizeof(RTFLOAT80U), (a_iSeg), \
     2211                                           (a_GCPtrMem), IEM_ACCESS_DATA_W, sizeof(uint64_t) - 1)); \
     2212        a_bUnmapInfo = 1 | (IEM_ACCESS_TYPE_WRITE << 4); \
     2213    } while (0)
     2214#else
     2215# define IEM_MC_MEM_MAP_D80_WO(a_pd80Mem, a_bUnmapInfo, a_iSeg, a_GCPtrMem) \
     2216    (a_pd80Mem) = iemMemMapDataD80WoJmp(pVCpu, &(a_bUnmapInfo), (a_iSeg), (a_GCPtrMem))
     2217#endif
     2218
     2219/**
     2220 * Maps guest memory for 80-bit BCD writeonly direct (or bounce) buffer acccess.
     2221 *
     2222 * @param[out] a_pd80Mem    Where to return the pointer to the mapping.
     2223 * @param[out] a_bUnmapInfo Where to return umapping instructions. uint8_t.
     2224 * @param[in]  a_GCPtrMem   The memory address.
     2225 * @remarks Will return/long jump on errors.
     2226 * @see     IEM_MC_MEM_COMMIT_AND_UNMAP_WO
     2227 */
     2228#ifndef IEM_WITH_SETJMP
     2229# define IEM_MC_MEM_FLAT_MAP_D80_WO(a_pd80Mem, a_bUnmapInfo, a_GCPtrMem) do { \
     2230        IEM_MC_RETURN_ON_FAILURE(iemMemMap(pVCpu, (void **)&(a_pd80Mem), sizeof(RTFLOAT80U), UINT8_MAX, \
     2231                                           (a_GCPtrMem), IEM_ACCESS_DATA_W, sizeof(uint64_t) - 1)); \
     2232        a_bUnmapInfo = 1 | (IEM_ACCESS_TYPE_WRITE << 4); \
     2233    } while (0)
     2234#else
     2235# define IEM_MC_MEM_FLAT_MAP_D80_WO(a_pd80Mem, a_bUnmapInfo, a_GCPtrMem) \
     2236    (a_pd80Mem) = iemMemFlatMapDataD80WoJmp(pVCpu, &(a_bUnmapInfo), (a_GCPtrMem))
     2237#endif
     2238
    21962239
    21972240
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