]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Drivers: hv: balloon: Show the max dynamic memory assigned
authorAlex Ng <alexng@messages.microsoft.com>
Sun, 6 Aug 2017 20:12:54 +0000 (13:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Aug 2017 16:14:43 +0000 (09:14 -0700)
Previously we were only showing max number of pages. We should make it
more clear that this value is the max amount of dynamic memory that the
Hyper-V host is willing to assign to this guest.

Signed-off-by: Alex Ng <alexng@messages.microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/hv_balloon.c

index 0a5c318eedc10731c16f73d1a4716cb6d330b709..7cec4826b0115f12583773112f5fceffbef3bd42 100644 (file)
@@ -1035,8 +1035,8 @@ static void process_info(struct hv_dynmem_device *dm, struct dm_info_msg *msg)
                if (info_hdr->data_size == sizeof(__u64)) {
                        __u64 *max_page_count = (__u64 *)&info_hdr[1];
 
-                       pr_info("INFO_TYPE_MAX_PAGE_CNT = %llu\n",
-                               *max_page_count);
+                       pr_info("Max. dynamic memory size: %llu MB\n",
+                               (*max_page_count) >> (20 - PAGE_SHIFT));
                }
 
                break;