Changeset 105616 in vbox for trunk/src/VBox/VMM/include
- Timestamp:
- Aug 7, 2024 8:22:21 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/include/IEMInternal.h
r105579 r105616 558 558 #endif 559 559 560 /** Enable the large page bitmap TLB optimization. 561 * 562 * The idea here is to avoid scanning the full 32 KB (2MB pages, 2*512 TLB 563 * entries) or 64 KB (4MB pages, 2*1024 TLB entries) worth of TLB entries during 564 * invlpg when large pages are used, and instead just scan 128 or 256 bytes of 565 * the bmLargePage bitmap to determin which TLB entires that might be containing 566 * large pages and actually require checking. 567 * 568 * There is a good posibility of false positives since we currently don't clear 569 * the bitmap when flushing the TLB, but it should help reduce the workload when 570 * the large pages aren't fully loaded into the TLB in their entirity... 571 */ 572 #define IEMTLB_WITH_LARGE_PAGE_BITMAP 560 573 561 574 /** … … 672 685 uint32_t cTlbPhysRevRollovers; 673 686 674 /*uint32_t au32Padding[2];*/ 687 /** Number of INVLPG (and similar) operations. */ 688 uint32_t cTlbInvlPg; 689 /** Subset of cTlbInvlPg that involved non-global large pages. */ 690 uint32_t cTlbInvlPgLargeNonGlobal; 691 /** Subset of cTlbInvlPg that involved global large pages. */ 692 uint32_t cTlbInvlPgLargeGlobal; 693 694 uint32_t au32Padding[13]; 675 695 676 696 /** The TLB entries. … … 678 698 * Odd entries are for PTE.G=1 and uses uTlbRevisionGlobal. */ 679 699 IEMTLBENTRY aEntries[IEMTLB_ENTRY_COUNT * 2]; 700 #ifdef IEMTLB_WITH_LARGE_PAGE_BITMAP 701 /** Bitmap tracking TLB entries for large pages. 702 * This duplicates IEMTLBE_F_PT_LARGE_PAGE for each TLB entry. */ 703 uint64_t bmLargePage[IEMTLB_ENTRY_COUNT * 2 / 64]; 704 #endif 680 705 } IEMTLB; 681 706 AssertCompileSizeAlignment(IEMTLB, 64); 707 #ifdef IEMTLB_WITH_LARGE_PAGE_BITMAP 708 AssertCompile(IEMTLB_ENTRY_COUNT >= 32 /* bmLargePage ASSUMPTION */); 709 #endif 682 710 /** The width (in bits) of the address portion of the TLB tag. */ 683 711 #define IEMTLB_TAG_ADDR_WIDTH 36 … … 862 890 iemTlbTrace(a_pVCpu, kIemTlbTraceType_User3, a_u64Param1, a_u64Param2, a_bParam, a_u32Param) 863 891 #else 892 # define IEMTLBTRACE_USER0(a_pVCpu, a_u64Param1, a_u64Param2, a_u32Param, a_bParam) do { } while (0) 864 893 # define IEMTLBTRACE_USER1(a_pVCpu, a_u64Param1, a_u64Param2, a_u32Param, a_bParam) do { } while (0) 865 894 # define IEMTLBTRACE_USER2(a_pVCpu, a_u64Param1, a_u64Param2, a_u32Param, a_bParam) do { } while (0) 866 895 # define IEMTLBTRACE_USER3(a_pVCpu, a_u64Param1, a_u64Param2, a_u32Param, a_bParam) do { } while (0) 867 # define IEMTLBTRACE_USER4(a_pVCpu, a_u64Param1, a_u64Param2, a_u32Param, a_bParam) do { } while (0)868 896 #endif 869 897
Note:
See TracChangeset
for help on using the changeset viewer.