Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling

2014-07-06 Thread Hu Tao
On Sun, Jul 06, 2014 at 09:42:42AM +0300, Michael S. Tsirkin wrote: > On Fri, Jul 04, 2014 at 09:47:43AM +0200, Paolo Bonzini wrote: > > Il 04/07/2014 09:43, Hu Tao ha scritto: > > >The memory size is rounded up to hpagesize when allocating memory, we > > >can waste at most hpagesize-1 bytes memory

Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling

2014-07-06 Thread Michael S. Tsirkin
On Fri, Jul 04, 2014 at 09:47:43AM +0200, Paolo Bonzini wrote: > Il 04/07/2014 09:43, Hu Tao ha scritto: > >The memory size is rounded up to hpagesize when allocating memory, we > >can waste at most hpagesize-1 bytes memory. I don't think it's a > >problem. > > > >In the other side, do you think we

Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling

2014-07-04 Thread Paolo Bonzini
Il 04/07/2014 09:43, Hu Tao ha scritto: The memory size is rounded up to hpagesize when allocating memory, we can waste at most hpagesize-1 bytes memory. I don't think it's a problem. In the other side, do you think we should give an error in the case like -object memory-backend-ram,size=M(g

Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling

2014-07-04 Thread Hu Tao
On Thu, Jul 03, 2014 at 10:05:56PM -0600, Eric Blake wrote: > On 07/03/2014 08:56 PM, Hu Tao wrote: > > 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 me

Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling

2014-07-03 Thread Eric Blake
On 07/03/2014 08:56 PM, Hu Tao wrote: > 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 n

Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling

2014-07-03 Thread Hu Tao
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-p

Re: [Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling

2014-07-03 Thread Eric Blake
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:

[Qemu-devel] [PATCH for 2.1 2/2] memory-backend-file: improve error handling

2014-07-02 Thread Hu Tao
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 f