[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error
From: |
Hu Tao |
Subject: |
Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling |
Date: |
Fri, 4 Jul 2014 10:56:13 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Jul 03, 2014 at 06:33:28AM -0600, Eric Blake wrote:
> On 07/03/2014 12:10 AM, Hu Tao wrote:
> > This patch fixes two problems of memory-backend-file:
> >
> > 1. If user adds a memory-backend-file object using object_add command,
> > specifying a non-existing directory for property mem-path, qemu
> > will core dump with message:
> >
> > /nonexistingdir: No such file or directory
> > Bad ram offset fffffffffffff000
> > Aborted (core dumped)
> >
> > 2. If user adds a memory-backend-file object using object_add command,
> > specifying a size that is less than huge page size, qemu
> > will core dump with message:
> >
> > Bad ram offset fffffffffffff000
> > Aborted (core dumped)
> >
>
> Might be nice if the commit message also shows the new message issued
> for the same cases after the patch is applied.
OK.
>
> > Signed-off-by: Hu Tao <address@hidden>
> > ---
> > exec.c | 16 +++++++++-------
> > 1 file changed, 9 insertions(+), 7 deletions(-)
> >
>
> >
> > if (memory < hpagesize) {
> > - return NULL;
> > + error_setg(errp, "memory size 0x" RAM_ADDR_FMT " should be larger "
> > + "than huge page size 0x%" PRIx64, memory, hpagesize);
> > + goto error;
>
> Isn't exactly equal also allowed? Maybe a better wording is "should be
> a multiple of the huge page size"
Yes. I'll change the error message.
Thanks,
Hu
>
> --
> Eric Blake eblake redhat com +1-919-301-3266
> Libvirt virtualization library http://libvirt.org
>
- [Qemu-devel] [PATCH for 2.1 0/2] bug fixs for memory backend, Hu Tao, 2014/07/03
- [Qemu-devel] [PATCH for 2.1 1/2] memory: introduce memory_region_init_ram_nofail() and memory_region_init_ram_ptr_nofail(), Hu Tao, 2014/07/03
- [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling, Hu Tao, 2014/07/03
- Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling, Eric Blake, 2014/07/03
- Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling,
Hu Tao <=
- Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling, Eric Blake, 2014/07/04
- Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling, Hu Tao, 2014/07/04
- Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling, Paolo Bonzini, 2014/07/04
- Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling, Michael S. Tsirkin, 2014/07/06
- Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling, Hu Tao, 2014/07/06