Re: [Qemu-devel] [PATCH] exec.c: Ensure right alignment also for file backed ram

2016-05-10 Thread Paolo Bonzini
On 25/04/2016 13:55, Dominik Dingel wrote: > While in the anonymous ram case we already take care of the right alignment > such an alignment gurantee does not exist for file backed ram allocation. > > Instead, pagesize is used for alignment. On s390 this is not enough for gmap, > as we need to

Re: [Qemu-devel] [PATCH] exec.c: Ensure right alignment also for file backed ram

2016-05-02 Thread Fam Zheng
On Fri, 04/29 10:26, Dominik Dingel wrote: > On Fri, 29 Apr 2016 15:32:22 +0800 > Fam Zheng wrote: > > > On Mon, 04/25 13:55, Dominik Dingel wrote: > > > While in the anonymous ram case we already take care of the right > > > alignment > > > such an alignment gurantee does not

Re: [Qemu-devel] [PATCH] exec.c: Ensure right alignment also for file backed ram

2016-04-29 Thread Fam Zheng
On Mon, 04/25 13:55, Dominik Dingel wrote: > While in the anonymous ram case we already take care of the right alignment > such an alignment gurantee does not exist for file backed ram allocation. s/gurantee/guarantee/ Otherwise looks good to me, Reviewed-by: Fam Zheng > >

Re: [Qemu-devel] [PATCH] exec.c: Ensure right alignment also for file backed ram

2016-04-29 Thread Dominik Dingel
On Fri, 29 Apr 2016 15:32:22 +0800 Fam Zheng wrote: > On Mon, 04/25 13:55, Dominik Dingel wrote: > > While in the anonymous ram case we already take care of the right alignment > > such an alignment gurantee does not exist for file backed ram allocation. > >

[Qemu-devel] [PATCH] exec.c: Ensure right alignment also for file backed ram

2016-04-25 Thread Dominik Dingel
While in the anonymous ram case we already take care of the right alignment such an alignment gurantee does not exist for file backed ram allocation. Instead, pagesize is used for alignment. On s390 this is not enough for gmap, as we need to satisfy an alignment up to segments. Reported-by:

Re: [Qemu-devel] [PATCH] exec.c: Ensure right alignment also for file backed ram

2016-03-29 Thread Paolo Bonzini
On 29/03/2016 11:29, Dominik Dingel wrote: >> > Why is this part necessary? On x86 you can have 1 megabyte of RAM, >> > but QEMU_VMALLOC_ALIGN is 2MB. > You are right, I changed this to keep the change consistent and thought > the use case of x86 guests with 1 MB RAM might be a little bit

Re: [Qemu-devel] [PATCH] exec.c: Ensure right alignment also for file backed ram

2016-03-29 Thread Dominik Dingel
On Thu, 24 Mar 2016 12:35:10 +0100 Paolo Bonzini wrote: > > > On 23/03/2016 22:32, Dominik Dingel wrote: > > -page_size = qemu_fd_getpagesize(fd); > > -block->mr->align = page_size; > > +alignment = MAX(qemu_fd_getpagesize(fd), QEMU_VMALLOC_ALIGN); > > +

Re: [Qemu-devel] [PATCH] exec.c: Ensure right alignment also for file backed ram

2016-03-24 Thread Paolo Bonzini
On 23/03/2016 22:32, Dominik Dingel wrote: > -page_size = qemu_fd_getpagesize(fd); > -block->mr->align = page_size; > +alignment = MAX(qemu_fd_getpagesize(fd), QEMU_VMALLOC_ALIGN); > +block->mr->align = alignment; > > -if (memory < page_size) { > +if (memory <

[Qemu-devel] [PATCH] exec.c: Ensure right alignment also for file backed ram

2016-03-23 Thread Dominik Dingel
While in the anonymous ram case we already take care of the right alignment such an alignment gurantee does not exist for file backed ram allocation. Instead, pagesize is used for alignment. On s390 this is not enough for gmap, as we need to satisfy an alignment up to segments. Reported-by: