All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] system/physmem: Improve guest memory allocation failure diagnostics
@ 2026-08-22 12:27 Bin Meng
  2026-08-22 12:27 ` [PATCH v2 1/1] system/physmem: Improve guest memory allocation failure error message Bin Meng
  0 siblings, 1 reply; 4+ messages in thread
From: Bin Meng @ 2026-08-22 12:27 UTC (permalink / raw)
  To: QEMU; +Cc: Paolo Bonzini, Peter Xu, Philippe Mathieu-Daudé


This revives Philippe Mathieu-Daudé's patch from 2021. The original
posting and discussion are available at:

https://lore.kernel.org/r/20210820155211.3153137-1-philmd@redhat.com

When host memory allocation fails, QEMU reports the affected memory
region and host error, but not the size of the failed allocation. This
makes accidental requests harder to spot. In particular, a bare value
passed to '-m' is interpreted as MiB, so a user expecting bytes can
unintentionally request tens of TiB.

The patch adds the human-readable RAMBlock size to the existing error.
This does not try to explain host-specific overcommit, cgroup, or NUMA
policy. It provides the most useful portable fact available at the
failure site and makes both user mistakes and support reports easier
to diagnose.

Changes in v2:
- Rebase onto current master
- Update the source path from softmmu/physmem.c to system/physmem.c
- Fix a typo in the commit message
- Collect Peter Xu's Reviewed-by and Bin Meng's Tested-by

Philippe Mathieu-Daudé (1):
  system/physmem: Improve guest memory allocation failure error message

 system/physmem.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

---
base-commit: eea8fe61b8be8f3016e522e6af24924a0266ca95
branch: virt

-- 
2.53.0



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

end of thread, other threads:[~2026-08-24 21:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-22 12:27 [PATCH v2 0/1] system/physmem: Improve guest memory allocation failure diagnostics Bin Meng
2026-08-22 12:27 ` [PATCH v2 1/1] system/physmem: Improve guest memory allocation failure error message Bin Meng
2026-08-24 19:24   ` Peter Xu
2026-08-24 21:20   ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.