From: Oliver Kurth Date: Tue, 5 Jun 2018 22:47:37 +0000 (-0700) Subject: Bump invalid PPN to 2^52 - 1 X-Git-Tag: stable-11.0.0~556 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e450a50dce8eb0387cd6aa2a3eeb39b364640b7;p=thirdparty%2Fopen-vm-tools.git Bump invalid PPN to 2^52 - 1 We are ready to bump INVALID_PPN value. Let us set it to 2^52 - 1. This is more than enough to get over 4PB vRAM, that requires 40-bit PPNs. Another option was to set it to (uint64)-1, like the current value of INVALID_PPN64, but it seems like there is no good reason to do it. There are a few instances where INVALID_PPN is treated as a regular PPN, e.g. we may convert it to PA and back. 2^52 - 1 will allow us to preserve that natural relationship between invalid PPN and invalid PA. All INVALID_PPN64 will have to be converted to INVALID_PPN in follow up changes. --- diff --git a/open-vm-tools/lib/include/vm_basic_types.h b/open-vm-tools/lib/include/vm_basic_types.h index 66029459f..c76c7a8d4 100644 --- a/open-vm-tools/lib/include/vm_basic_types.h +++ b/open-vm-tools/lib/include/vm_basic_types.h @@ -629,12 +629,12 @@ typedef void * UserVA; /* Maximal observable PPN value. */ #define MAX_PPN_BITS 31 -#define MAX_PPN (((PPN64)1 << MAX_PPN_BITS) - 1) +#define MAX_PPN (((PPN)1 << MAX_PPN_BITS) - 1) -#define INVALID_PPN ((PPN64)0xffffffff) +#define INVALID_PPN ((PPN)0x000fffffffffffffull) #define INVALID_PPN32 ((PPN32)0xffffffff) -#define INVALID_PPN64 ((PPN64)0xffffffffffffffffull) -#define APIC_INVALID_PPN ((PPN64)0xfffffffe) +#define INVALID_PPN64 ((PPN)0xffffffffffffffffull) +#define APIC_INVALID_PPN ((PPN)0xfffffffe) #define INVALID_BPN ((BPN)0x000000ffffffffffull)