summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-06-26 13:26:21 +0300
committerMichael S. Tsirkin <mst@redhat.com>2012-06-26 13:26:21 +0300
commitb6c9e3686cc3246920856f5e90dfe2eb57d35143 (patch)
treeee3e31fe7071a4b2d6a741e242e36863d4f5ab61
parent04886c4d9bc1d431dce8c4f2f2d12e9b3c84894d (diff)
downloadvirtio-spec-b6c9e3686cc3246920856f5e90dfe2eb57d35143.tar.gz
virtio spec 0.8.8
-rw-r--r--virtio.lyx68
1 files changed, 46 insertions, 22 deletions
diff --git a/virtio.lyx b/virtio.lyx
index 107172c..8fee4a9 100644
--- a/virtio.lyx
+++ b/virtio.lyx
@@ -38,6 +38,7 @@
\output_changes true
\author ""
\author ""
+\author ""
\end_header
\begin_body
@@ -47,7 +48,7 @@ Virtio PCI Card Specification
\begin_inset Newline newline
\end_inset
-v0.8.7 DRAFT
+v0.8.8 DRAFT
\begin_inset Newline newline
\end_inset
@@ -63,7 +64,7 @@ IBM Corporation
\end_layout
\begin_layout Date
-2010 April 20.
+2010 April 29.
\end_layout
\begin_layout Chapter
@@ -4808,7 +4809,9 @@ The virtio console device is a simple device for data input and output.
The control virtqueues are used to communicate information between the
device and the driver about ports being opened and closed on either side
of the connection, indication from the host about whether a particular
- port is a console port, port hotunplug, etc.
+ port is a console port, adding new ports, port hot-plug/unplug, etc., and
+ indication from the guest about whether a port or a device was successfully
+ added, port open/close, etc..
For data IO, one or more empty buffers are placed in the receive queue
for incoming data and outgoing characters are placed in the transmit queue.
\end_layout
@@ -4871,8 +4874,7 @@ configuration
layout The size of the console is supplied in the configuration space if
the VIRTIO_CONSOLE_F_SIZE feature is set.
Furthermore, if the VIRTIO_CONSOLE_F_MULTIPORT feature is set, the maximum
- number of ports supported by the device and the number of ports currently
- active can be fetched.
+ number of ports supported by the device can be fetched.
\begin_inset listings
inline false
status open
@@ -4903,11 +4905,6 @@ struct virtio_console_config {
\begin_layout Plain Layout
- u32 nr_ports;
-\end_layout
-
-\begin_layout Plain Layout
-
};
\end_layout
@@ -4929,9 +4926,11 @@ If the VIRTIO_CONSOLE_F_SIZE feature is negotiated, the driver can read
If the VIRTIO_CONSOLE_F_MULTIPORT feature is negotiated, the driver can
spawn multiple ports, not all of which may be attached to a console.
Some could be generic ports.
- In this case, the control virtqueues are enabled and according to the nr_ports
- configuration-space value, the appropriate number of ports and corresponding
- virtqueues are spawned.
+ In this case, the control virtqueues are enabled and according to the max_nr_po
+rts configuration-space value, the appropriate number of virtqueues are
+ created.
+ A control message indicating the driver is ready is sent to the host.
+ The host can then send control messages for adding new ports to the device.
After creating and initializing each port, a VIRTIO_CONSOLE_PORT_READY
control message is sent to the host for that port so the host can let us
know of any additional configuration options set for that port.
@@ -4954,6 +4953,9 @@ status open
Because this is high importance and low bandwidth, the current Linux implementat
ion polls for the buffer to be used, rather than waiting for an interrupt,
simplifying the implementation significantly.
+ However, for generic serial ports with the O_NONBLOCK flag set, the polling
+ limitation is relaxed and the consumed buffers are freed upon the next
+ write or poll call or when a port is closed or hot-unplugged.
\end_layout
\end_inset
@@ -4974,9 +4976,17 @@ If the driver negotiated the VIRTIO_CONSOLE_F_SIZE feature, a configuration
\end_layout
\begin_layout Enumerate
-If the driver negotiated the VIRTIO_CONSOLE_F_MULTIPORT feature, a configuration
- change interrupt may occur that bumps up the value of nr_ports.
- In this case, ports are hot-added.
+If the driver negotiated the VIRTIO_CONSOLE_F_MULTIPORT feature, active
+ ports are announced by the host using the VIRTIO_CONSOLE_PORT_ADD control
+ message.
+ The same message is used for port hot-plug as well.
+\end_layout
+
+\begin_layout Enumerate
+If the host specified a port 'name', a sysfs attribute is created with the
+ name filled in, so that udev rules can be written that can create a symlink
+ from the port's name to the char device for port discovery by applications
+ in the guest.
\end_layout
\begin_layout Enumerate
@@ -5024,32 +5034,46 @@ struct virtio_console_control {
\begin_layout Plain Layout
-#define VIRTIO_CONSOLE_PORT_READY 0
\end_layout
\begin_layout Plain Layout
-#define VIRTIO_CONSOLE_CONSOLE_PORT 1
+#define VIRTIO_CONSOLE_DEVICE_READY 0
+\end_layout
+
+\begin_layout Plain Layout
+
+#define VIRTIO_CONSOLE_PORT_ADD 1
+\end_layout
+
+\begin_layout Plain Layout
+
+#define VIRTIO_CONSOLE_PORT_REMOVE 2
+\end_layout
+
+\begin_layout Plain Layout
+
+#define VIRTIO_CONSOLE_PORT_READY 3
\end_layout
\begin_layout Plain Layout
-#define VIRTIO_CONSOLE_RESIZE 2
+#define VIRTIO_CONSOLE_CONSOLE_PORT 4
\end_layout
\begin_layout Plain Layout
-#define VIRTIO_CONSOLE_PORT_OPEN 3
+#define VIRTIO_CONSOLE_RESIZE 5
\end_layout
\begin_layout Plain Layout
-#define VIRTIO_CONSOLE_PORT_NAME 4
+#define VIRTIO_CONSOLE_PORT_OPEN 6
\end_layout
\begin_layout Plain Layout
-#define VIRTIO_CONSOLE_PORT_REMOVE 5
+#define VIRTIO_CONSOLE_PORT_NAME 7
\end_layout
\end_inset