Changeset 94712 in vbox
- Timestamp:
- Apr 26, 2022 11:49:13 PM (3 years ago)
- Location:
- trunk/src/VBox/VMM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMAll/IEMAllCImplVmxInstr.cpp.h
r94051 r94712 25 25 * relative offsets. 26 26 */ 27 # ifdef IEM_WITH_CODE_TLB 28 # define IEM_MODRM_GET_U8(a_pVCpu, a_bModRm, a_offModRm) do { } while (0) 29 # define IEM_SIB_GET_U8(a_pVCpu, a_bSib, a_offSib) do { } while (0) 30 # define IEM_DISP_GET_U16(a_pVCpu, a_u16Disp, a_offDisp) do { } while (0) 31 # define IEM_DISP_GET_S8_SX_U16(a_pVCpu, a_u16Disp, a_offDisp) do { } while (0) 32 # define IEM_DISP_GET_U32(a_pVCpu, a_u32Disp, a_offDisp) do { } while (0) 33 # define IEM_DISP_GET_S8_SX_U32(a_pVCpu, a_u32Disp, a_offDisp) do { } while (0) 34 # define IEM_DISP_GET_S32_SX_U64(a_pVCpu, a_u64Disp, a_offDisp) do { } while (0) 35 # define IEM_DISP_GET_S8_SX_U64(a_pVCpu, a_u64Disp, a_offDisp) do { } while (0) 36 # error "Implement me: Getting ModR/M, SIB, displacement needs to work even when instruction crosses a page boundary." 27 # ifdef IEM_WITH_CODE_TLB /** @todo IEM TLB */ 28 # define IEM_MODRM_GET_U8(a_pVCpu, a_bModRm, a_offModRm) do { a_bModRm = 0; RT_NOREF(a_offModRm); } while (0) 29 # define IEM_SIB_GET_U8(a_pVCpu, a_bSib, a_offSib) do { a_bSib = 0; RT_NOREF(a_offSib); } while (0) 30 # define IEM_DISP_GET_U16(a_pVCpu, a_u16Disp, a_offDisp) do { a_u16Disp = 0; RT_NOREF(a_offDisp); } while (0) 31 # define IEM_DISP_GET_S8_SX_U16(a_pVCpu, a_u16Disp, a_offDisp) do { a_u16Disp = 0; RT_NOREF(a_offDisp); } while (0) 32 # define IEM_DISP_GET_U32(a_pVCpu, a_u32Disp, a_offDisp) do { a_u32Disp = 0; RT_NOREF(a_offDisp); } while (0) 33 # define IEM_DISP_GET_S8_SX_U32(a_pVCpu, a_u32Disp, a_offDisp) do { a_u32Disp = 0; RT_NOREF(a_offDisp); } while (0) 34 # define IEM_DISP_GET_S32_SX_U64(a_pVCpu, a_u64Disp, a_offDisp) do { a_u64Disp = 0; RT_NOREF(a_offDisp); } while (0) 35 # define IEM_DISP_GET_S8_SX_U64(a_pVCpu, a_u64Disp, a_offDisp) do { a_u64Disp = 0; RT_NOREF(a_offDisp); } while (0) 36 # if 1 37 # error "Implement me: Getting ModR/M, SIB, displacement needs to work even when instruction crosses a page boundary." 38 # endif 37 39 # else /* !IEM_WITH_CODE_TLB */ 38 40 # define IEM_MODRM_GET_U8(a_pVCpu, a_bModRm, a_offModRm) \ -
trunk/src/VBox/VMM/include/IEMInternal.h
r94423 r94712 75 75 76 76 77 //#define IEM_WITH_CODE_TLB// - work in progress 77 //#define IEM_WITH_CODE_TLB // - work in progress 78 //#define IEM_WITH_DATA_TLB // - incomplete in progress 78 79 79 80 … … 212 213 213 214 ; Check access. 214 mov sxrax, ACCESS_FLAGS | MAPPING_R3_NOT_VALID | 0xffffff00215 mov rax, ACCESS_FLAGS | MAPPING_R3_NOT_VALID | 0xffffff00 215 216 and rax, [rcx + IEMTLBENTRY.fFlagsAndPhysRev] 216 217 cmp rax, [uTlbPhysRev] … … 239 240 { 240 241 /** The TLB entry tag. 241 * Bits 35 thru 0 are made up of the virtual address shifted right 12 bits. 242 * Bits 35 thru 0 are made up of the virtual address shifted right 12 bits, this 243 * is ASSUMING a virtual address width of 48 bits. 244 * 242 245 * Bits 63 thru 36 are made up of the TLB revision (zero means invalid). 243 246 * … … 248 251 * @note Try use SHRD instruction? After seeing 249 252 * https://gmplib.org/~tege/x86-timing.pdf, maybe not. 253 * 254 * @todo This will need to be reorganized for 57-bit wide virtual address and 255 * PCID (currently 12 bits) and ASID (currently 6 bits) support. We'll 256 * have to move the TLB entry versioning entirely to the 257 * fFlagsAndPhysRev member then, 57 bit wide VAs means we'll only have 258 * 19 bits left (64 - 57 + 12 = 19) and they'll almost entire be 259 * consumed by PCID and ASID (12 + 6 = 18). 250 260 */ 251 261 uint64_t uTag; … … 290 300 #define IEMTLBE_F_PG_NO_WRITE RT_BIT_64(3) /**< Phys page: Not writable (access handler, ROM, whatever). */ 291 301 #define IEMTLBE_F_PG_NO_READ RT_BIT_64(4) /**< Phys page: Not readable (MMIO / access handler, ROM) */ 292 #define IEMTLBE_F_PT_NO_DIRTY RT_BIT_64( 5) /**< Page tables: Not dirty (needs to be made dirty on write). */293 #define IEMTLBE_F_NO_MAPPINGR3 RT_BIT_64( 6) /**< TLB entry: The IEMTLBENTRY::pMappingR3 member is invalid. */302 #define IEMTLBE_F_PT_NO_DIRTY RT_BIT_64(6) /**< Page tables: Not dirty (needs to be made dirty on write). */ 303 #define IEMTLBE_F_NO_MAPPINGR3 RT_BIT_64(7) /**< TLB entry: The IEMTLBENTRY::pMappingR3 member is invalid. */ 294 304 #define IEMTLBE_F_PHYS_REV UINT64_C(0xffffffffffffff00) /**< Physical revision mask. */ 295 305 /** @} */
Note:
See TracChangeset
for help on using the changeset viewer.