Re: [Qemu-devel] [patch uq/master 2/2] Add option to use file backed guest memory

2010-03-01 Thread Marcelo Tosatti
On Mon, Mar 01, 2010 at 08:25:08PM -0300, Marcelo Tosatti wrote: > Hi Paul, > > Thank you for reviewing. > > On Sun, Feb 28, 2010 at 01:28:16AM +, Paul Brook wrote: > > IMHO it would be better to check the mem_path != NULL here, rather that > > burying the check in file_ram_alloc. > > > > >

Re: [Qemu-devel] [patch uq/master 2/2] Add option to use file backed guest memory

2010-03-01 Thread Marcelo Tosatti
Hi Paul, Thank you for reviewing. On Sun, Feb 28, 2010 at 01:28:16AM +, Paul Brook wrote: > IMHO it would be better to check the mem_path != NULL here, rather that > burying the check in file_ram_alloc. > > >+if (memory < hpagesize) { > >+return NULL; > >+} > > Ah, so it's

Re: [Qemu-devel] [patch uq/master 2/2] Add option to use file backed guest memory

2010-02-27 Thread Paul Brook
>+/* >+ * ftruncate is not supported by hugetlbfs in older >+ * hosts, so don't bother checking for errors. >+ * If anything goes wrong with it under other filesystems, >+ * mmap will fail. >+ */ >+if (ftruncate(fd, memory)) >+ perror("ftruncate"); Code does not m