Skip to content

system/physmem: Improve guest memory allocation failure diagnostics

Bin Meng qemu-devel 1 version Applied

Status from this message: queued, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest1 patch 2 repliesApplied

Changes in v2 from the cover letter

- 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

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/1system/physmem: Improve guest memory allocation failure error messagesystem/physmem.c+3 -12 replies

Reviews trailers per patch

The patch has a Reviewed-by or Acked-by.

PatchPeter XuBin MengPhilippe Mathieu-Daudé
1/1R-b T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/1] system/physmem: Improve guest memory allocation failure diagnostics

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

https://lore.kernel.org/r/[email protected]

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

Signature · 1 line
2.53.0