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

2018-04-05 Thread Max Filippov
On Thu, Apr 5, 2018 at 2:03 AM, Laurent Vivier wrote: > Did you try to use the regpairs_aligned() and target_offset64() > functions as it is done for pread64(), pwrite64(), fadvise64(),... ? My understanding is that if the syscalls had single parameter that took two registers then it'd be a place

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

2018-04-05 Thread Max Filippov
On Wed, Apr 4, 2018 at 8:43 PM, Richard Henderson wrote: > On 04/05/2018 11:41 AM, Max Filippov wrote: >> +static void target_low_high_to_host_low_high(abi_ulong tlow, >> + abi_ulong thigh, >> + unsigned long *

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

2018-04-05 Thread Laurent Vivier
Le 05/04/2018 à 03:41, 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_low_high_to_host_low_high that does this recombinati

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

2018-04-04 Thread Richard Henderson
On 04/05/2018 11:41 AM, Max Filippov wrote: > +static void target_low_high_to_host_low_high(abi_ulong tlow, > + abi_ulong thigh, > + unsigned long *hlow, > + unsigned

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

2018-04-04 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_low_high_to_host_low_high that does this recombination and use it in preadv/pwritev syscalls. This fixes