Skip to content

Commit

Permalink
Drivers: hv: balloon: Fix info request to show max page count
Browse files Browse the repository at this point in the history
Balloon driver was only printing the size of the info blob and not the
actual content. This fixes it so that the info blob (max page count as
configured in Hyper-V) is printed out.

Signed-off-by: Alex Ng <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Alex Ng authored and gregkh committed Nov 7, 2016
1 parent b357fd3 commit 8500096
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/hv/hv_balloon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1034,8 +1034,13 @@ static void process_info(struct hv_dynmem_device *dm, struct dm_info_msg *msg)

switch (info_hdr->type) {
case INFO_TYPE_MAX_PAGE_CNT:
pr_info("Received INFO_TYPE_MAX_PAGE_CNT\n");
pr_info("Data Size is %d\n", info_hdr->data_size);
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);
}

break;
default:
pr_info("Received Unknown type: %d\n", info_hdr->type);
Expand Down

0 comments on commit 8500096

Please sign in to comment.