| .. | .. |
|---|
| 3 | 3 | #define LINUX_VIRTIO_H |
|---|
| 4 | 4 | #include <linux/scatterlist.h> |
|---|
| 5 | 5 | #include <linux/kernel.h> |
|---|
| 6 | +#include <linux/spinlock.h> |
|---|
| 6 | 7 | |
|---|
| 7 | 8 | struct device { |
|---|
| 8 | 9 | void *parent; |
|---|
| .. | .. |
|---|
| 11 | 12 | struct virtio_device { |
|---|
| 12 | 13 | struct device dev; |
|---|
| 13 | 14 | u64 features; |
|---|
| 15 | + struct list_head vqs; |
|---|
| 16 | + spinlock_t vqs_list_lock; |
|---|
| 14 | 17 | }; |
|---|
| 15 | 18 | |
|---|
| 16 | 19 | struct virtqueue { |
|---|
| 17 | | - /* TODO: commented as list macros are empty stubs for now. |
|---|
| 18 | | - * Broken but enough for virtio_ring.c |
|---|
| 19 | | - * struct list_head list; */ |
|---|
| 20 | + struct list_head list; |
|---|
| 20 | 21 | void (*callback)(struct virtqueue *vq); |
|---|
| 21 | 22 | const char *name; |
|---|
| 22 | 23 | struct virtio_device *vdev; |
|---|