Re: [Qemu-devel] [PATCH v3] linux-user: fix preadv/pwritev offsets

2018-04-05 Thread Laurent Vivier
Le 05/04/2018 à 18:27, Max Filippov a écrit : > On Thu, Apr 5, 2018 at 8:52 AM, Laurent Vivier wrote: >> Why don't you try to de-construct then re-construct the offset? > > It would require 128-bit arithmetic on 64-bit host. > >> Kernel commit >> 601cc11d054a "Make non-compat preadv/pwritev us

Re: [Qemu-devel] [PATCH v3] linux-user: fix preadv/pwritev offsets

2018-04-05 Thread Max Filippov
On Thu, Apr 5, 2018 at 8:52 AM, Laurent Vivier wrote: > Why don't you try to de-construct then re-construct the offset? It would require 128-bit arithmetic on 64-bit host. > Kernel commit > 601cc11d054a "Make non-compat preadv/pwritev use native register size" > is interesting. > > static inli

Re: [Qemu-devel] [PATCH v3] linux-user: fix preadv/pwritev offsets

2018-04-05 Thread Laurent Vivier
Le 05/04/2018 à 15:47, Max Filippov a écrit : > preadv/pwritev accept low and high parts of file offset in two separate > parameters. When host bitness doesn't match guest bitness these parts > must be appropriately recombined. > Introduce target_to_host_low_high that does this recombination and us

[Qemu-devel] [PATCH v3] linux-user: fix preadv/pwritev offsets

2018-04-05 Thread Max Filippov
preadv/pwritev accept low and high parts of file offset in two separate parameters. When host bitness doesn't match guest bitness these parts must be appropriately recombined. Introduce target_to_host_low_high that does this recombination and use it in preadv/pwritev syscalls. This fixes glibc tes