diff options
Diffstat (limited to 'include/linux/virtio_mmio.h')
-rw-r--r-- | include/linux/virtio_mmio.h | 44 |
1 files changed, 37 insertions, 7 deletions
diff --git a/include/linux/virtio_mmio.h b/include/linux/virtio_mmio.h index 5c7b6f0daef8..c4b09689ab64 100644 --- a/include/linux/virtio_mmio.h +++ b/include/linux/virtio_mmio.h | |||
@@ -51,23 +51,29 @@ | |||
51 | /* Virtio vendor ID - Read Only */ | 51 | /* Virtio vendor ID - Read Only */ |
52 | #define VIRTIO_MMIO_VENDOR_ID 0x00c | 52 | #define VIRTIO_MMIO_VENDOR_ID 0x00c |
53 | 53 | ||
54 | /* Bitmask of the features supported by the host | 54 | /* Bitmask of the features supported by the device (host) |
55 | * (32 bits per set) - Read Only */ | 55 | * (32 bits per set) - Read Only */ |
56 | #define VIRTIO_MMIO_HOST_FEATURES 0x010 | 56 | #define VIRTIO_MMIO_DEVICE_FEATURES 0x010 |
57 | 57 | ||
58 | /* Host features set selector - Write Only */ | 58 | /* Device (host) features set selector - Write Only */ |
59 | #define VIRTIO_MMIO_HOST_FEATURES_SEL 0x014 | 59 | #define VIRTIO_MMIO_DEVICE_FEATURES_SEL 0x014 |
60 | 60 | ||
61 | /* Bitmask of features activated by the guest | 61 | /* Bitmask of features activated by the driver (guest) |
62 | * (32 bits per set) - Write Only */ | 62 | * (32 bits per set) - Write Only */ |
63 | #define VIRTIO_MMIO_GUEST_FEATURES 0x020 | 63 | #define VIRTIO_MMIO_DRIVER_FEATURES 0x020 |
64 | 64 | ||
65 | /* Activated features set selector - Write Only */ | 65 | /* Activated features set selector - Write Only */ |
66 | #define VIRTIO_MMIO_GUEST_FEATURES_SEL 0x024 | 66 | #define VIRTIO_MMIO_DRIVER_FEATURES_SEL 0x024 |
67 | |||
68 | |||
69 | #ifndef VIRTIO_MMIO_NO_LEGACY /* LEGACY DEVICES ONLY! */ | ||
67 | 70 | ||
68 | /* Guest's memory page size in bytes - Write Only */ | 71 | /* Guest's memory page size in bytes - Write Only */ |
69 | #define VIRTIO_MMIO_GUEST_PAGE_SIZE 0x028 | 72 | #define VIRTIO_MMIO_GUEST_PAGE_SIZE 0x028 |
70 | 73 | ||
74 | #endif | ||
75 | |||
76 | |||
71 | /* Queue selector - Write Only */ | 77 | /* Queue selector - Write Only */ |
72 | #define VIRTIO_MMIO_QUEUE_SEL 0x030 | 78 | #define VIRTIO_MMIO_QUEUE_SEL 0x030 |
73 | 79 | ||
@@ -77,12 +83,21 @@ | |||
77 | /* Queue size for the currently selected queue - Write Only */ | 83 | /* Queue size for the currently selected queue - Write Only */ |
78 | #define VIRTIO_MMIO_QUEUE_NUM 0x038 | 84 | #define VIRTIO_MMIO_QUEUE_NUM 0x038 |
79 | 85 | ||
86 | |||
87 | #ifndef VIRTIO_MMIO_NO_LEGACY /* LEGACY DEVICES ONLY! */ | ||
88 | |||
80 | /* Used Ring alignment for the currently selected queue - Write Only */ | 89 | /* Used Ring alignment for the currently selected queue - Write Only */ |
81 | #define VIRTIO_MMIO_QUEUE_ALIGN 0x03c | 90 | #define VIRTIO_MMIO_QUEUE_ALIGN 0x03c |
82 | 91 | ||
83 | /* Guest's PFN for the currently selected queue - Read Write */ | 92 | /* Guest's PFN for the currently selected queue - Read Write */ |
84 | #define VIRTIO_MMIO_QUEUE_PFN 0x040 | 93 | #define VIRTIO_MMIO_QUEUE_PFN 0x040 |
85 | 94 | ||
95 | #endif | ||
96 | |||
97 | |||
98 | /* Ready bit for the currently selected queue - Read Write */ | ||
99 | #define VIRTIO_MMIO_QUEUE_READY 0x044 | ||
100 | |||
86 | /* Queue notifier - Write Only */ | 101 | /* Queue notifier - Write Only */ |
87 | #define VIRTIO_MMIO_QUEUE_NOTIFY 0x050 | 102 | #define VIRTIO_MMIO_QUEUE_NOTIFY 0x050 |
88 | 103 | ||
@@ -95,6 +110,21 @@ | |||
95 | /* Device status register - Read Write */ | 110 | /* Device status register - Read Write */ |
96 | #define VIRTIO_MMIO_STATUS 0x070 | 111 | #define VIRTIO_MMIO_STATUS 0x070 |
97 | 112 | ||
113 | /* Selected queue's Descriptor Table address, 64 bits in two halves */ | ||
114 | #define VIRTIO_MMIO_QUEUE_DESC_LOW 0x080 | ||
115 | #define VIRTIO_MMIO_QUEUE_DESC_HIGH 0x084 | ||
116 | |||
117 | /* Selected queue's Available Ring address, 64 bits in two halves */ | ||
118 | #define VIRTIO_MMIO_QUEUE_AVAIL_LOW 0x090 | ||
119 | #define VIRTIO_MMIO_QUEUE_AVAIL_HIGH 0x094 | ||
120 | |||
121 | /* Selected queue's Used Ring address, 64 bits in two halves */ | ||
122 | #define VIRTIO_MMIO_QUEUE_USED_LOW 0x0a0 | ||
123 | #define VIRTIO_MMIO_QUEUE_USED_HIGH 0x0a4 | ||
124 | |||
125 | /* Configuration atomicity value */ | ||
126 | #define VIRTIO_MMIO_CONFIG_GENERATION 0x0fc | ||
127 | |||
98 | /* The config space is defined by each driver as | 128 | /* The config space is defined by each driver as |
99 | * the per-driver configuration space - Read Write */ | 129 | * the per-driver configuration space - Read Write */ |
100 | #define VIRTIO_MMIO_CONFIG 0x100 | 130 | #define VIRTIO_MMIO_CONFIG 0x100 |