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

2019-02-13 Thread Stefan Hajnoczi
On Wed, Feb 13, 2019 at 04:13:18PM +0800, Wei Yang wrote: > On Wed, Feb 13, 2019 at 03:14:01PM +0800, Stefan Hajnoczi wrote: > >diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c > >index ba601ce940..d62689179b 100644 > >--- a/backends/hostmem-file.c > >+++ b/backends/hostmem-file.c > >

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

2019-02-13 Thread Igor Mammedov
On Wed, 13 Feb 2019 16:53:54 +0800 Wei Yang wrote: > On Wed, Feb 13, 2019 at 03:14:01PM +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

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

2019-02-13 Thread Wei Yang
On Wed, Feb 13, 2019 at 03:14:01PM +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 v2] hostmem-file: reject invalid pmem file sizes

2019-02-13 Thread Wei Yang
On Wed, Feb 13, 2019 at 03:14:01PM +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

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

2019-02-12 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