Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


updated the block device interfaces to be more generic, and have the virtio block...
[palacios.git] / palacios / include / devices / lnx_virtio_pci.h
index d60f05d..b3bb6c8 100644 (file)
 #define VIRTIO_STATUS_PORT 18
 #define VIRTIO_ISR_PORT 19
 
+#define VIRTIO_PAGE_SHIFT 12
 
 
+/* Descriptor flags */
+/* This marks a buffer as continuing via the next field. */
+#define VIRTIO_NEXT_FLAG       0x1
+/* This marks a buffer as write-only (otherwise read-only). */
+#define VIRTIO_WR_ONLY_FLAG      0x2
+
+
+/* Used Flags */
+/* This means don't notify other side when buffer added. */
+#define VRING_NO_NOTIFY_FLAG  0x1
+
+
+/* Avail Flags */
+/* This means don't interrupt guest when buffer consumed. */
+#define VIRTIO_NO_IRQ_FLAG      0x1
+
 /* The virtio configuration space is a hybrid io/memory mapped model 
  * All IO is done via IO port accesses
  * The IO ports access fields in a virtio data structure, and the base io port 
@@ -97,6 +114,23 @@ struct vring_used {
 
 
 
+struct virtio_queue {
+    uint16_t queue_size;
+  
+    uint16_t cur_avail_idx;
+
+    addr_t ring_desc_addr;
+    addr_t ring_avail_addr;
+    addr_t ring_used_addr;
+  
+
+    struct vring_desc * desc; // We can treat this as an array...
+    struct vring_avail * avail;
+    struct vring_used * used;
+
+    uint32_t pfn;
+};
+
 
 
 #endif