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

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

2013-05-30 Thread Stefan Hajnoczi
On Wed, May 29, 2013 at 6:02 PM, Julian Stecklina jstec...@os.inf.tu-dresden.de 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

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

2013-05-30 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 jstec...@os.inf.tu-dresden.de 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-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 jstec...@os.inf.tu-dresden.de wrote: On 05/29/2013 04:21 PM, Stefan Hajnoczi wrote: The fact that a single switch process has shared memory access

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 jstec...@os.inf.tu-dresden.de 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-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 jstec...@os.inf.tu-dresden.de writes: On 05/28/2013 12:10 PM, Luke

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 m...@redhat.com writes: On Tue, May 28, 2013 at 12:00:38PM -0500, Anthony Liguori wrote: Julian Stecklina jstec...@os.inf.tu-dresden.de writes: I don't see any compelling reason to do something like this. It's jumping

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 m...@redhat.com writes: On Tue, May 28, 2013 at 12:00:38PM -0500, Anthony Liguori wrote: Julian Stecklina jstec...@os.inf.tu-dresden.de writes:

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 m...@redhat.com writes: On Tue, May 28, 2013 at 12:00:38PM -0500, Anthony Liguori wrote: Julian

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 difficult

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 Stecklina

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 of

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 28, 2013

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 more

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 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 jstec...@os.inf.tu-dresden.de wrote: On 05/29/2013 04:21 PM, Stefan Hajnoczi wrote: The fact that a single switch process has shared

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 stefa...@redhat.com 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

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 luk...@gmail.com wrote: On 27 May 2013 11:34, Stefan Hajnoczi stefa...@redhat.com 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

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 anth...@codemonkey.ws 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

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 stefa...@redhat.com mailto:stefa...@redhat.com 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

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 stefa...@redhat.com mailto:stefa...@redhat.com wrote: vhost_net is about connecting the a virtio-net speaking process to a tun-like

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 stefa...@redhat.com 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

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.

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 bouncing each

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

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 you know

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

2013-05-28 Thread Anthony Liguori
Julian Stecklina jstec...@os.inf.tu-dresden.de writes: On 05/28/2013 12:10 PM, Luke Gorrie wrote: On 27 May 2013 11:34, Stefan Hajnoczi stefa...@redhat.com mailto:stefa...@redhat.com wrote: vhost_net is about connecting the a virtio-net speaking process to a tun-like device. The

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 jstec...@os.inf.tu-dresden.de writes: On 05/28/2013 12:10 PM, Luke Gorrie wrote: On 27 May 2013 11:34, Stefan Hajnoczi stefa...@redhat.com mailto:stefa...@redhat.com wrote: vhost_net is about

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

2013-05-28 Thread Anthony Liguori
Michael S. Tsirkin m...@redhat.com writes: On Tue, May 28, 2013 at 12:00:38PM -0500, Anthony Liguori wrote: Julian Stecklina jstec...@os.inf.tu-dresden.de writes: I don't see any compelling reason to do something like this. It's jumping through a tremendous number of hoops to avoid

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

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 Snabb

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 Anthony Liguori
Paolo Bonzini pbonz...@redhat.com 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

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 pbonz...@redhat.com 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

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

2013-05-27 Thread Anthony Liguori
Paolo Bonzini pbonz...@redhat.com writes: Il 27/05/2013 18:18, Anthony Liguori ha scritto: Paolo Bonzini pbonz...@redhat.com 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

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 pbonz...@redhat.com writes: Il 27/05/2013 18:18, Anthony Liguori ha scritto: Paolo Bonzini pbonz...@redhat.com writes: Il 27/05/2013 11:34, Stefan Hajnoczi ha scritto: On Sun, May 26, 2013 at 11:32:49AM

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 m...@redhat.com wrote: On Mon, May 27, 2013 at 12:01:07PM -0500, Anthony Liguori wrote: Paolo Bonzini pbonz...@redhat.com writes: Finally, the destination QEMU process can vmsplice() from the pipe which will copy the data (this is the

[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