Re: hypercalls with 64-bit results

2021-06-17 Thread Jan Beulich
On 17.06.2021 10:08, Jan Beulich wrote: > On 17.06.2021 10:05, Juergen Gross wrote: >> On 17.06.21 10:00, Jan Beulich wrote: >>> On 17.06.2021 06:55, Juergen Gross wrote: On 16.06.21 18:04, Jan Beulich wrote: > Since hypercalls from the tool stack are based on ioctl(), and since > ioct

Re: hypercalls with 64-bit results

2021-06-17 Thread Jan Beulich
On 17.06.2021 17:03, Anthony PERARD wrote: > On Thu, Jun 17, 2021 at 10:03:50AM +0200, Jan Beulich wrote: >> But it's not just XENMEM_maximum_gpfn that's affected; that's just the >> one pointing out the underlying issue. Plus if so, shouldn't we avoid >> returning values that are going to be trunc

Re: hypercalls with 64-bit results

2021-06-17 Thread Anthony PERARD
On Thu, Jun 17, 2021 at 10:03:50AM +0200, Jan Beulich wrote: > But it's not just XENMEM_maximum_gpfn that's affected; that's just the > one pointing out the underlying issue. Plus if so, shouldn't we avoid > returning values that are going to be truncated (and, as can be seen > here, then get perha

Re: hypercalls with 64-bit results

2021-06-17 Thread Roger Pau Monné
On Wed, Jun 16, 2021 at 06:04:02PM +0200, Jan Beulich wrote: > All, > > several years back do_memory_op() in libxc was changed to have "long" > return type. This is because some of the sub-ops return potentially > large values as the hypercall return value (i.e. not in an argument > structure fiel

Re: hypercalls with 64-bit results

2021-06-17 Thread Jan Beulich
On 17.06.2021 10:05, Juergen Gross wrote: > On 17.06.21 10:00, Jan Beulich wrote: >> On 17.06.2021 06:55, Juergen Gross wrote: >>> On 16.06.21 18:04, Jan Beulich wrote: Since hypercalls from the tool stack are based on ioctl(), and since ioctl() has a return type of "int", I'm afraid ther

Re: hypercalls with 64-bit results

2021-06-17 Thread Juergen Gross
On 17.06.21 10:00, Jan Beulich wrote: On 17.06.2021 06:55, Juergen Gross wrote: On 16.06.21 18:04, Jan Beulich wrote: Since hypercalls from the tool stack are based on ioctl(), and since ioctl() has a return type of "int", I'm afraid there's no way we can deal with this by adjusting function re

Re: hypercalls with 64-bit results

2021-06-17 Thread Jan Beulich
On 16.06.2021 20:15, Andrew Cooper wrote: > On 16/06/2021 17:04, Jan Beulich wrote: >> All, >> >> several years back do_memory_op() in libxc was changed to have "long" >> return type. This is because some of the sub-ops return potentially >> large values as the hypercall return value (i.e. not in a

Re: hypercalls with 64-bit results

2021-06-17 Thread Jan Beulich
On 17.06.2021 06:55, Juergen Gross wrote: > On 16.06.21 18:04, Jan Beulich wrote: >> Since hypercalls from the tool stack are based on ioctl(), and since >> ioctl() has a return type of "int", I'm afraid there's no way we can >> deal with this by adjusting function return types in the libraries. >>

Re: hypercalls with 64-bit results

2021-06-16 Thread Juergen Gross
On 16.06.21 18:04, Jan Beulich wrote: All, several years back do_memory_op() in libxc was changed to have "long" return type. This is because some of the sub-ops return potentially large values as the hypercall return value (i.e. not in an argument structure field). This change, however, didn't

Re: hypercalls with 64-bit results

2021-06-16 Thread Andrew Cooper
On 16/06/2021 17:04, Jan Beulich wrote: > All, > > several years back do_memory_op() in libxc was changed to have "long" > return type. This is because some of the sub-ops return potentially > large values as the hypercall return value (i.e. not in an argument > structure field). This change, howev

hypercalls with 64-bit results

2021-06-16 Thread Jan Beulich
All, several years back do_memory_op() in libxc was changed to have "long" return type. This is because some of the sub-ops return potentially large values as the hypercall return value (i.e. not in an argument structure field). This change, however, didn't have the intended effect from all I can