Re: [PATCHv2 1/2] mm: export use_mm/unuse_mm to modules

2009-09-16 Thread Andrew Morton
On Thu, 17 Sep 2009 08:38:18 +0300 "Michael S. Tsirkin" wrote: > Hi Andrew, > On Tue, Aug 11, 2009 at 03:10:10PM -0700, Andrew Morton wrote: > > On Wed, 12 Aug 2009 00:27:52 +0300 > > "Michael S. Tsirkin" wrote: > > > > > vhost net module wants to do copy to/from user from a kernel thread, > >

Re: [PATCHv2 1/2] mm: export use_mm/unuse_mm to modules

2009-09-16 Thread Michael S. Tsirkin
Hi Andrew, On Tue, Aug 11, 2009 at 03:10:10PM -0700, Andrew Morton wrote: > On Wed, 12 Aug 2009 00:27:52 +0300 > "Michael S. Tsirkin" wrote: > > > vhost net module wants to do copy to/from user from a kernel thread, > > which needs use_mm (like what fs/aio has). Move that into mm/ and > > export

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Gregory Haskins
Michael S. Tsirkin wrote: > On Wed, Sep 16, 2009 at 10:10:55AM -0400, Gregory Haskins wrote: >>> There is no role reversal. >> So if I have virtio-blk driver running on the x86 and vhost-blk device >> running on the ppc board, I can use the ppc board as a block-device. >> What if I really wanted to

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Michael S. Tsirkin
On Wed, Sep 16, 2009 at 10:10:55AM -0400, Gregory Haskins wrote: > > There is no role reversal. > > So if I have virtio-blk driver running on the x86 and vhost-blk device > running on the ppc board, I can use the ppc board as a block-device. > What if I really wanted to go the other way? It seems

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Gregory Haskins
Avi Kivity wrote: > On 09/16/2009 10:22 PM, Gregory Haskins wrote: >> Avi Kivity wrote: >> >>> On 09/16/2009 05:10 PM, Gregory Haskins wrote: >>> > If kvm can do it, others can. > > The problem is that you seem to either hand-wave over details like this,

Re: [PATCH] virtio_console: Add support for multiple ports for generic guest and host communication

2009-09-16 Thread Anthony Liguori
Alan Cox wrote: >> This device is very much a serial port. I don't see any reason not >> to treat it like one. >> > > Here are a few > > - You don't need POSIX multi-open semantics, hangup and the like > We do actually want hangup and a few other of the tty specific ops. The only thing

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Avi Kivity
On 09/16/2009 10:22 PM, Gregory Haskins wrote: > Avi Kivity wrote: > >> On 09/16/2009 05:10 PM, Gregory Haskins wrote: >> If kvm can do it, others can. >>> The problem is that you seem to either hand-wave over details like this, >>> or you give details that are pr

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Gregory Haskins
Avi Kivity wrote: > On 09/16/2009 05:10 PM, Gregory Haskins wrote: >> >>> If kvm can do it, others can. >>> >> The problem is that you seem to either hand-wave over details like this, >> or you give details that are pretty much exactly what vbus does already. >> My point is that I've alread

Re: vhost-net todo list

2009-09-16 Thread Avi Kivity
On 09/16/2009 06:27 PM, Arnd Bergmann wrote: > That scenario is probably not so relevant for KVM, unless you > consider the guest taking over the qemu host process a valid > security threat. > It is. We address it by using SCM_RIGHTS for all sensitive operations and selinuxing qemu as tightl

Re: vhost-net todo list

2009-09-16 Thread Michael S. Tsirkin
On Wed, Sep 16, 2009 at 05:27:25PM +0200, Arnd Bergmann wrote: > On Wednesday 16 September 2009, Michael S. Tsirkin wrote: > > > > > > No, I think this is less important, because the bridge code > > > also doesn't do this. > > > > True, but the reason might be that it is much harder in bridge (yo

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Michael S. Tsirkin
On Wed, Sep 16, 2009 at 05:22:37PM +0200, Arnd Bergmann wrote: > On Wednesday 16 September 2009, Michael S. Tsirkin wrote: > > On Wed, Sep 16, 2009 at 04:57:42PM +0200, Arnd Bergmann wrote: > > > On Tuesday 15 September 2009, Michael S. Tsirkin wrote: > > > > Userspace in x86 maps a PCI region, use

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Avi Kivity
On 09/16/2009 05:10 PM, Gregory Haskins wrote: > >> If kvm can do it, others can. >> > The problem is that you seem to either hand-wave over details like this, > or you give details that are pretty much exactly what vbus does already. > My point is that I've already sat down and thought abo

Re: vhost-net todo list

2009-09-16 Thread Arnd Bergmann
On Wednesday 16 September 2009, Michael S. Tsirkin wrote: > > > > No, I think this is less important, because the bridge code > > also doesn't do this. > > True, but the reason might be that it is much harder in bridge (you have > to snoop multicast registrations). With macvlan you know which > m

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Arnd Bergmann
On Wednesday 16 September 2009, Michael S. Tsirkin wrote: > On Wed, Sep 16, 2009 at 04:57:42PM +0200, Arnd Bergmann wrote: > > On Tuesday 15 September 2009, Michael S. Tsirkin wrote: > > > Userspace in x86 maps a PCI region, uses it for communication with ppc? > > > > This might have portability i

