Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-07-15 Thread Stefan Hajnoczi
On Wed, Jul 01, 2020 at 11:23:25PM -0700, John G Johnson wrote: > > We’ve made the review changes to the doc, and moved to RST format, > so the doc can go into the QEMU sources. > > Thanos & JJ > > > https://github.com/tmakatos/qemu/blob/mast

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-07-01 Thread John G Johnson
We’ve made the review changes to the doc, and moved to RST format, so the doc can go into the QEMU sources. Thanos & JJ https://github.com/tmakatos/qemu/blob/master/docs/devel/vfio-over-socket.rst

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-06-26 Thread Stefan Hajnoczi
On Thu, Jun 25, 2020 at 08:54:25PM -0700, John G Johnson wrote: > > > > On Jun 23, 2020, at 5:27 AM, Stefan Hajnoczi wrote: > > > > On Thu, Jun 18, 2020 at 02:38:04PM -0700, John G Johnson wrote: > >>> On Jun 15, 2020, at 3:49 AM, Stefan Hajnoczi wrote: > >>> An issue with file descriptor pass

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-06-25 Thread John G Johnson
> On Jun 23, 2020, at 5:27 AM, Stefan Hajnoczi wrote: > > On Thu, Jun 18, 2020 at 02:38:04PM -0700, John G Johnson wrote: >>> On Jun 15, 2020, at 3:49 AM, Stefan Hajnoczi wrote: >>> An issue with file descriptor passing is that it's hard to revoke access >>> once the file descriptor has been

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-06-23 Thread Stefan Hajnoczi
On Thu, Jun 18, 2020 at 02:38:04PM -0700, John G Johnson wrote: > > On Jun 15, 2020, at 3:49 AM, Stefan Hajnoczi wrote: > > An issue with file descriptor passing is that it's hard to revoke access > > once the file descriptor has been passed. memfd supports sealing with > > fnctl(F_ADD_SEALS) it d

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-06-18 Thread John G Johnson
> On Jun 15, 2020, at 3:49 AM, Stefan Hajnoczi wrote: > > > It's challenging to implement a fast and secure IOMMU. The simplest > approach is secure but not fast: add protocol messages for > DMA_READ(iova, length) and DMA_WRITE(iova, buffer, length). > We do have protocol messages f

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-06-15 Thread Stefan Hajnoczi
On Tue, Jun 09, 2020 at 11:25:41PM -0700, John G Johnson wrote: > > On Jun 2, 2020, at 8:06 AM, Alex Williamson > > wrote: > > > > On Wed, 20 May 2020 17:45:13 -0700 > > John G Johnson wrote: > > > >>> I'm confused by VFIO_USER_ADD_MEMORY_REGION vs VFIO_USER_IOMMU_MAP_DMA. > >>> The former see

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-06-09 Thread John G Johnson
> On Jun 2, 2020, at 8:06 AM, Alex Williamson > wrote: > > On Wed, 20 May 2020 17:45:13 -0700 > John G Johnson wrote: > >>> I'm confused by VFIO_USER_ADD_MEMORY_REGION vs VFIO_USER_IOMMU_MAP_DMA. >>> The former seems intended to provide the server with access to the >>> entire GPA space, wh

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-06-02 Thread Alex Williamson
On Wed, 20 May 2020 17:45:13 -0700 John G Johnson wrote: > > I'm confused by VFIO_USER_ADD_MEMORY_REGION vs VFIO_USER_IOMMU_MAP_DMA. > > The former seems intended to provide the server with access to the > > entire GPA space, while the latter indicates an IOVA to GPA mapping of > > those regions.

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-05-20 Thread John G Johnson
> I'm confused by VFIO_USER_ADD_MEMORY_REGION vs VFIO_USER_IOMMU_MAP_DMA. > The former seems intended to provide the server with access to the > entire GPA space, while the latter indicates an IOVA to GPA mapping of > those regions. Doesn't this break the basic isolation of a vIOMMU? > This ess

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-05-14 Thread Alex Williamson
On Thu, 14 May 2020 09:32:15 -0700 John G Johnson wrote: > Thanos and I have made some changes to the doc in response to the > feedback we’ve received. The biggest difference is that it is less reliant > on the reader being familiar with the current VFIO implementation. We’d > appreciate

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-05-14 Thread John G Johnson
Thanos and I have made some changes to the doc in response to the feedback we’ve received. The biggest difference is that it is less reliant on the reader being familiar with the current VFIO implementation. We’d appreciate any additional feedback you could give on the changes. Thanks

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-05-11 Thread Stefan Hajnoczi
On Mon, May 04, 2020 at 10:49:11AM -0700, John G Johnson wrote: > > > > On May 4, 2020, at 2:45 AM, Stefan Hajnoczi wrote: > > > > On Fri, May 01, 2020 at 04:28:25PM +0100, Daniel P. Berrangé wrote: > >> On Fri, May 01, 2020 at 03:01:01PM +, Felipe Franciosi wrote: > >>> Hi, > >>> > O

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-05-04 Thread John G Johnson
> On May 4, 2020, at 2:45 AM, Stefan Hajnoczi wrote: > > On Fri, May 01, 2020 at 04:28:25PM +0100, Daniel P. Berrangé wrote: >> On Fri, May 01, 2020 at 03:01:01PM +, Felipe Franciosi wrote: >>> Hi, >>> On Apr 30, 2020, at 4:20 PM, Thanos Makatos wrote: >>> More impor

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-05-04 Thread Stefan Hajnoczi
On Fri, May 01, 2020 at 04:28:25PM +0100, Daniel P. Berrangé wrote: > On Fri, May 01, 2020 at 03:01:01PM +, Felipe Franciosi wrote: > > Hi, > > > > > On Apr 30, 2020, at 4:20 PM, Thanos Makatos > > > wrote: > > > > > More importantly, considering: > > a) Marc-André's comments abou

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-05-01 Thread Daniel P . Berrangé
On Fri, May 01, 2020 at 03:01:01PM +, Felipe Franciosi wrote: > Hi, > > > On Apr 30, 2020, at 4:20 PM, Thanos Makatos > > wrote: > > > More importantly, considering: > a) Marc-André's comments about data alignment etc., and > b) the possibility to run the server on another gu

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-05-01 Thread Felipe Franciosi
Hi, > On Apr 30, 2020, at 4:20 PM, Thanos Makatos > wrote: > More importantly, considering: a) Marc-André's comments about data alignment etc., and b) the possibility to run the server on another guest or host, we won't be able to use native VFIO types. If we do want to supp

