Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-24 Thread Igor Mammedov
On Tue, 24 Aug 2021 09:37:54 +0100 "Dr. David Alan Gilbert" wrote: > * David Hildenbrand (da...@redhat.com) wrote: > > On 23.08.21 12:34, Philippe Mathieu-Daudé wrote: > > > On 8/23/21 12:24 PM, David Hildenbrand wrote: > > > > On 23.08.21 12:12, Philippe Mathieu-Daudé wrote: > > > > > On

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-24 Thread David Hildenbrand
On 24.08.21 10:37, Dr. David Alan Gilbert wrote: * David Hildenbrand (da...@redhat.com) wrote: On 23.08.21 12:34, Philippe Mathieu-Daudé wrote: On 8/23/21 12:24 PM, David Hildenbrand wrote: On 23.08.21 12:12, Philippe Mathieu-Daudé wrote: On 8/23/21 11:29 AM, David Hildenbrand wrote: On

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-24 Thread Dr. David Alan Gilbert
* David Hildenbrand (da...@redhat.com) wrote: > On 23.08.21 12:34, Philippe Mathieu-Daudé wrote: > > On 8/23/21 12:24 PM, David Hildenbrand wrote: > > > On 23.08.21 12:12, Philippe Mathieu-Daudé wrote: > > > > On 8/23/21 11:29 AM, David Hildenbrand wrote: > > > > > On 23.08.21 11:23, Peter Maydell

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-23 Thread David Hildenbrand
On 23.08.21 12:34, Philippe Mathieu-Daudé wrote: On 8/23/21 12:24 PM, David Hildenbrand wrote: On 23.08.21 12:12, Philippe Mathieu-Daudé wrote: On 8/23/21 11:29 AM, David Hildenbrand wrote: On 23.08.21 11:23, Peter Maydell wrote: On Mon, 23 Aug 2021 at 09:40, David Hildenbrand wrote: Not

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-23 Thread Philippe Mathieu-Daudé
On 8/23/21 12:24 PM, David Hildenbrand wrote: > On 23.08.21 12:12, Philippe Mathieu-Daudé wrote: >> On 8/23/21 11:29 AM, David Hildenbrand wrote: >>> On 23.08.21 11:23, Peter Maydell wrote: On Mon, 23 Aug 2021 at 09:40, David Hildenbrand wrote: > Not opposed to printing the size,

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-23 Thread David Hildenbrand
On 23.08.21 12:12, Philippe Mathieu-Daudé wrote: On 8/23/21 11:29 AM, David Hildenbrand wrote: On 23.08.21 11:23, Peter Maydell wrote: On Mon, 23 Aug 2021 at 09:40, David Hildenbrand wrote: Not opposed to printing the size, although I doubt that it will really stop similar questions/problems

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-23 Thread Philippe Mathieu-Daudé
On 8/23/21 11:29 AM, David Hildenbrand wrote: > On 23.08.21 11:23, Peter Maydell wrote: >> On Mon, 23 Aug 2021 at 09:40, David Hildenbrand wrote: >>> Not opposed to printing the size, although I doubt that it will really >>> stop similar questions/problems getting raised. >> >> The case that

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-23 Thread David Hildenbrand
On 23.08.21 11:23, Peter Maydell wrote: On Mon, 23 Aug 2021 at 09:40, David Hildenbrand wrote: Not opposed to printing the size, although I doubt that it will really stop similar questions/problems getting raised. The case that triggered this was somebody thinking -m took a byte count, so

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-23 Thread Peter Maydell
On Mon, 23 Aug 2021 at 09:40, David Hildenbrand wrote: > Not opposed to printing the size, although I doubt that it will really > stop similar questions/problems getting raised. The case that triggered this was somebody thinking -m took a byte count, so very likely that an error message saying

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-23 Thread David Hildenbrand
On 20.08.21 18:00, Philippe Mathieu-Daudé wrote: On 8/20/21 5:53 PM, David Hildenbrand wrote: On 20.08.21 17:52, Philippe Mathieu-Daudé wrote: When Linux refuses to overcommit a seriously wild allocation we get:    $ qemu-system-i386 -m 4000    qemu-system-i386: cannot set up guest

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-21 Thread Philippe Mathieu-Daudé
On 8/21/21 12:01 PM, Bin Meng wrote: > On Fri, Aug 20, 2021 at 11:52 PM Philippe Mathieu-Daudé > wrote: >> >> When Linux refuses to overcommit a seriously wild allocation we get: >> >> $ qemu-system-i386 -m 4000 >> qemu-system-i386: cannot set up guest memory 'pc.ram': Cannot allocate >>

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-21 Thread Peter Maydell
On Sat, 21 Aug 2021 at 11:03, Bin Meng wrote: > Does g_autofree work with every compiler we support? Yes. We use it extensively: $ git grep g_autofree |wc -l 329 > Looks it only applies to GCC and clang? > https://www.gitmemory.com/issue/linuxwacom/libwacom/142/518787578 Those are the only

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-21 Thread Bin Meng
On Fri, Aug 20, 2021 at 11:52 PM Philippe Mathieu-Daudé wrote: > > When Linux refuses to overcommit a seriously wild allocation we get: > > $ qemu-system-i386 -m 4000 > qemu-system-i386: cannot set up guest memory 'pc.ram': Cannot allocate > memory > > Slighly improve the error message,

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-20 Thread Peter Xu
On Fri, Aug 20, 2021 at 05:52:11PM +0200, Philippe Mathieu-Daudé wrote: > When Linux refuses to overcommit a seriously wild allocation we get: > > $ qemu-system-i386 -m 4000 > qemu-system-i386: cannot set up guest memory 'pc.ram': Cannot allocate > memory > > Slighly improve the error

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-20 Thread Peter Maydell
On Fri, 20 Aug 2021 at 17:59, Philippe Mathieu-Daudé wrote: > Anyhow I still see the size displayed in the error message as an > useful hint: > > $ qemu-system-i386 -m 64000 > qemu-system-i386: cannot set up guest memory 'pc.ram': Cannot allocate > memory > > VS: > > $ qemu-system-i386 -m 64000 >

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-20 Thread Philippe Mathieu-Daudé
On 8/20/21 6:40 PM, Igor Mammedov wrote: > On Fri, 20 Aug 2021 18:00:26 +0200 > Philippe Mathieu-Daudé wrote: > >> On 8/20/21 5:53 PM, David Hildenbrand wrote: >>> On 20.08.21 17:52, Philippe Mathieu-Daudé wrote: When Linux refuses to overcommit a seriously wild allocation we get:

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-20 Thread Igor Mammedov
On Fri, 20 Aug 2021 18:00:26 +0200 Philippe Mathieu-Daudé wrote: > On 8/20/21 5:53 PM, David Hildenbrand wrote: > > On 20.08.21 17:52, Philippe Mathieu-Daudé wrote: > >> When Linux refuses to overcommit a seriously wild allocation we get: > >> > >>    $ qemu-system-i386 -m 4000 > >>   

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-20 Thread Philippe Mathieu-Daudé
On 8/20/21 5:53 PM, David Hildenbrand wrote: > On 20.08.21 17:52, Philippe Mathieu-Daudé wrote: >> When Linux refuses to overcommit a seriously wild allocation we get: >> >>    $ qemu-system-i386 -m 4000 >>    qemu-system-i386: cannot set up guest memory 'pc.ram': Cannot >> allocate memory >>

Re: [PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-20 Thread David Hildenbrand
On 20.08.21 17:52, Philippe Mathieu-Daudé wrote: When Linux refuses to overcommit a seriously wild allocation we get: $ qemu-system-i386 -m 4000 qemu-system-i386: cannot set up guest memory 'pc.ram': Cannot allocate memory Slighly improve the error message, displaying the memory size

[PATCH] softmmu/physmem: Improve guest memory allocation failure error message

2021-08-20 Thread Philippe Mathieu-Daudé
When Linux refuses to overcommit a seriously wild allocation we get: $ qemu-system-i386 -m 4000 qemu-system-i386: cannot set up guest memory 'pc.ram': Cannot allocate memory Slighly improve the error message, displaying the memory size requested (in case the user didn't expect