aboutsummaryrefslogtreecommitdiffstats
path: root/xen-2.4.16/include/hypervisor-ifs/block.h
diff options
context:
space:
mode:
Diffstat (limited to 'xen-2.4.16/include/hypervisor-ifs/block.h')
-rw-r--r--xen-2.4.16/include/hypervisor-ifs/block.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/xen-2.4.16/include/hypervisor-ifs/block.h b/xen-2.4.16/include/hypervisor-ifs/block.h
new file mode 100644
index 0000000000..55f7a33ce2
--- /dev/null
+++ b/xen-2.4.16/include/hypervisor-ifs/block.h
@@ -0,0 +1,40 @@
+/******************************************************************************
+ * block.h
+ *
+ * Block IO communication rings.
+ *
+ * These are the ring data structures for buffering messages between
+ * the hypervisor and guestos's.
+ *
+ * For now we'll start with our own rings for the block IO code instead
+ * of using the network rings. Hopefully, this will give us additional
+ * flexibility in the future should we choose to move away from a
+ * ring producer consumer communication model.
+ */
+
+#ifndef __BLOCK_H__
+#define __BLOCK_H__
+
+typedef struct blk_tx_entry_st {
+ unsigned long addr; /* virtual address */
+ unsigned long size; /* in bytes */
+} blk_tx_entry_t;
+
+typedef struct blk_rx_entry_st {
+ unsigned long addr; /* virtual address */
+ unsigned long size; /* in bytes */
+} blk_rx_entry_t;
+
+typedef struct blk_ring_st {
+ blk_tx_entry_t *tx_ring;
+ unsigned int tx_prod, tx_cons, tx_event;
+ unsigned int tx_ring_size;
+
+ blk_rx_entry_t *rx_ring;
+ unsigned int rx_prod, rx_cons, rx_event;
+ unsigned int rx_ring_size;
+} blk_ring_t;
+
+int blk_create_ring(int domain, unsigned long ptr);
+
+#endif