94 _In_ PINS_CACHE Cache,
95 _Out_ PINSTRUX Instrux,
102 _In_ PINS_CACHE Cache
107 _In_ PINS_CACHE Cache,
114 _In_ PINS_CACHE Cache,
122 _In_ PINS_CACHE Cache,
128 _In_ PINS_CACHE Cache,
134 _In_ PINS_CACHE Cache,
135 _In_ PINSTRUX Instruction,
BOOLEAN Spill
True if there is an instruction inside this entry that spills inside the next page.
void IntIcDumpIcache(void)
Dumps the entire contents of the implicit, per guest, instruction cache.
struct _INS_CACHE_ENTRY * PINS_CACHE_ENTRY
BOOLEAN Pinned
True if the entry is pinned (it cannot be evicted).
DWORD FillRate
How many entries or occupied by valid instructions.
DWORD EntriesCount
Number of entries inside each line.
INTSTATUS IntIcLookupInstruction(PINS_CACHE Cache, PINSTRUX Instrux, QWORD Gva, QWORD Cr3)
Lookup an instruction inside the cache.
INSTRUX Instruction
The decoded instruction.
INTSTATUS IntIcFlushGvaPage(PINS_CACHE Cache, QWORD Gva, QWORD Cr3, BOOLEAN Spill)
Flush all entries cached from a given guest virtual page.
struct _INS_CACHE INS_CACHE
QWORD Cr3
Virtual address space containing the instruction. Can be IC_ANY_VAS.
struct _INS_CACHE_LINE * PINS_CACHE_LINE
DWORD FlushCount
Number of times the cache has been flushed.
int INTSTATUS
The status data type.
QWORD Gva
The guest virtual page described by this entry.
LIST_ENTRY Link
List entry element.
DWORD RefCount
Number of times this instruction has been hit.
INTSTATUS IntIcCreate(INS_CACHE **Cache, DWORD LinesCount, DWORD EntriesCount, DWORD InvCount)
Create anew instruction cache.
INTSTATUS IntIcFlushGpaPage(PINS_CACHE Cache, QWORD Gpa)
Flush all entries cached from a given guest physical page.
DWORD MissCount
Number of cache misses.
BOOLEAN Valid
True if the entry is valid.
struct _INS_CACHE_INV_ENTRY * PINS_CACHE_INV_ENTRY
INS_CACHE_INV_ENTRY * Invd2
Invalidation entry for the instructions that cross the page boundary.
INS_CACHE_INV_ENTRY * Invd1
Invalidation entry for the page containing the instruction.
struct _INS_CACHE_INV_ENTRY INS_CACHE_INV_ENTRY
DWORD PageFlushCount
Number of page flushes.
INS_CACHE_ENTRY * Entries
Array containing the entries.
void * SwapHook
Swap handle.
LIST_HEAD * InsInvGva
Array of invalidation entries.
INTSTATUS IntIcDestroy(PINS_CACHE *Cache)
Destroy an instruction cache.
INTSTATUS IntIcFlushAddress(PINS_CACHE Cache, QWORD Gva, QWORD Cr3)
Flush entries cached from a given address.
struct _INS_CACHE_LINE INS_CACHE_LINE
BOOLEAN Disabled
True if the cache has been deactivated.
QWORD Gpa
The guest physical page described by this entry.
DWORD LinesCount
Number of lines inside the cache. Must be a power of 2.
DWORD InvCount
Number of lines inside the invalidation array. Must be a power of 2.
void * WriteHook
EPT write hook handle.
INTSTATUS IntIcAddInstruction(PINS_CACHE Cache, PINSTRUX Instruction, QWORD Gva, QWORD Cr3, BOOLEAN Global)
Adds an instruction to the cache.
BOOLEAN Dirty
True if the ache was modified after the last flush.
INTSTATUS IntIcFlush(PINS_CACHE Cache)
Flush the entire instruction cache.
INTSTATUS IntIcFlushVaSpace(PINS_CACHE Cache, QWORD Cr3)
Flush an entire virtual address space.
QWORD Gva
The instruction guest virtual address.
INS_CACHE_LINE * Lines
Array of cache lines.
DWORD HitCount
Number of cache hits.
DWORD ReplaceCount
Number of times entries were evicted & replaced by other ones.
BOOLEAN Global
True if the entry is global (shared in multiple processes).
struct _INS_CACHE * PINS_CACHE
QWORD Cr3
Virtual address space the page belongs to.
struct _INS_CACHE_ENTRY INS_CACHE_ENTRY