+19
−2
Loading
Introduce hv_deposit_memory_node() and hv_deposit_memory() helper functions to handle memory deposit with proper error handling. The new hv_deposit_memory_node() function takes the hypervisor status as a parameter and validates it before depositing pages. It checks for HV_STATUS_INSUFFICIENT_MEMORY specifically and returns an error for unexpected status codes. This is a precursor patch to new out-of-memory error codes support. No functional changes intended. Signed-off-by:Stanislav Kinsburskii <skinsburskii@linux.microsoft.com> Reviewed-by:
Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com> Reviewed-by:
Mukesh R <mrathor@linux.microsoft.com> Signed-off-by:
Wei Liu <wei.liu@kernel.org>