Drivers: hv: Create debugfs file with hyper-v balloon usage information
authorAlexander Atanasov <alexander.atanasov@virtuozzo.com>
Mon, 11 Jul 2022 18:18:22 +0000 (18:18 +0000)
committerWei Liu <wei.liu@kernel.org>
Mon, 18 Jul 2022 11:19:02 +0000 (11:19 +0000)
commitd180e0a1be6cea2b7436fadbd1c96aecdf3c46c7
tree33b6df80f3a21415146e75ee8864fa0d3e11cff8
parentbf28462e20b56c1d7c8dbf82367cd43ffbc8a1f1
Drivers: hv: Create debugfs file with hyper-v balloon usage information

Allow the guest to know how much it is ballooned by the host.
It is useful when debugging out of memory conditions.

When host gets back memory from the guest it is accounted
as used memory in the guest but the guest have no way to know
how much it is actually ballooned.

Expose current state, flags and max possible memory to the guest.
While at it - fix a 10+ years old typo.

Signed-off-by: Alexander Atanasov <alexander.atanasov@virtuozzo.com>
Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/20220711181825.52318-1-alexander.atanasov@virtuozzo.com
Signed-off-by: Wei Liu <wei.liu@kernel.org>
drivers/hv/hv_balloon.c