History

virtio: Implement get_shm_region for MMIO transport

On MMIO a new set of registers is defined for finding SHM regions. Add their definitions and use them to find the region.

Sebastien Boeuf committed 6 years ago

Commit 38e89541 parent 0dd4ff92 files · +42 −0Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/virtio_mmio.h+11−0
@@ -122,6 +122,17 @@ · 121 unmodified lines
122122 #define VIRTIO_MMIO_QUEUE_USED_LOW 0x0a0
123123 #define VIRTIO_MMIO_QUEUE_USED_HIGH 0x0a4
124124
125+/* Shared memory region id */
126+#define VIRTIO_MMIO_SHM_SEL 0x0ac
127+
128+/* Shared memory region length, 64 bits in two halves */
129+#define VIRTIO_MMIO_SHM_LEN_LOW 0x0b0
130+#define VIRTIO_MMIO_SHM_LEN_HIGH 0x0b4
131+
132+/* Shared memory region base address, 64 bits in two halves */
133+#define VIRTIO_MMIO_SHM_BASE_LOW 0x0b8
134+#define VIRTIO_MMIO_SHM_BASE_HIGH 0x0bc
135+
125136 /* Configuration atomicity value */
126137 #define VIRTIO_MMIO_CONFIG_GENERATION 0x0fc
127138