All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bin.meng@processmission.com>
To: QEMU <qemu-devel@nongnu.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@mailo.com>
Subject: [PATCH v2 0/1] system/physmem: Improve guest memory allocation failure diagnostics
Date: Sat, 22 Aug 2026 20:27:07 +0800	[thread overview]
Message-ID: <20260822122710.3731595-1-bin.meng@processmission.com> (raw)


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



             reply	other threads:[~2026-08-22 12:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-22 12:27 Bin Meng [this message]
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é

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260822122710.3731595-1-bin.meng@processmission.com \
    --to=bin.meng@processmission.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@mailo.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.