From: John Wolfe Date: Wed, 30 Jun 2021 18:37:27 +0000 (-0700) Subject: Add page size defines for 64KB pages. X-Git-Tag: stable-12.0.0~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5f0c71fd909527fcfd03f858d277abc9fae9569;p=thirdparty%2Fopen-vm-tools.git Add page size defines for 64KB pages. --- diff --git a/open-vm-tools/lib/include/vm_basic_defs.h b/open-vm-tools/lib/include/vm_basic_defs.h index ce3502aa4..5a2e658be 100644 --- a/open-vm-tools/lib/include/vm_basic_defs.h +++ b/open-vm-tools/lib/include/vm_basic_defs.h @@ -250,6 +250,7 @@ Max(int a, int b) #define PAGE_SHIFT_4KB 12 #define PAGE_SHIFT_16KB 14 +#define PAGE_SHIFT_64KB 16 #ifndef PAGE_SHIFT // { #if defined __x86_64__ || defined __i386__ @@ -271,6 +272,7 @@ Max(int a, int b) #define PAGE_SIZE_4KB (1 << PAGE_SHIFT_4KB) #define PAGE_SIZE_16KB (1 << PAGE_SHIFT_16KB) +#define PAGE_SIZE_64KB (1 << PAGE_SHIFT_64KB) #ifndef PAGE_SIZE #define PAGE_SIZE (1 << PAGE_SHIFT) @@ -278,6 +280,7 @@ Max(int a, int b) #define PAGE_MASK_4KB (PAGE_SIZE_4KB - 1) #define PAGE_MASK_16KB (PAGE_SIZE_16KB - 1) +#define PAGE_MASK_64KB (PAGE_SIZE_64KB - 1) #ifndef PAGE_MASK #define PAGE_MASK (PAGE_SIZE - 1) @@ -285,6 +288,7 @@ Max(int a, int b) #define PAGE_OFFSET_4KB(_addr) ((uintptr_t)(_addr) & (PAGE_SIZE_4KB - 1)) #define PAGE_OFFSET_16KB(_addr) ((uintptr_t)(_addr) & (PAGE_SIZE_16KB - 1)) +#define PAGE_OFFSET_64KB(_addr) ((uintptr_t)(_addr) & (PAGE_SIZE_64KB - 1)) #ifndef PAGE_OFFSET #define PAGE_OFFSET(_addr) ((uintptr_t)(_addr) & (PAGE_SIZE - 1))