Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-10-21 Thread Luke Gorrie
Hi all, Back in May we talked about efficiently connecting a user-space Ethernet switch to QEMU guests. Stefan Hajnoczi sketched the design of a userspace version of vhost that uses a Unix socket for its control interface. His design is in the mail quoted below. I'd like to ask you: if this featu

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-30 Thread Julian Stecklina
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/30/2013 08:46 AM, Stefan Hajnoczi wrote: > On Wed, May 29, 2013 at 6:02 PM, Julian Stecklina > wrote: >> On 05/29/2013 04:21 PM, Stefan Hajnoczi wrote: >>> The fact that a single switch process has shared memory access >>> to all guests' RAM is

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread Michael S. Tsirkin
On Thu, May 30, 2013 at 08:46:42AM +0200, Stefan Hajnoczi wrote: > On Wed, May 29, 2013 at 6:02 PM, Julian Stecklina > wrote: > > On 05/29/2013 04:21 PM, Stefan Hajnoczi wrote: > >> The fact that a single switch process has shared memory access to all > >> guests' RAM is critical. If the switch p

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread Stefan Hajnoczi
On Wed, May 29, 2013 at 6:02 PM, Julian Stecklina wrote: > On 05/29/2013 04:21 PM, Stefan Hajnoczi wrote: >> The fact that a single switch process has shared memory access to all >> guests' RAM is critical. If the switch process is exploited, then that >> exposes other guests' data! (Think of a

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread ronnie sahlberg
Julian, Stefan's concerns are valid. (Hopefully, kernel is harder to exploit and more carefully audited.) On Wed, May 29, 2013 at 9:02 AM, Julian Stecklina wrote: > On 05/29/2013 04:21 PM, Stefan Hajnoczi wrote: >> The fact that a single switch process has shared memory access to all >> gues

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread Julian Stecklina
On 05/29/2013 04:21 PM, Stefan Hajnoczi wrote: > The fact that a single switch process has shared memory access to all > guests' RAM is critical. If the switch process is exploited, then that > exposes other guests' data! (Think of a multi-tenant host with guests > belonging to different users.)

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread Julian Stecklina
On 05/29/2013 04:31 PM, Stefan Hajnoczi wrote: > On Wed, May 29, 2013 at 02:32:50PM +0200, Julian Stecklina wrote: >> On 05/28/2013 07:00 PM, Anthony Liguori wrote: >>> We aren't going to support any interface that enables out of tree >>> devices. This is just plugins in a different form with even

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread Michael S. Tsirkin
On Wed, May 29, 2013 at 04:21:43PM +0200, Stefan Hajnoczi wrote: > On Wed, May 29, 2013 at 12:08:59PM +0300, Michael S. Tsirkin wrote: > > On Wed, May 29, 2013 at 09:49:29AM +0200, Stefan Hajnoczi wrote: > > > On Tue, May 28, 2013 at 08:17:42PM +0300, Michael S. Tsirkin wrote: > > > > On Tue, May 2

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread Stefan Hajnoczi
On Wed, May 29, 2013 at 02:32:50PM +0200, Julian Stecklina wrote: > On 05/28/2013 07:00 PM, Anthony Liguori wrote: > > We aren't going to support any interface that enables out of tree > > devices. This is just plugins in a different form with even more > > downsides. You cannot easily keep track

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread Stefan Hajnoczi
On Wed, May 29, 2013 at 12:08:59PM +0300, Michael S. Tsirkin wrote: > On Wed, May 29, 2013 at 09:49:29AM +0200, Stefan Hajnoczi wrote: > > On Tue, May 28, 2013 at 08:17:42PM +0300, Michael S. Tsirkin wrote: > > > On Tue, May 28, 2013 at 12:00:38PM -0500, Anthony Liguori wrote: > > > > Julian Steckl

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread Julian Stecklina
On 05/28/2013 07:00 PM, Anthony Liguori wrote: > We aren't going to support any interface that enables out of tree > devices. This is just plugins in a different form with even more > downsides. You cannot easily keep track of dirty info, the guest > physical address translation to host is diffic

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread Stefano Stabellini
On Wed, 29 May 2013, Michael S. Tsirkin wrote: > On Wed, May 29, 2013 at 11:31:50AM +0100, Stefano Stabellini wrote: > > On Tue, 28 May 2013, Anthony Liguori wrote: > > > "Michael S. Tsirkin" writes: > > > > > > > On Tue, May 28, 2013 at 12:00:38PM -0500, Anthony Liguori wrote: > > > >> Julian St

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread Michael S. Tsirkin
On Wed, May 29, 2013 at 11:31:50AM +0100, Stefano Stabellini wrote: > On Tue, 28 May 2013, Anthony Liguori wrote: > > "Michael S. Tsirkin" writes: > > > > > On Tue, May 28, 2013 at 12:00:38PM -0500, Anthony Liguori wrote: > > >> Julian Stecklina writes: > > >> > > >> > > >> I don't see any com

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread Stefano Stabellini
On Tue, 28 May 2013, Anthony Liguori wrote: > "Michael S. Tsirkin" writes: > > > On Tue, May 28, 2013 at 12:00:38PM -0500, Anthony Liguori wrote: > >> Julian Stecklina writes: > >> > >> > >> I don't see any compelling reason to do something like this. It's > >> jumping through a tremendous nu

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread Michael S. Tsirkin
On Wed, May 29, 2013 at 09:49:29AM +0200, Stefan Hajnoczi wrote: > On Tue, May 28, 2013 at 08:17:42PM +0300, Michael S. Tsirkin wrote: > > On Tue, May 28, 2013 at 12:00:38PM -0500, Anthony Liguori wrote: > > > Julian Stecklina writes: > > > > > > > On 05/28/2013 12:10 PM, Luke Gorrie wrote: > > >

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-29 Thread Stefan Hajnoczi
On Tue, May 28, 2013 at 08:17:42PM +0300, Michael S. Tsirkin wrote: > On Tue, May 28, 2013 at 12:00:38PM -0500, Anthony Liguori wrote: > > Julian Stecklina writes: > > > > > On 05/28/2013 12:10 PM, Luke Gorrie wrote: > > >> On 27 May 2013 11:34, Stefan Hajnoczi > >> >

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-28 Thread Anthony Liguori
"Michael S. Tsirkin" writes: > On Tue, May 28, 2013 at 12:00:38PM -0500, Anthony Liguori wrote: >> Julian Stecklina writes: >> >> >> I don't see any compelling reason to do something like this. It's >> jumping through a tremendous number of hoops to avoid putting code that >> belongs in QEMU

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 12:00:38PM -0500, Anthony Liguori wrote: > Julian Stecklina writes: > > > On 05/28/2013 12:10 PM, Luke Gorrie wrote: > >> On 27 May 2013 11:34, Stefan Hajnoczi >> > wrote: > >> > >> vhost_net is about connecting the a virtio-net speaking p

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-28 Thread Anthony Liguori
Julian Stecklina writes: > On 05/28/2013 12:10 PM, Luke Gorrie wrote: >> On 27 May 2013 11:34, Stefan Hajnoczi > > wrote: >> >> vhost_net is about connecting the a virtio-net speaking process to a >> tun-like device. The problem you are trying to solve is con

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 05:35:55PM +0200, Julian Stecklina wrote: > On 05/28/2013 03:56 PM, Michael S. Tsirkin wrote: > > and in fact that was how vhost worked originally. > > There were some issues to be fixed before it worked > > without issues, but we do plan to go back to that I think. > > Do

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-28 Thread Julian Stecklina
On 05/28/2013 03:56 PM, Michael S. Tsirkin wrote: > and in fact that was how vhost worked originally. > There were some issues to be fixed before it worked > without issues, but we do plan to go back to that I think. Do you know why they abandoned this execution model? Julian signature.asc Des

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 02:09:21PM +0200, Julian Stecklina wrote: > On 05/28/2013 01:53 PM, Michael S. Tsirkin wrote: > > Implementing out of process device logic would absolutely be useful for > > qemu, for security. > > > > Don't expect it to be zero overhead though, latency overhead > > of boun

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-28 Thread Julian Stecklina
On 05/28/2013 01:53 PM, Michael S. Tsirkin wrote: > Implementing out of process device logic would absolutely be useful for > qemu, for security. > > Don't expect it to be zero overhead though, latency overhead > of bouncing each packet through multiple processes would > be especially painful. Cu

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-28 Thread Stefan Hajnoczi
On Tue, May 28, 2013 at 12:10:50PM +0200, Luke Gorrie wrote: > On 27 May 2013 11:34, Stefan Hajnoczi wrote: > > > vhost_net is about connecting the a virtio-net speaking process to a > > tun-like device. The problem you are trying to solve is connecting a > > virtio-net speaking process to Snabb

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-28 Thread Michael S. Tsirkin
On Tue, May 28, 2013 at 01:36:36PM +0200, Julian Stecklina wrote: > On 05/28/2013 12:10 PM, Luke Gorrie wrote: > > On 27 May 2013 11:34, Stefan Hajnoczi > > wrote: > > > > vhost_net is about connecting the a virtio-net speaking process to a > > tun-like device.

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-28 Thread Julian Stecklina
On 05/28/2013 12:10 PM, Luke Gorrie wrote: > On 27 May 2013 11:34, Stefan Hajnoczi > wrote: > > vhost_net is about connecting the a virtio-net speaking process to a > tun-like device. The problem you are trying to solve is connecting a > virtio-net speakin

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-28 Thread Luke Gorrie
Hi Anthony, On 27 May 2013 18:18, Anthony Liguori wrote: > It would be very interesting to combine this with vmsplice/splice. > Good point. This kernel-centric approach is a very promising one, though not the design we are exploring in the Snabb Switch project. Snabb Switch is instead very har

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-28 Thread Stefan Hajnoczi
On Tue, May 28, 2013 at 12:10 PM, Luke Gorrie wrote: > On 27 May 2013 11:34, Stefan Hajnoczi wrote: >> >> vhost_net is about connecting the a virtio-net speaking process to a >> tun-like device. The problem you are trying to solve is connecting a >> virtio-net speaking process to Snabb Switch. >

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-28 Thread Luke Gorrie
On 27 May 2013 11:34, Stefan Hajnoczi wrote: > vhost_net is about connecting the a virtio-net speaking process to a > tun-like device. The problem you are trying to solve is connecting a > virtio-net speaking process to Snabb Switch. > Yep! > Either you need to replace vhost or you need a tun

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-27 Thread Anthony Liguori
On Mon, May 27, 2013 at 12:13 PM, Michael S. Tsirkin wrote: > > On Mon, May 27, 2013 at 12:01:07PM -0500, Anthony Liguori wrote: > > Paolo Bonzini writes: > > > > Finally, the destination QEMU process can vmsplice() from the pipe which > > will copy the data (this is the only copy). > > AFAIK spl

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-27 Thread Michael S. Tsirkin
On Mon, May 27, 2013 at 12:01:07PM -0500, Anthony Liguori wrote: > Paolo Bonzini writes: > > > Il 27/05/2013 18:18, Anthony Liguori ha scritto: > >> Paolo Bonzini writes: > >> > >>> Il 27/05/2013 11:34, Stefan Hajnoczi ha scritto: > On Sun, May 26, 2013 at 11:32:49AM +0200, Luke Gorrie wro

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-27 Thread Anthony Liguori
Paolo Bonzini writes: > Il 27/05/2013 18:18, Anthony Liguori ha scritto: >> Paolo Bonzini writes: >> >>> Il 27/05/2013 11:34, Stefan Hajnoczi ha scritto: On Sun, May 26, 2013 at 11:32:49AM +0200, Luke Gorrie wrote: > Stefan put us onto the highly promising track of vhost/virtio. We hav

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-27 Thread Paolo Bonzini
Il 27/05/2013 18:18, Anthony Liguori ha scritto: > Paolo Bonzini writes: > >> Il 27/05/2013 11:34, Stefan Hajnoczi ha scritto: >>> On Sun, May 26, 2013 at 11:32:49AM +0200, Luke Gorrie wrote: Stefan put us onto the highly promising track of vhost/virtio. We have implemented this between

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-27 Thread Anthony Liguori
Paolo Bonzini writes: > Il 27/05/2013 11:34, Stefan Hajnoczi ha scritto: >> On Sun, May 26, 2013 at 11:32:49AM +0200, Luke Gorrie wrote: >>> Stefan put us onto the highly promising track of vhost/virtio. We have >>> implemented this between Snabb Switch and the Linux kernel, but not >>> directly

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-27 Thread Paolo Bonzini
Il 27/05/2013 11:34, Stefan Hajnoczi ha scritto: > On Sun, May 26, 2013 at 11:32:49AM +0200, Luke Gorrie wrote: >> Stefan put us onto the highly promising track of vhost/virtio. We have >> implemented this between Snabb Switch and the Linux kernel, but not >> directly between Snabb Switch and QEMU

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-27 Thread Michael S. Tsirkin
On Mon, May 27, 2013 at 11:34:09AM +0200, Stefan Hajnoczi wrote: > On Sun, May 26, 2013 at 11:32:49AM +0200, Luke Gorrie wrote: > > Stefan put us onto the highly promising track of vhost/virtio. We have > > implemented this between Snabb Switch and the Linux kernel, but not > > directly between Sna

Re: [Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-27 Thread Stefan Hajnoczi
On Sun, May 26, 2013 at 11:32:49AM +0200, Luke Gorrie wrote: > Stefan put us onto the highly promising track of vhost/virtio. We have > implemented this between Snabb Switch and the Linux kernel, but not > directly between Snabb Switch and QEMU guests. The "roadblock" we have hit > is embarrasingly

[Qemu-devel] snabbswitch integration with QEMU for userspace ethernet I/O

2013-05-26 Thread Luke Gorrie
Dear qemu-devel hackers, I am writing to ask for some technical advice. I am making embarrassingly slow progress on finding a good way to integrate the Snabb Switch user-space ethernet switch (http://snabb.co/snabbswitch/) with QEMU for efficient ethernet I/O. Stefan put us onto the highly promis