Skip to content

Commit

Permalink
Add DIRTY bit definition (libvmi#1085)
Browse files Browse the repository at this point in the history
  • Loading branch information
tklengyel authored Nov 21, 2023
1 parent 12d3a8c commit bcc057c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions libvmi/x86.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,21 @@ extern "C" {
#define CACHE_DISABLED(entry) VMI_GET_BIT(entry, 4)

/*
* The ACCESSED bit is used to discover whether a page has been read
* or written to. If it has, then the bit is set, otherwise, it is not.
* The ACCESSED bit is used to discover whether a page has been read.
* If it has, then the bit is set, otherwise, it is not.
* Note that, this bit will not be cleared by the CPU, so that burden
* falls on the OS (if it needs this bit at all).
*/
#define ACCESSED(entry) VMI_GET_BIT(entry, 5)

/*
* The ACCESSED bit is used to discover whether a page has been written
* to. If it has, then the bit is set, otherwise, it is not.
* Note that, this bit will not be cleared by the CPU, so that burden
* falls on the OS (if it needs this bit at all).
*/
#define DIRTY(entry) VMI_GET_BIT(entry, 6)

/*
* The PAGE_SIZE bit stores the page size for that specific entry.
* If the bit is set, then pages are large pages. Otherwise, they are 4 KiB.
Expand Down

0 comments on commit bcc057c

Please sign in to comment.