[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 2/4] block/xen_disk: remove use of grant map/unmap



> -----Original Message-----
> From: Wei Liu [mailto:wei.liu2@xxxxxxxxxx]
> Sent: 01 May 2018 11:30
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>; Kevin Wolf
> <kwolf@xxxxxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>; qemu-
> block@xxxxxxxxxx; qemu-devel@xxxxxxxxxx; Max Reitz
> <mreitz@xxxxxxxxxx>; Anthony Perard <anthony.perard@xxxxxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx; Wei Liu <wei.liu2@xxxxxxxxxx>
> Subject: Re: [Xen-devel] [PATCH 2/4] block/xen_disk: remove use of grant
> map/unmap
> 
> On Mon, Apr 30, 2018 at 03:30:02PM +0000, Paul Durrant wrote:
> > > -----Original Message-----
> > > From: Roger Pau Monne
> > > Sent: 30 April 2018 16:28
> > > To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> > > Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; qemu-block@xxxxxxxxxx; qemu-
> > > devel@xxxxxxxxxx; Anthony Perard <anthony.perard@xxxxxxxxxx>;
> Kevin
> > > Wolf <kwolf@xxxxxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>;
> Max
> > > Reitz <mreitz@xxxxxxxxxx>
> > > Subject: Re: [Xen-devel] [PATCH 2/4] block/xen_disk: remove use of
> grant
> > > map/unmap
> > >
> > > On Mon, Apr 30, 2018 at 04:16:52PM +0100, Paul Durrant wrote:
> > > > > -----Original Message-----
> > > > > From: Roger Pau Monne
> > > > > Sent: 30 April 2018 16:12
> > > > > To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> > > > > Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx; qemu-block@xxxxxxxxxx; qemu-
> > > > > devel@xxxxxxxxxx; Anthony Perard <anthony.perard@xxxxxxxxxx>;
> > > Kevin
> > > > > Wolf <kwolf@xxxxxxxxxx>; Stefano Stabellini
> <sstabellini@xxxxxxxxxx>;
> > > Max
> > > > > Reitz <mreitz@xxxxxxxxxx>
> > > > > Subject: Re: [Xen-devel] [PATCH 2/4] block/xen_disk: remove use of
> > > grant
> > > > > map/unmap
> > > > >
> > > > > On Mon, Apr 30, 2018 at 01:01:37PM +0100, Paul Durrant wrote:
> > > > > > The grant copy operation was added to libxengnttab in Xen 4.8.0. If
> > > grant
> > > > > > copy is available then data from the guest will be copied rather 
> > > > > > than
> > > > > > mapped.
> > > > > > The xen_disk source can be significantly simplified by removing this
> > > now
> > > > > > redundant code.
> > > > >
> > > > > Hm, I know this is a PITA, but FreeBSD gntdev hasn't implemented the
> > > > > grant-copy operation yet.
> > > > >
> > > > > I could try to implement it, but I can't make any promises on the time
> > > > > ATM, since I'm quite busy.
> > > > >
> > > >
> > > > I guess we could carry a compat patch in QEMU that implements grant
> copy
> > > by doing a map/memcpy/unmap , but QEMU feels like the wrong place
> for
> > > that. I could try putting together a similar patch for the freebsd.c
> component
> > > of libxengnttab in the xen source rather than it simply failing with 
> > > ENOSYS
> as
> > > it does now. Would either of those help?
> > >
> > > Maybe this could be implemented in gnttab_core.c, so it can also be
> > > used by MiniOS and Linux versions not supporting the copy ioctl as a
> > > fallback?
> >
> > That sounds like a reasonable idea. I'll put something together so that it 
> > can
> go in early in 4.12.
> >
> 
> This will not work if XSM disallows grant map but allows grant copy.
> Not sure how important that is.

I think it's just 'tough' at that point. This is only compat and there'd be no 
change from using current QEMU (which would issue the grant maps directly).

  Cheers,

    Paul

> 
> Wei.
> 
> >   Paul
> >
> > >
> > > Roger.
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxxx
> > https://lists.xenproject.org/mailman/listinfo/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.