From bcc057ccfcc413bc2694b673459549c3b32373bc Mon Sep 17 00:00:00 2001 From: Tamas K Lengyel Date: Tue, 21 Nov 2023 16:49:36 -0500 Subject: [PATCH] Add DIRTY bit definition (#1085) --- libvmi/x86.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libvmi/x86.h b/libvmi/x86.h index c3970b6e9..681c3ed55 100644 --- a/libvmi/x86.h +++ b/libvmi/x86.h @@ -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.