]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Bump invalid PPN to 2^52 - 1
authorOliver Kurth <okurth@vmware.com>
Tue, 5 Jun 2018 22:47:37 +0000 (15:47 -0700)
committerOliver Kurth <okurth@vmware.com>
Tue, 5 Jun 2018 22:47:37 +0000 (15:47 -0700)
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.

open-vm-tools/lib/include/vm_basic_types.h

index 66029459f1560fd936db506d351bb5cfedcf6800..c76c7a8d4d11e876d6cb9f74b15316a7a5f39ab2 100644 (file)
@@ -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)