RE: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-04-30 Thread Thanos Makatos
> > > More importantly, considering: > > > a) Marc-André's comments about data alignment etc., and > > > b) the possibility to run the server on another guest or host, > > > we won't be able to use native VFIO types. If we do want to support that > > > then > > > we'll have to redefine all data for

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-04-30 Thread Daniel P . Berrangé
On Thu, Apr 30, 2020 at 11:23:34AM +, Thanos Makatos wrote: > > > > I've just shared with you the Google doc we've working on with John > > > where we've > > > > been drafting the protocol specification, we think it's time for some > > > > first > > > > comments. Please feel free to comment/ed

RE: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-04-30 Thread Thanos Makatos
> > > I've just shared with you the Google doc we've working on with John > > where we've > > > been drafting the protocol specification, we think it's time for some > > > first > > > comments. Please feel free to comment/edit and suggest more people > to > > be on the > > > reviewers list. > > >

RE: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-04-27 Thread Thanos Makatos
> > I've just shared with you the Google doc we've working on with John > where we've > > been drafting the protocol specification, we think it's time for some first > > comments. Please feel free to comment/edit and suggest more people to > be on the > > reviewers list. > > > > You can also find t

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-04-22 Thread Stefan Hajnoczi
On Mon, Apr 20, 2020 at 11:05:25AM +, Thanos Makatos wrote: > > In order to interoperate we'll need to maintain a protocol > > specification. Mayb You and JJ could put that together and CC the vfio, > > rust-vmm, and QEMU communities for discussion? > > > > It should cover the UNIX domain soc

