summaryrefslogtreecommitdiff
path: root/introduction.tex
blob: 8e08d02d9265d7eb35092b2d63a1697b823cf711 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
\chapter{Introduction}

\input{abstract.tex}

  Straightforward: Virtio devices use normal bus mechanisms of
  interrupts and DMA which should be familiar to any device driver
  author. There is no exotic page-flipping or COW mechanism: it's just
  a normal device.
\footnote{This lack of page-sharing implies that the implementation of the
device (e.g. the hypervisor or host) needs full access to the
guest memory. Communication with untrusted parties (i.e.
inter-guest communication) requires copying.
}

  Efficient: Virtio devices consist of rings of descriptors
  for both input and output, which are neatly laid out to avoid cache
  effects from both driver and device writing to the same cache
  lines.

  Standard: Virtio makes no assumptions about the environment in which
  it operates, beyond supporting the bus to which device is attached.
  In this specification, virtio
  devices are implemented over PCI and other buses, and earlier drafts
  have been implemented on other buses not included here.
\footnote{The Linux implementation further separates the PCI virtio code
from the specific virtio drivers: these drivers are shared with
the non-PCI implementations (currently lguest and S/390).
}

  Extensible: Virtio devices contain feature bits which are
  acknowledged by the guest operating system during device setup.
  This allows forwards and backwards compatibility: the device
  offers all the features it knows about, and the driver
  acknowledges those it understands and wishes to use.

\section{Terminology}\label{Terminology}

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in \hyperref[intro:rfc2119]{[RFC2119]}.

\section{Normative References}

\begin{longtable}{l p{5in}}
	\phantomsection\label{intro:rfc2119}\textbf{[RFC2119]} & S. Bradner, Key words for use in RFCs to Indicate Requirement Levels, \newline\url{http://www.ietf.org/rfc/rfc2119.txt}, March 1997\\
	\phantomsection\label{intro:S390 PoP}\textbf{[S390 PoP]} & z/Architecture Principles of Operation, \newline IBM Publication SA22-7832\\
	\phantomsection\label{intro:S390 Common I/O}\textbf{[S390 Common I/O]} & ESA/390 Common I/O-Device and Self-Description, \newline IBM Publication SA22-7204\\
\end{longtable}

\section{Structure Specifications}

Many device and driver in-memory structure layouts are documented using
the C struct syntax. All structures are assumed to be without additional
padding. To stress this, cases where common C compilers are known to insert
extra padding within structures are tagged using the GNU C
__attribute__((packed))  syntax.

For the integer data types used in the structure definitions, the following
conventions are used:

\begin{description}
\item[u8, u16, u32, u64] An unsigned integer of the specified length in bits.

\item[le16, le32, le64] An unsigned integer of the specified length in bits,
in little-endian byte order.

\item[be16, be32, be64] An unsigned integer of the specified length in bits,
in big-endian byte order.
\end{description}

\newpage