]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
[Part 1] GuestLib support for 64bit memory shares.
authorOliver Kurth <okurth@vmware.com>
Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)
committerOliver Kurth <okurth@vmware.com>
Tue, 19 Feb 2019 20:51:30 +0000 (12:51 -0800)
MEMSCHED_SHARES_MAX is currently set to MAX_PPN and will not fit in 32-bit soon.

Changed the datatype of 'memshares' property to uint64 for the future support.

'memshares' is exposed in GuestLib as unsigned 32-bit value.
Modified the ESX code to set this property only if the vaulue can be fit in
a uint32 type. Else, the value is not set and 'valid' bit set is set to FALSE.

Added a new property "memShares64" (as uint64) in GuestLib for the new
64-bit memory shares.

This CLN implements only the necessary changes on ESX side.

open-vm-tools/libguestlib/guestlibV3.x

index 327cdc3a6533cccabf847c359bb3face2b5a4a11..71771ad58e866130e20324d8578e610476e1bac2 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 2008-2016 VMware, Inc. All rights reserved.
+ * Copyright (C) 2008-2016,2019 VMware, Inc. All rights reserved.
  *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU Lesser General Public License as published
@@ -96,10 +96,13 @@ enum GuestLibV3TypeIds {
    GUESTLIB_MEM_BALLOON_TARGET_MB   = 35,
    GUESTLIB_MEM_BALLOON_MAX_MB      = 36,
    GUESTLIB_RESOURCE_POOL_PATH_LONG = 37,
+
+   /* New Counters added in ESX 7.0 */
+   GUESTLIB_MEM_SHARES_64           = 38,
    /*------ Add any new statistics above this line. ------- */
 
    /*------ Bump this when adding to this list. -------*/
-   GUESTLIB_MAX_STATISTIC_ID        = 38
+   GUESTLIB_MAX_STATISTIC_ID        = 39
 };
 
 union GuestLibV3Stat switch (GuestLibV3TypeIds d) {
@@ -183,5 +186,7 @@ union GuestLibV3Stat switch (GuestLibV3TypeIds d) {
       struct GuestLibV3StatUint32 memBalloonMaxMB;
    case GUESTLIB_RESOURCE_POOL_PATH_LONG:
       struct GuestLibV3ByteArray resourcePoolPathLong;
+   case GUESTLIB_MEM_SHARES_64:
+      struct GuestLibV3StatUint64 memShares64;
 };