[PATCH v2 1/2] hv_balloon: Use kernel macros to simplify open coded sequences

2024-05-01 Thread mhkelley58
From: Michael Kelley Code sequences equivalent to ALIGN(), ALIGN_DOWN(), and umin() are currently open coded. Change these to use the kernel macro to improve code clarity. ALIGN() and ALIGN_DOWN() require the alignment value to be a power of 2, which is the case here. Signed-off-by: Michael Kell

[PATCH v2 2/2] hv_balloon: Enable hot-add for memblock sizes > 128 MiB

2024-05-01 Thread mhkelley58
From: Michael Kelley The Hyper-V balloon driver supports hot-add of memory in addition to ballooning. Current code hot-adds in fixed size chunks of 128 MiB (fixed constant HA_CHUNK in the code). While this works in Hyper-V VMs with 64 GiB or less or memory where the Linux memblock size is 128 MiB