hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/tools/virtio/linux/virtio.h
....@@ -3,6 +3,7 @@
33 #define LINUX_VIRTIO_H
44 #include <linux/scatterlist.h>
55 #include <linux/kernel.h>
6
+#include <linux/spinlock.h>
67
78 struct device {
89 void *parent;
....@@ -11,12 +12,12 @@
1112 struct virtio_device {
1213 struct device dev;
1314 u64 features;
15
+ struct list_head vqs;
16
+ spinlock_t vqs_list_lock;
1417 };
1518
1619 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;
2021 void (*callback)(struct virtqueue *vq);
2122 const char *name;
2223 struct virtio_device *vdev;