public inbox for linux-hyperv@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Improve Hyper-V memory deposit error handling
@ 2026-01-23  1:35 Stanislav Kinsburskii
  2026-01-23  1:35 ` [PATCH 1/4] mshv: Introduce hv_result_oom() helper function Stanislav Kinsburskii
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Stanislav Kinsburskii @ 2026-01-23  1:35 UTC (permalink / raw)
  To: kys, haiyangz, wei.liu, decui, longli; +Cc: linux-hyperv, linux-kernel

This series extends the MSHV driver to properly handle additional
memory-related error codes from the Microsofot Hypervisor by depositing
memory pages when needed.

Currently, when the hypervisor returns HV_STATUS_INSUFFICIENT_MEMORY
during partition creation, the driver calls hv_call_deposit_pages() to
provide the necessary memory. However, there are other memory-related
error codes that indicate the hypervisor needs additional memory
resources, but the driver does not attempt to deposit pages for these
cases.

This series introduces the hv_result_oom() helper function macro to
identify all memory-related error codes (HV_STATUS_INSUFFICIENT_MEMORY,
HV_STATUS_INSUFFICIENT_BUFFERS, HV_STATUS_INSUFFICIENT_DEVICE_DOMAINS, and
HV_STATUS_INSUFFICIENT_ROOT_MEMORY) and ensures the driver attempts to
deposit pages for all of them via new hv_deposit_memory() helper.

With these changes, partition creation becomes more robust by handling
all scenarios where the hypervisor requires additional memory deposits.

---

Stanislav Kinsburskii (4):
      mshv: Introduce hv_result_oom() helper function
      mshv: Introduce hv_deposit_memory helper functions
      mshv: Handle insufficient contiguous memory hypervisor status
      mshv: Handle insufficient root memory hypervisor status


 drivers/hv/hv_common.c         |    3 ++
 drivers/hv/hv_proc.c           |   54 +++++++++++++++++++++++++++++++++++---
 drivers/hv/mshv_root_hv_call.c |   45 +++++++++++++-------------------
 drivers/hv/mshv_root_main.c    |    5 +---
 include/asm-generic/mshyperv.h |   13 +++++++++
 include/hyperv/hvgdk_mini.h    |   57 +++++++++++++++++++++-------------------
 include/hyperv/hvhdk_mini.h    |    2 +
 7 files changed, 119 insertions(+), 60 deletions(-)


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-01-30  2:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-23  1:35 [PATCH 0/4] Improve Hyper-V memory deposit error handling Stanislav Kinsburskii
2026-01-23  1:35 ` [PATCH 1/4] mshv: Introduce hv_result_oom() helper function Stanislav Kinsburskii
2026-01-24  0:31   ` Mukesh R
2026-01-23  1:35 ` [PATCH 2/4] mshv: Introduce hv_deposit_memory helper functions Stanislav Kinsburskii
2026-01-24  0:33   ` Mukesh R
2026-01-25 22:41     ` Stanislav Kinsburskii
2026-01-27  2:06       ` Mukesh R
2026-01-27 18:30         ` Stanislav Kinsburskii
2026-01-27 19:44           ` Mukesh R
2026-01-28 23:18             ` Stanislav Kinsburskii
2026-01-30  2:49               ` Mukesh R
2026-01-23  1:35 ` [PATCH 3/4] mshv: Handle insufficient contiguous memory hypervisor status Stanislav Kinsburskii
2026-01-23  1:35 ` [PATCH 4/4] mshv: Handle insufficient root memory hypervisor statuses Stanislav Kinsburskii

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox