Drivers: hv: balloon: Support status report for larger page sizes
authorBoqun Feng <boqun.feng@gmail.com>
Fri, 25 Mar 2022 02:32:11 +0000 (10:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Sep 2022 08:30:04 +0000 (10:30 +0200)
commite7a792dcd6a7e51d4406bacd46a6c7cfcc78f2f2
tree2052fa1a0489052cb0a18f7e6826190f591ef83d
parent2edbdfc89d9f4077d5255defe843248170013b3b
Drivers: hv: balloon: Support status report for larger page sizes

commit b3d6dd09ff00fdcf4f7c0cb54700ffd5dd343502 upstream.

DM_STATUS_REPORT expects the numbers of pages in the unit of 4k pages
(HV_HYP_PAGE) instead of guest pages, so to make it work when guest page
sizes are larger than 4k, convert the numbers of guest pages into the
numbers of HV_HYP_PAGEs.

Note that the numbers of guest pages are still used for tracing because
tracing is internal to the guest kernel.

Reported-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20220325023212.1570049-2-boqun.feng@gmail.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hv/hv_balloon.c