diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2007-11-12 22:30:26 -0500 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2008-02-04 07:50:11 -0500 |
commit | 3343660d8c62c6b00b2f15324ef3fcb6be207bfa (patch) | |
tree | 06d86446da65fc1814edad944e43aeb62f092422 /include/linux/virtio_pci.h | |
parent | d50ed907dc3db5bf2dd0a05b4e199a65793a3788 (diff) |
virtio: PCI device
This is a PCI device that implements a transport for virtio. It allows virtio
devices to be used by QEMU based VMMs like KVM or Xen.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/virtio_pci.h')
-rw-r--r-- | include/linux/virtio_pci.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/include/linux/virtio_pci.h b/include/linux/virtio_pci.h new file mode 100644 index 000000000000..860eb37bfa07 --- /dev/null +++ b/include/linux/virtio_pci.h | |||
@@ -0,0 +1,55 @@ | |||
1 | /* | ||
2 | * Virtio PCI driver | ||
3 | * | ||
4 | * This module allows virtio devices to be used over a virtual PCI device. | ||
5 | * This can be used with QEMU based VMMs like KVM or Xen. | ||
6 | * | ||
7 | * Copyright IBM Corp. 2007 | ||
8 | * | ||
9 | * Authors: | ||
10 | * Anthony Liguori <aliguori@us.ibm.com> | ||
11 | * | ||
12 | * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
13 | * See the COPYING file in the top-level directory. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #ifndef _LINUX_VIRTIO_PCI_H | ||
18 | #define _LINUX_VIRTIO_PCI_H | ||
19 | |||
20 | #include <linux/virtio_config.h> | ||
21 | |||
22 | /* A 32-bit r/o bitmask of the features supported by the host */ | ||
23 | #define VIRTIO_PCI_HOST_FEATURES 0 | ||
24 | |||
25 | /* A 32-bit r/w bitmask of features activated by the guest */ | ||
26 | #define VIRTIO_PCI_GUEST_FEATURES 4 | ||
27 | |||
28 | /* A 32-bit r/w PFN for the currently selected queue */ | ||
29 | #define VIRTIO_PCI_QUEUE_PFN 8 | ||
30 | |||
31 | /* A 16-bit r/o queue size for the currently selected queue */ | ||
32 | #define VIRTIO_PCI_QUEUE_NUM 12 | ||
33 | |||
34 | /* A 16-bit r/w queue selector */ | ||
35 | #define VIRTIO_PCI_QUEUE_SEL 14 | ||
36 | |||
37 | /* A 16-bit r/w queue notifier */ | ||
38 | #define VIRTIO_PCI_QUEUE_NOTIFY 16 | ||
39 | |||
40 | /* An 8-bit device status register. */ | ||
41 | #define VIRTIO_PCI_STATUS 18 | ||
42 | |||
43 | /* An 8-bit r/o interrupt status register. Reading the value will return the | ||
44 | * current contents of the ISR and will also clear it. This is effectively | ||
45 | * a read-and-acknowledge. */ | ||
46 | #define VIRTIO_PCI_ISR 19 | ||
47 | |||
48 | /* The bit of the ISR which indicates a device configuration change. */ | ||
49 | #define VIRTIO_PCI_ISR_CONFIG 0x2 | ||
50 | |||
51 | /* The remaining space is defined by each driver as the per-driver | ||
52 | * configuration space */ | ||
53 | #define VIRTIO_PCI_CONFIG 20 | ||
54 | |||
55 | #endif | ||