Re: vhost-net todo list

2009-09-16 Thread Michael S. Tsirkin
On Wed, Sep 16, 2009 at 05:08:46PM +0200, Arnd Bergmann wrote: > On Wednesday 16 September 2009, Michael S. Tsirkin wrote: > > On Wed, Sep 16, 2009 at 04:52:40PM +0200, Arnd Bergmann wrote: > > > On Wednesday 16 September 2009, Michael S. Tsirkin wrote: > > > > vhost-net driver projects > > > > >

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Michael S. Tsirkin
On Wed, Sep 16, 2009 at 04:57:42PM +0200, Arnd Bergmann wrote: > On Tuesday 15 September 2009, Michael S. Tsirkin wrote: > > Userspace in x86 maps a PCI region, uses it for communication with ppc? > > This might have portability issues. On x86 it should work, but if the > host is powerpc or simila

Re: vhost-net todo list

2009-09-16 Thread Arnd Bergmann
On Wednesday 16 September 2009, Michael S. Tsirkin wrote: > On Wed, Sep 16, 2009 at 04:52:40PM +0200, Arnd Bergmann wrote: > > On Wednesday 16 September 2009, Michael S. Tsirkin wrote: > > > vhost-net driver projects > > > > I still think that list should include > > Yea, why not. Go wild. > > >

Re: vhost-net todo list

2009-09-16 Thread Michael S. Tsirkin
On Wed, Sep 16, 2009 at 04:52:40PM +0200, Arnd Bergmann wrote: > On Wednesday 16 September 2009, Michael S. Tsirkin wrote: > > vhost-net driver projects > > I still think that list should include Why not. But note that including things in a list will not magically make them done :) > - UDP multi

Re: vhost-net todo list

2009-09-16 Thread Michael S. Tsirkin
On Wed, Sep 16, 2009 at 04:52:40PM +0200, Arnd Bergmann wrote: > On Wednesday 16 September 2009, Michael S. Tsirkin wrote: > > vhost-net driver projects > > I still think that list should include Yea, why not. Go wild. > - UDP multicast socket support > - TCP socket support Switch to UDP unicas

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Arnd Bergmann
On Tuesday 15 September 2009, Michael S. Tsirkin wrote: > Userspace in x86 maps a PCI region, uses it for communication with ppc? This might have portability issues. On x86 it should work, but if the host is powerpc or similar, you cannot reliably access PCI I/O memory through copy_tofrom_user but

Re: vhost-net todo list

2009-09-16 Thread Arnd Bergmann
On Wednesday 16 September 2009, Michael S. Tsirkin wrote: > vhost-net driver projects I still think that list should include - UDP multicast socket support - TCP socket support - raw packet socket support for qemu (from Or Gerlitz) if we have those, plus the tap support that is already on your li

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Gregory Haskins
Avi Kivity wrote: > On 09/16/2009 02:44 PM, Gregory Haskins wrote: >> The problem isn't where to find the models...the problem is how to >> aggregate multiple models to the guest. >> > > You mean configuration? > >>> You instantiate multiple vhost-nets. Multiple ethernet NICs is a >>> suppor

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Avi Kivity
On 09/16/2009 02:44 PM, Gregory Haskins wrote: > The problem isn't where to find the models...the problem is how to > aggregate multiple models to the guest. > You mean configuration? >> You instantiate multiple vhost-nets. Multiple ethernet NICs is a >> supported configuration for kvm. >>

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Gregory Haskins
Avi Kivity wrote: > On 09/15/2009 11:08 PM, Gregory Haskins wrote: >> >>> There's virtio-console, virtio-blk etc. None of these have kernel-mode >>> servers, but these could be implemented if/when needed. >>> >> IIUC, Ira already needs at least ethernet and console capability. >> >> > >

Re: [PATCH] virtio_console: Add support for multiple ports for generic guest and host communication

2009-09-16 Thread Alan Cox
> This device is very much a serial port. I don't see any reason not > to treat it like one. Here are a few - You don't need POSIX multi-open semantics, hangup and the like - Seek makes sense on some kinds of fixed attributes - TTY has a relatively large memory overhead per device - Sysfs is wha

vhost-net todo list

2009-09-16 Thread Michael S. Tsirkin
Some people asked about getting involved with vhost. Here's a short list of projects. vhost-net driver projects - profiling would be very helpful, I have not done any yet - tap support - working on it now - merged buffers - working on it now - scalability/fairness for large # of guests - working

Re: [PATCHv5 3/3] vhost_net: a kernel-level virtio server

2009-09-16 Thread Avi Kivity
On 09/15/2009 11:08 PM, Gregory Haskins wrote: > >> There's virtio-console, virtio-blk etc. None of these have kernel-mode >> servers, but these could be implemented if/when needed. >> > IIUC, Ira already needs at least ethernet and console capability. > > He's welcome to pick up the ne