[Qemu-devel] Re: virtio-serial: An interface for host-guest communication
Gerd Hoffmann
kraxel at redhat.com
Thu Aug 20 00:44:29 PDT 2009
On 08/20/09 09:31, Rusty Russell wrote:
> On Sat, 15 Aug 2009 01:55:32 am Anthony Liguori wrote:
>> Gerd Hoffmann wrote:
>>> Also I still think passing a 'protocol' string for each port is a good
>>> idea, so you can stick that into a sysfs file for guests use.
>> Or drops ports altogether and just use protocol strings...
>
> Both is silly, yes.
>
> I guess strings + HAL magic can make the /dev names sane. I don't want to
> see userspace trolling through sysfs to figure out what device to open.
udev can create sane /dev names (or symlinks) by checking sysfs
attributes, apps just open the /dev/whatever then.
> Which is why I prefer assigned numbers, which get mapped to minors.
ports map trivially to minors. When using protocol strings minors can
simply be dynamically auto-allocated by the guest and we don't need the
port numbers in the host<->guest protocol any more.
I think strings are better as numbers for identifying protocols as you
can work without a central registry for the numbers then.
cheers,
Gerd
More information about the Virtualization
mailing list