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

2019-03-08 Thread Eduardo Habkost
On Thu, Feb 14, 2019 at 11:10:04AM +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

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

2019-02-14 Thread Igor Mammedov
On Thu, 14 Feb 2019 11:10:04 +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 v3 2/2] hostmem-file: reject invalid pmem file sizes

2019-02-14 Thread Wei Yang
On Thu, Feb 14, 2019 at 04:15:58PM +0800, Stefan Hajnoczi wrote: >On Thu, Feb 14, 2019 at 12:19:15PM +0800, Wei Yang wrote: >> On Thu, Feb 14, 2019 at 11:10:04AM +0800, Stefan Hajnoczi wrote: >> >diff --git a/util/oslib-win32.c b/util/oslib-win32.c >> >index b4c17f5dfa..bd633afab6 100644 >> >--- a/

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

2019-02-14 Thread Stefan Hajnoczi
On Thu, Feb 14, 2019 at 12:19:15PM +0800, Wei Yang wrote: > On Thu, Feb 14, 2019 at 11:10:04AM +0800, Stefan Hajnoczi wrote: > >diff --git a/util/oslib-win32.c b/util/oslib-win32.c > >index b4c17f5dfa..bd633afab6 100644 > >--- a/util/oslib-win32.c > >+++ b/util/oslib-win32.c > >@@ -560,6 +560,11 @@

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

2019-02-13 Thread Wei Yang
On Thu, Feb 14, 2019 at 11:10:04AM +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 v3 2/2] hostmem-file: reject invalid pmem file sizes

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