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

2009-09-15 Thread Gregory Haskins
Michael S. Tsirkin wrote: > On Tue, Sep 15, 2009 at 05:39:27PM -0400, Gregory Haskins wrote: >> Michael S. Tsirkin wrote: >>> On Tue, Sep 15, 2009 at 04:43:58PM -0400, Gregory Haskins wrote: Michael S. Tsirkin wrote: > On Tue, Sep 15, 2009 at 04:08:23PM -0400, Gregory Haskins wrote: >>

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

2009-09-15 Thread Michael S. Tsirkin
On Tue, Sep 15, 2009 at 05:39:27PM -0400, Gregory Haskins wrote: > Michael S. Tsirkin wrote: > > On Tue, Sep 15, 2009 at 04:43:58PM -0400, Gregory Haskins wrote: > >> Michael S. Tsirkin wrote: > >>> On Tue, Sep 15, 2009 at 04:08:23PM -0400, Gregory Haskins wrote: > No, what I mean is how do yo

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

2009-09-15 Thread Gregory Haskins
Michael S. Tsirkin wrote: > On Tue, Sep 15, 2009 at 04:43:58PM -0400, Gregory Haskins wrote: >> Michael S. Tsirkin wrote: >>> On Tue, Sep 15, 2009 at 04:08:23PM -0400, Gregory Haskins wrote: No, what I mean is how do you surface multiple ethernet and consoles to the guests? For Ira's cas

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

2009-09-15 Thread Michael S. Tsirkin
On Tue, Sep 15, 2009 at 04:43:58PM -0400, Gregory Haskins wrote: > Michael S. Tsirkin wrote: > > On Tue, Sep 15, 2009 at 04:08:23PM -0400, Gregory Haskins wrote: > >> No, what I mean is how do you surface multiple ethernet and consoles to > >> the guests? For Ira's case, I think he needs at minimu

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

2009-09-15 Thread Gregory Haskins
Michael S. Tsirkin wrote: > On Tue, Sep 15, 2009 at 04:08:23PM -0400, Gregory Haskins wrote: >> No, what I mean is how do you surface multiple ethernet and consoles to >> the guests? For Ira's case, I think he needs at minimum at least one of >> each, and he mentioned possibly having two unique et

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

2009-09-15 Thread Michael S. Tsirkin
On Tue, Sep 15, 2009 at 04:08:23PM -0400, Gregory Haskins wrote: > No, what I mean is how do you surface multiple ethernet and consoles to > the guests? For Ira's case, I think he needs at minimum at least one of > each, and he mentioned possibly having two unique ethernets at one point. > > His

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

2009-09-15 Thread Gregory Haskins
Avi Kivity wrote: > On 09/15/2009 04:50 PM, Gregory Haskins wrote: >>> Why? vhost will call get_user_pages() or copy_*_user() which ought to >>> do the right thing. >>> >> I was speaking generally, not specifically to Ira's architecture. What >> I mean is that vbus was designed to work with

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

2009-09-15 Thread Avi Kivity
On 09/15/2009 04:50 PM, Gregory Haskins wrote: >> Why? vhost will call get_user_pages() or copy_*_user() which ought to >> do the right thing. >> > I was speaking generally, not specifically to Ira's architecture. What > I mean is that vbus was designed to work without assuming that the > m

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

2009-09-15 Thread Michael S. Tsirkin
On Tue, Sep 15, 2009 at 09:50:39AM -0400, Gregory Haskins wrote: > Avi Kivity wrote: > > On 09/15/2009 04:03 PM, Gregory Haskins wrote: > >> > >>> In this case the x86 is the owner and the ppc boards use translated > >>> access. Just switch drivers and device and it falls into place. > >>> > >>>

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

2009-09-15 Thread Anthony Liguori
Gerd Hoffmann wrote: >> Userspace can detect when new virtio-consoles appear via udev events. >> When it sees a new ttyVN, it can then look in sysfs to discover it's >> name. > > No. udev can create symlinks for you, so apps don't have to dig into > sysfs. You'll need a rule along the lines (un

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

2009-09-15 Thread Gerd Hoffmann
On 09/15/09 14:57, Anthony Liguori wrote: > That's probably not what we want. I imagine what we want is: > > /dev/ttyV0 > /dev/ttyV1 > /dev/ttyVN Yes. > And then we want: > > /sys/class/virtio-console/ttyV0/name -> "org.qemu.clipboard" Yes. > Userspace can detect when new virtio-consoles appear

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

2009-09-15 Thread Gregory Haskins
Avi Kivity wrote: > On 09/15/2009 04:03 PM, Gregory Haskins wrote: >> >>> In this case the x86 is the owner and the ppc boards use translated >>> access. Just switch drivers and device and it falls into place. >>> >>> >> You could switch vbus roles as well, I suppose. > > Right, there's not

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

2009-09-15 Thread Anthony Liguori
Amit Shah wrote: > On (Tue) Sep 15 2009 [07:57:10], Anthony Liguori wrote: > >> Amit Shah wrote: >> >>> Hey Greg, >>> >>> Can you tell me how this could work out -- each console port could have >>> a "role" string associated with it (obtainable from the invoking qemu >>> process in case of

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

2009-09-15 Thread Avi Kivity
On 09/15/2009 04:03 PM, Gregory Haskins wrote: > >> In this case the x86 is the owner and the ppc boards use translated >> access. Just switch drivers and device and it falls into place. >> >> > You could switch vbus roles as well, I suppose. Right, there's not real difference in this regar

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

2009-09-15 Thread Amit Shah
On (Tue) Sep 15 2009 [07:57:10], Anthony Liguori wrote: > Amit Shah wrote: >> Hey Greg, >> >> Can you tell me how this could work out -- each console port could have >> a "role" string associated with it (obtainable from the invoking qemu >> process in case of qemu/kvm). Something that I have in mi

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

2009-09-15 Thread Gregory Haskins
Avi Kivity wrote: > On 09/14/2009 10:14 PM, Gregory Haskins wrote: >> To reiterate, as long as the model is such that the ppc boards are >> considered the "owner" (direct access, no translation needed) I believe >> it will work. If the pointers are expected to be owned by the host, >> then my mode

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

2009-09-15 Thread Anthony Liguori
Amit Shah wrote: > Hey Greg, > > Can you tell me how this could work out -- each console port could have > a "role" string associated with it (obtainable from the invoking qemu > process in case of qemu/kvm). Something that I have in mind currently > is: > > $ qemu-kvm ... -virtioconsole role=org/q

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

2009-09-15 Thread Amit Shah
[Adding Greg to the CC list] On (Fri) Sep 11 2009 [17:00:10], Alan Cox wrote: > > The interface presented to guest userspace is of a simple char > > device, so it can be used like this: > > > > fd = open("/dev/vcon2", O_RDWR); > > ret = read(fd, buf, 100); > > ret = write(fd, string,

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

2009-09-15 Thread Avi Kivity
On 09/14/2009 10:14 PM, Gregory Haskins wrote: > To reiterate, as long as the model is such that the ppc boards are > considered the "owner" (direct access, no translation needed) I believe > it will work. If the pointers are expected to be owned by the host, > then my model doesn't work well eith

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

2009-09-15 Thread Avi Kivity
On 09/14/2009 07:47 PM, Michael S. Tsirkin wrote: > On Mon, Sep 14, 2009 at 12:08:55PM -0400, Gregory Haskins wrote: > >> For Ira's example, the addresses would represent a physical address on >> the PCI boards, and would follow any kind of relevant rules for >> converting a "GPA" to a host acc