From: Oliver Kurth Date: Tue, 19 Feb 2019 20:51:30 +0000 (-0800) Subject: [Part 1] GuestLib support for 64bit memory shares. X-Git-Tag: stable-11.0.0~239 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=070ef6fd44b6a0095ec51faebf2e0c5c0151efb7;p=thirdparty%2Fopen-vm-tools.git [Part 1] GuestLib support for 64bit memory shares. 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. --- diff --git a/open-vm-tools/libguestlib/guestlibV3.x b/open-vm-tools/libguestlib/guestlibV3.x index 327cdc3a6..71771ad58 100644 --- a/open-vm-tools/libguestlib/guestlibV3.x +++ b/open-vm-tools/libguestlib/guestlibV3.x @@ -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; };