Re: Extending virtio_console to support multiple ports

2009-09-20 Thread Rusty Russell
On Tue, 1 Sep 2009 02:07:05 am Anthony Liguori wrote: Amit Shah wrote: Functionally speaking, both virtio-console and virtio-serial do the same thing. In fact, virtio-console is just a subset of virtio-serial. If there are problems converging the two drivers in Linux, then I suggest you

Re: Extending virtio_console to support multiple ports

2009-08-31 Thread Amit Shah
On (Mon) Aug 31 2009 [08:17:21], Anthony Liguori wrote: - A lock has to be introduced to fetch one unused buffer from the list and pass it on to the host. And this lock has to be a spinlock, just because writes can be called from irq context. I don't see a problem here. You

Re: Extending virtio_console to support multiple ports

2009-08-31 Thread Anthony Liguori
Amit Shah wrote: Can you please explain your rationale for being so rigid about merging the two drivers? Because they do the same thing. I'm not going to constantly rehash this. It's been explained multiple times. If there are implementation issues within the Linux drivers because of

Re: Extending virtio_console to support multiple ports

2009-08-31 Thread Amit Shah
On (Mon) Aug 31 2009 [09:21:13], Anthony Liguori wrote: Amit Shah wrote: Can you please explain your rationale for being so rigid about merging the two drivers? Because they do the same thing. I'm not going to constantly rehash this. It's been explained multiple times. It hardly

Re: Extending virtio_console to support multiple ports

2009-08-31 Thread Anthony Liguori
Amit Shah wrote: On (Mon) Aug 31 2009 [09:21:13], Anthony Liguori wrote: Amit Shah wrote: Can you please explain your rationale for being so rigid about merging the two drivers? Because they do the same thing. I'm not going to constantly rehash this. It's been explained

Re: Extending virtio_console to support multiple ports

2009-08-31 Thread Amit Shah
On (Mon) Aug 31 2009 [10:56:27], Anthony Liguori wrote: Amit Shah wrote: On (Mon) Aug 31 2009 [09:21:13], Anthony Liguori wrote: Amit Shah wrote: Can you please explain your rationale for being so rigid about merging the two drivers? Because they do the same thing. I'm

Re: Extending virtio_console to support multiple ports

2009-08-31 Thread Anthony Liguori
Amit Shah wrote: We're ending up having to compromise on the performance or functionality or simplicity the devices just because of this restriction. This is _not_ a high performance device and there so far has been no functionality impact. I don't understand why you keep dragging

Re: Extending virtio_console to support multiple ports

2009-08-30 Thread Anthony Liguori
Amit Shah wrote: I did think about that as well, but there are problems: - vnc clients (at least tigervnc) wants to receive the entire clipboard in a single flush command. So in the pre-allocated buffers scenario we could run short of the available buffers in some cases. So there will

Re: Extending virtio_console to support multiple ports

2009-08-30 Thread Amit Shah
On (Sun) Aug 30 2009 [07:48:37], Anthony Liguori wrote: Amit Shah wrote: I did think about that as well, but there are problems: - vnc clients (at least tigervnc) wants to receive the entire clipboard in a single flush command. So in the pre-allocated buffers scenario we could run short

Re: Extending virtio_console to support multiple ports

2009-08-28 Thread Anthony Liguori
Amit Shah wrote: On (Tue) Aug 25 2009 [11:47:20], Amit Shah wrote: Hello all, Here is a new iteration of the patch series that implements a transport for guest and host communications. The code has been updated to reuse the virtio-console device instead of creating a new virtio-serial

Re: [Qemu-devel] Re: Extending virtio_console to support multiple ports

2009-08-28 Thread Jamie Lokier
Alan Cox wrote: - Then, are we certain that there's no case where the tty layer will call us with some lock held or in an atomic context ? To be honest, I've totally lost track of the locking rules in tty land lately so it might well be ok, but something to verify. Some of the less

Re: [Qemu-devel] Re: Extending virtio_console to support multiple ports

2009-08-27 Thread Amit Shah
On (Thu) Aug 27 2009 [14:07:03], Benjamin Herrenschmidt wrote: On Wed, 2009-08-26 at 21:15 +0530, Amit Shah wrote: - Convert hvc's usage of spinlocks to mutexes. I've no idea how this will play out; I'm no expert here. But I did try doing this and so far it all looks OK. No

Re: Extending virtio_console to support multiple ports

2009-08-27 Thread Amit Shah
On (Thu) Aug 27 2009 [15:04:45], Michael Ellerman wrote: On Wed, 2009-08-26 at 21:15 +0530, Amit Shah wrote: [cc'ing some people who have made some commits in hvc_console.c] On (Wed) Aug 26 2009 [16:57:18], Amit Shah wrote: On (Tue) Aug 25 2009 [11:47:20], Amit Shah wrote:

Re: Extending virtio_console to support multiple ports

2009-08-27 Thread Alan Cox
- Then, are we certain that there's no case where the tty layer will call us with some lock held or in an atomic context ? To be honest, I've totally lost track of the locking rules in tty land lately so it might well be ok, but something to verify. Some of the less well behaved line

Re: Extending virtio_console to support multiple ports

2009-08-27 Thread Benjamin Herrenschmidt
On Thu, 2009-08-27 at 10:08 +0100, Alan Cox wrote: - Then, are we certain that there's no case where the tty layer will call us with some lock held or in an atomic context ? To be honest, I've totally lost track of the locking rules in tty land lately so it might well be ok, but something

Re: Extending virtio_console to support multiple ports

2009-08-27 Thread Ryan Arnold
On Thu, 2009-08-27 at 12:22 +0530, Amit Shah wrote: On (Thu) Aug 27 2009 [15:04:45], Michael Ellerman wrote: Ryan you called his code pure legacy baggage if you don't ;)

Re: Extending virtio_console to support multiple ports

2009-08-26 Thread Amit Shah
On (Tue) Aug 25 2009 [11:47:20], Amit Shah wrote: Hello all, Here is a new iteration of the patch series that implements a transport for guest and host communications. The code has been updated to reuse the virtio-console device instead of creating a new virtio-serial device. And the

Re: Extending virtio_console to support multiple ports

2009-08-26 Thread Amit Shah
[cc'ing some people who have made some commits in hvc_console.c] On (Wed) Aug 26 2009 [16:57:18], Amit Shah wrote: On (Tue) Aug 25 2009 [11:47:20], Amit Shah wrote: Hello all, Here is a new iteration of the patch series that implements a transport for guest and host communications.

Re: Extending virtio_console to support multiple ports

2009-08-26 Thread Benjamin Herrenschmidt
On Wed, 2009-08-26 at 21:15 +0530, Amit Shah wrote: - Convert hvc's usage of spinlocks to mutexes. I've no idea how this will play out; I'm no expert here. But I did try doing this and so far it all looks OK. No lockups, lockdep warnings, nothing. I have full debugging enabled.

Re: Extending virtio_console to support multiple ports

2009-08-26 Thread Michael Ellerman
On Wed, 2009-08-26 at 21:15 +0530, Amit Shah wrote: [cc'ing some people who have made some commits in hvc_console.c] On (Wed) Aug 26 2009 [16:57:18], Amit Shah wrote: On (Tue) Aug 25 2009 [11:47:20], Amit Shah wrote: Hello all, Here is a new iteration of the patch series that

Extending virtio_console to support multiple ports

2009-08-25 Thread Amit Shah
Hello all, Here is a new iteration of the patch series that implements a transport for guest and host communications. The code has been updated to reuse the virtio-console device instead of creating a new virtio-serial device. I've tested for compatibility (old qemu new kernel, new qemu old