RE: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-04-20 Thread Thanos Makatos
> In order to interoperate we'll need to maintain a protocol > specification. Mayb You and JJ could put that together and CC the vfio, > rust-vmm, and QEMU communities for discussion? > > It should cover the UNIX domain socket connection semantics (does a > listen socket only accept 1 connection

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-04-03 Thread Stefan Hajnoczi
On Thu, Apr 02, 2020 at 11:46:45AM +0100, Daniel P. Berrangé wrote: > On Thu, Apr 02, 2020 at 11:19:42AM +0100, Stefan Hajnoczi wrote: > > On Wed, Apr 01, 2020 at 06:58:20PM +0200, Marc-André Lureau wrote: > > > On Wed, Apr 1, 2020 at 5:51 PM Thanos Makatos > > > wrote: > > > > > > Bear in mind th

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-04-02 Thread Daniel P . Berrangé
On Thu, Apr 02, 2020 at 11:19:42AM +0100, Stefan Hajnoczi wrote: > On Wed, Apr 01, 2020 at 06:58:20PM +0200, Marc-André Lureau wrote: > > On Wed, Apr 1, 2020 at 5:51 PM Thanos Makatos > > wrote: > > > > > Bear in mind that since this is just a PoC lots of things can break, > > > > > e.g. some > >

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-04-02 Thread Stefan Hajnoczi
On Wed, Apr 01, 2020 at 06:58:20PM +0200, Marc-André Lureau wrote: > On Wed, Apr 1, 2020 at 5:51 PM Thanos Makatos > wrote: > > > On Thu, Mar 26, 2020 at 09:47:38AM +, Thanos Makatos wrote: > > > > Build MUSER with vfio-over-socket: > > > > > > > > git clone --single-branch --branch vf

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-04-01 Thread Marc-André Lureau
Hi On Wed, Apr 1, 2020 at 5:51 PM Thanos Makatos wrote: > > > On Thu, Mar 26, 2020 at 09:47:38AM +, Thanos Makatos wrote: > > > Build MUSER with vfio-over-socket: > > > > > > git clone --single-branch --branch vfio-over-socket > > g...@github.com:tmakatos/muser.git > > > cd mu

RE: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-04-01 Thread Thanos Makatos
> On Thu, Mar 26, 2020 at 09:47:38AM +, Thanos Makatos wrote: > > Build MUSER with vfio-over-socket: > > > > git clone --single-branch --branch vfio-over-socket > g...@github.com:tmakatos/muser.git > > cd muser/ > > git submodule update --init > > make > > > > Ru

Re: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-04-01 Thread Stefan Hajnoczi
On Thu, Mar 26, 2020 at 09:47:38AM +, Thanos Makatos wrote: > Build MUSER with vfio-over-socket: > > git clone --single-branch --branch vfio-over-socket > g...@github.com:tmakatos/muser.git > cd muser/ > git submodule update --init > make > > Run device emulat

RE: RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-03-27 Thread Thanos Makatos
> > Next I explain how to test the PoC. > > Build MUSER with vfio-over-socket: > > git clone --single-branch --branch vfio-over-socket > g...@github.com:tmakatos/muser.git > cd muser/ > git submodule update --init > make Yesterday's version had a bug where it di

RFC: use VFIO over a UNIX domain socket to implement device offloading

2020-03-26 Thread Thanos Makatos
I want to continue the discussion regarding using MUSER (https://github.com/nutanix/muser) as a device offloading mechanism. The main drawback of MUSER is that it requires a kernel module, so I've experimented with a proof of concept of how MUSER would look like if we somehow didn't need a kernel m