On Wed, Nov 11, 2026 at 01:23:38PM +0100, Markus Armbruster wrote:
> When HostMemoryBackend method alloc() fails, the error report isn't
> always clear.  E.g. "-object memory-backend-shm,id=mem0,size=1E" fails
> for me like this:
> 
>     qemu-system-x86_64: unable to map backing store for guest RAM: Cannot 
> allocate memory
> 
> Leaves users guessing which part of the (often lengthy) command line
> needs fixing.
> 
> Let's prepend a bit of context:
> 
>     qemu-system-x86_64: can't create memory-backend-shm: unable to map 
> backing store for guest RAM: Cannot allocate memory
> 
> This makes an error message in shm_backend_memory_alloc() partly
> redundant:
> 
>     qemu-system-x86_64: can't create memory-backend-shm: can't create shm 
> backend with `share=off`
> 
> Change it to
> 
>     qemu-system-x86_64: can't create memory-backend-shm: backend requires 
> 'share=on'
> 
> Signed-off-by: Markus Armbruster <[email protected]>
> ---
>  backends/hostmem-shm.c | 2 +-
>  backends/hostmem.c     | 3 +++
>  2 files changed, 4 insertions(+), 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <[email protected]>


With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|


Reply via email to