提交 85000960 编写于 作者: A Alex Ng 提交者: Greg Kroah-Hartman

Drivers: hv: balloon: Fix info request to show max page count

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: NAlex Ng <alexng@microsoft.com>
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 b357fd39
...@@ -1034,8 +1034,13 @@ static void process_info(struct hv_dynmem_device *dm, struct dm_info_msg *msg) ...@@ -1034,8 +1034,13 @@ static void process_info(struct hv_dynmem_device *dm, struct dm_info_msg *msg)
switch (info_hdr->type) { switch (info_hdr->type) {
case INFO_TYPE_MAX_PAGE_CNT: case INFO_TYPE_MAX_PAGE_CNT:
pr_info("Received INFO_TYPE_MAX_PAGE_CNT\n"); if (info_hdr->data_size == sizeof(__u64)) {
pr_info("Data Size is %d\n", info_hdr->data_size); __u64 *max_page_count = (__u64 *)&info_hdr[1];
pr_info("INFO_TYPE_MAX_PAGE_CNT = %llu\n",
*max_page_count);
}
break; break;
default: default:
pr_info("Received Unknown type: %d\n", info_hdr->type); pr_info("Received Unknown type: %d\n", info_hdr->type);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册