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

2016-04-13 Thread Dominik Dingel
On Tue, 12 Apr 2016 23:45:18 +0200 Paolo Bonzini wrote: > > > On 07/04/2016 23:31, Dominik Dingel wrote: > > diff --git a/exec.c b/exec.c > > index c4f9036..1ae98e4 100644 > > --- a/exec.c > > +++ b/exec.c > > @@ -1241,6 +1241,7 @@ static void *file_ram_alloc(RAMBlock *block, > > void *are

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

2016-04-12 Thread Paolo Bonzini
On 07/04/2016 23:31, Dominik Dingel wrote: > diff --git a/exec.c b/exec.c > index c4f9036..1ae98e4 100644 > --- a/exec.c > +++ b/exec.c > @@ -1241,6 +1241,7 @@ static void *file_ram_alloc(RAMBlock *block, > void *area; > int fd = -1; > int64_t page_size; > +int64_t alignment; >

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

2016-04-07 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: Halil