linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Amit Shah <amit.shah@redhat.com>
Cc: Alan Cox <alan@linux.intel.com>,
	rusty@rustcorp.com.au, virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, greg@kroah.com
Subject: Re: [PATCH] virtio_console: Add support for multiple ports for generic guest and host communication
Date: Tue, 15 Sep 2009 08:37:39 -0500	[thread overview]
Message-ID: <4AAF98A3.7080404@codemonkey.ws> (raw)
In-Reply-To: <20090915130357.GC5247@amit-x200.redhat.com>

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 qemu/kvm). Something that I have in mind currently
>>> is:
>>>
>>> $ qemu-kvm ... -virtioconsole role=org/qemu/clipboard
>>>
>>> and then the guest kernel sees the string, and puts the
>>> "org/qemu/clipboard" in some file in sysfs. Guest userspace should then
>>> be able to open and read/write to
>>>
>>> /dev/virtio_console/org/qemu/clipboard
>>>   
>>>       
>> That's probably not what we want.  I imagine what we want is:
>>
>> /dev/ttyV0
>> /dev/ttyV1
>> /dev/ttyVN
>>
>> And then we want:
>>
>> /sys/class/virtio-console/ttyV0/name -> "org.qemu.clipboard"
>>
>> 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.
>>     
>
> OK; but that's kind of roundabout isn't it? An application, instead of
> watching for the console port it's interested in, has to instead monitor
> all the ports.
>   

If you wanted to use /dev/virtio/org/qemu/clipboard you still have the 
same problem.  You have to use udev or inotify to listen for a new file 
in a directory.

The /dev/ path may look nicer from a high level, but the code ends up 
being roughly the same for either approach.  What I propose has the 
advantage of looking like existing subsystems.  It also avoids encoding 
device information in the device name.

> So in effect there has to be one app monitoring for new ports and then
> that app exec'ing the corresponding app meant for that port.
>   

I think if you think through both models, they end up looking the same.

Regards,

Anthony Liguroi

  reply	other threads:[~2009-09-15 13:37 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-11 14:13 Multiple ports support for virtio_console; major number for dev Amit Shah
2009-09-11 14:13 ` [PATCH] virtio_console: Add support for multiple ports for generic guest and host communication Amit Shah
2009-09-11 16:00   ` Alan Cox
2009-09-11 16:38     ` Amit Shah
2009-09-11 17:26       ` Anthony Liguori
2009-09-11 17:33         ` Amit Shah
2009-09-11 17:35           ` Anthony Liguori
2009-09-16 10:23             ` Alan Cox
2009-09-16 22:20               ` Anthony Liguori
2009-09-17 13:06                 ` Markus Armbruster
2009-09-17 13:15                   ` Alan Cox
2009-09-17 13:41                     ` Amit Shah
2009-09-17 15:57                       ` Alan Cox
2009-09-17 16:46                         ` Amit Shah
2009-09-18 16:00                 ` Alan Cox
2009-09-18 17:55                   ` Anthony Liguori
2009-09-18 17:57                     ` H. Peter Anvin
2009-09-18 18:02                       ` Anthony Liguori
2009-09-19  7:04                       ` Amit Shah
2009-09-18 20:11                     ` Gerd Hoffmann
2009-09-19  7:01                     ` Amit Shah
2009-09-21 10:06                     ` Alan Cox
2009-09-15 12:37     ` Amit Shah
2009-09-15 12:57       ` Anthony Liguori
2009-09-15 13:03         ` Amit Shah
2009-09-15 13:37           ` Anthony Liguori [this message]
2009-09-15 14:08         ` Gerd Hoffmann
2009-09-15 14:09           ` Anthony Liguori
2009-09-22  2:44     ` Rusty Russell
2009-09-22 15:45       ` Amit Shah
2009-09-29  9:24         ` Amit Shah
2009-09-29 10:09           ` Christian Borntraeger
2009-09-29 10:33             ` Amit Shah
2009-09-29 11:02               ` Christian Borntraeger
2009-09-29 11:40                 ` Christian Borntraeger
2009-09-29 12:03           ` Christian Borntraeger
2009-09-29 12:20             ` Amit Shah
2009-09-29 12:56               ` Christian Borntraeger
2009-09-29 13:09                 ` Amit Shah
2009-09-29 13:31                   ` Christian Borntraeger
2009-09-30 17:13                     ` Amit Shah
2009-10-01  8:17                       ` Christian Borntraeger
2009-10-01  8:47                         ` Amit Shah
2009-10-01  8:55                           ` Christian Borntraeger
2009-10-01  9:00                       ` Christian Borntraeger
2009-10-01 10:04                         ` Amit Shah
2009-10-01 10:28                       ` Christian Borntraeger
2009-10-01 10:42                         ` Amit Shah
2009-10-01 11:58                         ` Amit Shah
2009-10-01 12:04                           ` Christian Borntraeger
2009-10-01 13:50                             ` Amit Shah
2009-10-05 14:05                         ` Amit Shah
2009-10-06  6:49                           ` Christian Borntraeger
2009-10-06  6:55                             ` Amit Shah
2009-09-29 13:11   ` Rusty Russell
2009-09-29 13:24     ` Amit Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AAF98A3.7080404@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=alan@linux.intel.com \
    --cc=amit.shah@redhat.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).