73 _In_ PGPA_CACHE *Cache
78 _In_ PGPA_CACHE Cache,
84 _In_ PGPA_CACHE Cache,
91 _In_ PGPA_CACHE Cache,
99 _In_ PGPA_CACHE Cache,
107 _In_ PGPA_CACHE Cache
110 #endif // _GPACACHE_H_ struct _GPA_CACHE_ENTRY GPA_CACHE_ENTRY
struct _GPA_CACHE_ENTRY * PGPA_CACHE_ENTRY
GPA_CACHE_ENTRY Entry
The actual cache entry.
struct _GPA_CACHE_VICTIM * PGPA_CACHE_VICTIM
DWORD UseCount
Reference count, incremented by calls to IntGpaCacheFindAndAdd.
INTSTATUS IntGpaCacheInit(PGPA_CACHE *Cache, DWORD LinesCount, DWORD EntriesCount)
Initialize a GPA cache.
int INTSTATUS
The status data type.
struct _GPA_CACHE_LINE GPA_CACHE_LINE
LIST_ENTRY Victims
List of victim entries evicted from the cache while UseCount is not 0.
struct _GPA_CACHE * PGPA_CACHE
INTSTATUS IntGpaCacheFlush(PGPA_CACHE Cache)
Flush the entire GPA cache.
INTSTATUS IntGpaCacheRelease(PGPA_CACHE Cache, QWORD Gpa)
Release a previously used cached entry.
QWORD Gpa
Gpa this entry maps to.
INTSTATUS IntGpaCacheFetchAndAdd(PGPA_CACHE Cache, QWORD Gpa, DWORD Size, PBYTE Buffer)
Fetch data from a cached entry, or add it to the cache, of not already present.
struct _GPA_CACHE_LINE * PGPA_CACHE_LINE
GPA_CACHE_LINE * Lines
Actual array of cache lines.
LIST_ENTRY Link
Linked list entry.
INTSTATUS IntGpaCacheUnInit(PGPA_CACHE *Cache)
Uninit a GPA cache.
void * Hva
Host pointer which maps to Gpa.
DWORD HitCount
Number of times this entry was accessed.
void IntGpaCacheDump(PGPA_CACHE Cache)
Dumps the entire contents of the GPA cache.
INTSTATUS IntGpaCacheFindAndAdd(PGPA_CACHE Cache, QWORD Gpa, void **Hva)
Search for an entry in the GPA cache, and add it, if it wasn't found.
struct _GPA_CACHE GPA_CACHE
struct _GPA_CACHE_VICTIM GPA_CACHE_VICTIM
INTSTATUS IntGpaCachePatchAndAdd(PGPA_CACHE Cache, QWORD Gpa, DWORD Size, PBYTE Buffer)
Patch data in a cached entry, or add it to the cache, of not already present.
DWORD LinesCount
Number of lines.
GPA_CACHE_ENTRY * Entries
An array of cache entries.
DWORD EntriesCount
Number of entries per line.
BOOLEAN Valid
True if the entry is valid, false otherwise.