Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-07-13 Thread Wei Liu
On Fri, Jul 08, 2016 at 02:18:46PM +0100, Wei Liu wrote: > To unblock Paulina on her series, I would be ok with the cast provided > there is compile-time check to ensure the user-space structure is > identical to the ioctl structure. > > That would involve: > 1. Introducing BUILD_BUG_ON, offsetof,

Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-07-08 Thread Wei Liu
To unblock Paulina on her series, I would be ok with the cast provided there is compile-time check to ensure the user-space structure is identical to the ioctl structure. That would involve: 1. Introducing BUILD_BUG_ON, offsetof, alignof to libs/ if they are not already available. 2. BUILD_BUG_

Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-07-06 Thread Roger Pau Monné
On Wed, Jun 22, 2016 at 05:49:59PM +0100, Wei Liu wrote: > On Wed, Jun 22, 2016 at 03:52:43PM +0100, Wei Liu wrote: > > On Wed, Jun 22, 2016 at 02:52:47PM +0100, David Vrabel wrote: > > > On 22/06/16 14:29, Wei Liu wrote: > > > > On Wed, Jun 22, 2016 at 01:37:50PM +0100, David Vrabel wrote: > > > >

Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-07-05 Thread George Dunlap
On Wed, Jun 22, 2016 at 3:52 PM, Wei Liu wrote: >> I think the best solution is to allow the osdep code to provide the >> implementation of xengnttab_grant_copy_segment_t, allowing the Linux >> code to do: >> >> typedef ioctl_gntdev_grant_copy_segment xengnttab_grant_copy_segment_t >> >> You shoul

Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-06-22 Thread Wei Liu
On Wed, Jun 22, 2016 at 03:52:43PM +0100, Wei Liu wrote: > On Wed, Jun 22, 2016 at 02:52:47PM +0100, David Vrabel wrote: > > On 22/06/16 14:29, Wei Liu wrote: > > > On Wed, Jun 22, 2016 at 01:37:50PM +0100, David Vrabel wrote: > > >> On 22/06/16 12:21, Wei Liu wrote: > > >>> On Wed, Jun 22, 2016 at

Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-06-22 Thread Wei Liu
On Wed, Jun 22, 2016 at 02:52:47PM +0100, David Vrabel wrote: > On 22/06/16 14:29, Wei Liu wrote: > > On Wed, Jun 22, 2016 at 01:37:50PM +0100, David Vrabel wrote: > >> On 22/06/16 12:21, Wei Liu wrote: > >>> On Wed, Jun 22, 2016 at 10:37:24AM +0100, David Vrabel wrote: > On 22/06/16 09:38, Pa

Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-06-22 Thread Paulina Szubarczyk
On Wed, 22 Jun 2016 12:24:16 +0100 Wei Liu wrote: > On Wed, Jun 22, 2016 at 11:53:00AM +0200, Paulina Szubarczyk wrote: > [...] > > > I know Wei asked for this but you've replaced what should be a single > > > pointer assignment with a memory allocation and two loops over all the > > > segments.

Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-06-22 Thread David Vrabel
On 22/06/16 14:29, Wei Liu wrote: > On Wed, Jun 22, 2016 at 01:37:50PM +0100, David Vrabel wrote: >> On 22/06/16 12:21, Wei Liu wrote: >>> On Wed, Jun 22, 2016 at 10:37:24AM +0100, David Vrabel wrote: On 22/06/16 09:38, Paulina Szubarczyk wrote: > In a linux part an ioctl(gntdev, IOCTL_GNT

Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-06-22 Thread Wei Liu
On Wed, Jun 22, 2016 at 01:37:50PM +0100, David Vrabel wrote: > On 22/06/16 12:21, Wei Liu wrote: > > On Wed, Jun 22, 2016 at 10:37:24AM +0100, David Vrabel wrote: > >> On 22/06/16 09:38, Paulina Szubarczyk wrote: > >>> In a linux part an ioctl(gntdev, IOCTL_GNTDEV_GRANT_COPY, ..) > >>> system call

Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-06-22 Thread David Vrabel
On 22/06/16 12:21, Wei Liu wrote: > On Wed, Jun 22, 2016 at 10:37:24AM +0100, David Vrabel wrote: >> On 22/06/16 09:38, Paulina Szubarczyk wrote: >>> In a linux part an ioctl(gntdev, IOCTL_GNTDEV_GRANT_COPY, ..) >>> system call is invoked. In mini-os the operation is yet not >>> implemented. For ot

Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-06-22 Thread Wei Liu
On Wed, Jun 22, 2016 at 11:53:00AM +0200, Paulina Szubarczyk wrote: [...] > > I know Wei asked for this but you've replaced what should be a single > > pointer assignment with a memory allocation and two loops over all the > > segments. > > > > This is a hot path and the two structures (the libxen

Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-06-22 Thread Wei Liu
On Wed, Jun 22, 2016 at 10:37:24AM +0100, David Vrabel wrote: > On 22/06/16 09:38, Paulina Szubarczyk wrote: > > In a linux part an ioctl(gntdev, IOCTL_GNTDEV_GRANT_COPY, ..) > > system call is invoked. In mini-os the operation is yet not > > implemented. For other OSs there is a dummy implementati

Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-06-22 Thread Paulina Szubarczyk
On Wed, 22 Jun 2016 10:37:24 +0100 David Vrabel wrote: > On 22/06/16 09:38, Paulina Szubarczyk wrote: > > In a linux part an ioctl(gntdev, IOCTL_GNTDEV_GRANT_COPY, ..) > > system call is invoked. In mini-os the operation is yet not > > implemented. For other OSs there is a dummy implementation. >

Re: [Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-06-22 Thread David Vrabel
On 22/06/16 09:38, Paulina Szubarczyk wrote: > In a linux part an ioctl(gntdev, IOCTL_GNTDEV_GRANT_COPY, ..) > system call is invoked. In mini-os the operation is yet not > implemented. For other OSs there is a dummy implementation. [...] > --- a/tools/libs/gnttab/linux.c > +++ b/tools/libs/gnttab/

[Xen-devel] [PATCH v3 1/2] Interface for grant copy operation in libs.

2016-06-22 Thread Paulina Szubarczyk
In a linux part an ioctl(gntdev, IOCTL_GNTDEV_GRANT_COPY, ..) system call is invoked. In mini-os the operation is yet not implemented. For other OSs there is a dummy implementation. Signed-off-by: Paulina Szubarczyk --- Changes since v2: - dropped the changes in libxc/include/xenctrl_compat - cha