virtio: console: Add a new MULTIPORT feature, support for generic ports
authorAmit Shah <amit.shah@redhat.com>
Mon, 21 Dec 2009 15:33:25 +0000 (21:03 +0530)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 24 Feb 2010 03:52:52 +0000 (14:22 +1030)
commit17634ba25544d60af1968982929150efad755032
tree9ac1acbc260e3421b282b9ebe79f8ae76bb5e14a
parentf997f00bf8c3ddf748d757105afa1a7dd5297208
virtio: console: Add a new MULTIPORT feature, support for generic ports

This commit adds a new feature, MULTIPORT. If the host supports this
feature as well, the config space has the number of ports defined for
that device. New ports are spawned according to this information.

The config space also has the maximum number of ports that can be
spawned for a particular device. This is useful in initializing the
appropriate number of virtqueues in advance, as ports might be
hot-plugged in later.

Using this feature, generic ports can be created which are not tied to
hvc consoles.

We also open up a private channel between the host and the guest via
which some "control" messages are exchanged for the ports, like whether
the port being spawned is a console port, resizing the console window,
etc.

Next commits will add support for hotplugging and presenting char
devices in /dev/ for bi-directional guest-host communication.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c
include/linux/virtio_console.h