Re: [Qemu-devel] [PATCH] hostmem-file: reject invalid pmem file sizes

2019-02-12 Thread Stefan Hajnoczi
On Tue, Feb 12, 2019 at 03:44:46PM +0100, Igor Mammedov wrote: > > diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c > > index ba601ce940..325ab4aad9 100644 > > --- a/backends/hostmem-file.c > > +++ b/backends/hostmem-file.c > > @@ -46,6 +46,22 @@ file_backend_memory_alloc(HostMemoryBa

Re: [Qemu-devel] [PATCH] hostmem-file: reject invalid pmem file sizes

2019-02-12 Thread Igor Mammedov
On Tue, 12 Feb 2019 10:52:41 +0800 Stefan Hajnoczi wrote: > Guests started with NVDIMMs larger than the underlying host file produce > confusing errors inside the guest. This happens because the guest > accesses pages beyond the end of the file. > > Check the pmem file size on startup and print

Re: [Qemu-devel] [PATCH] hostmem-file: reject invalid pmem file sizes

2019-02-12 Thread Pankaj Gupta
Hi Stefan, > > Guests started with NVDIMMs larger than the underlying host file produce > confusing errors inside the guest. This happens because the guest > accesses pages beyond the end of the file. > > Check the pmem file size on startup and print a clear error message if > the size is inv

[Qemu-devel] [PATCH] hostmem-file: reject invalid pmem file sizes

2019-02-11 Thread Stefan Hajnoczi
Guests started with NVDIMMs larger than the underlying host file produce confusing errors inside the guest. This happens because the guest accesses pages beyond the end of the file. Check the pmem file size on startup and print a clear error message if the size is invalid. Fixes: https://bugzill