Re: [Qemu-devel] [PATCH] memory: fetch pmem size in get_file_size()

2019-09-12 Thread Paolo Bonzini
On 12/09/19 12:25, Stefan Hajnoczi wrote: > On Fri, Aug 30, 2019 at 03:44:45PM -0300, Eduardo Habkost wrote: >> On Fri, Aug 30, 2019 at 10:30:56AM +0100, Stefan Hajnoczi wrote: >>> Neither stat(2) nor lseek(2) report the size of Linux devdax pmem >>> character device nodes. Commit 314aec4a6e068449

Re: [Qemu-devel] [PATCH] memory: fetch pmem size in get_file_size()

2019-09-12 Thread Stefan Hajnoczi
On Fri, Aug 30, 2019 at 03:44:45PM -0300, Eduardo Habkost wrote: > On Fri, Aug 30, 2019 at 10:30:56AM +0100, Stefan Hajnoczi wrote: > > Neither stat(2) nor lseek(2) report the size of Linux devdax pmem > > character device nodes. Commit 314aec4a6e06844937f1677f6cba21981005f389 > > ("hostmem-file:

Re: [Qemu-devel] [PATCH] memory: fetch pmem size in get_file_size()

2019-08-30 Thread Eduardo Habkost
On Fri, Aug 30, 2019 at 10:30:56AM +0100, Stefan Hajnoczi wrote: > Neither stat(2) nor lseek(2) report the size of Linux devdax pmem > character device nodes. Commit 314aec4a6e06844937f1677f6cba21981005f389 > ("hostmem-file: reject invalid pmem file sizes") added code to > hostmem-file.c to fetch

[Qemu-devel] [PATCH] memory: fetch pmem size in get_file_size()

2019-08-30 Thread Stefan Hajnoczi
Neither stat(2) nor lseek(2) report the size of Linux devdax pmem character device nodes. Commit 314aec4a6e06844937f1677f6cba21981005f389 ("hostmem-file: reject invalid pmem file sizes") added code to hostmem-file.c to fetch the size from sysfs and compare against the user-provided size=NUM parame