Hi, This patch series ensures that the value returned by get_ram_size() is aligned to the host's page size. Without that, KVM_SET_USER_MEMORY_REGION could fail when passed an unaligned value. Changes from V1: - Factor out code for getting _SC_PHYS_PAGES into a function (Will) - Apply the scaling down of the ramsize to the number of pages (Will) Cheers, /fuad Fixes: 18bd8c3bd2a7 ("kvm tools: Don't use all of host RAM for guests by default") Signed-off-by: Fuad Tabba <tabba@xxxxxxxxxx> Fuad Tabba (3): Factor out getting the host page size Factor out getting the number of physical memory host pages Apply scaling down the calculated guest ram size to the number of pages builtin-run.c | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) base-commit: bd4ba57156dad39349edfb2338bdc2f4ed3c0bae -- 2.41.0.255.g8b1d071c50-goog