aboutsummaryrefslogtreecommitdiffstats
path: root/xen-2.4.16/include/hypervisor-ifs/hypervisor-if.h
diff options
context:
space:
mode:
Diffstat (limited to 'xen-2.4.16/include/hypervisor-ifs/hypervisor-if.h')
-rw-r--r--xen-2.4.16/include/hypervisor-ifs/hypervisor-if.h46
1 files changed, 33 insertions, 13 deletions
diff --git a/xen-2.4.16/include/hypervisor-ifs/hypervisor-if.h b/xen-2.4.16/include/hypervisor-ifs/hypervisor-if.h
index 4f4d1a2d23..9961f4b96d 100644
--- a/xen-2.4.16/include/hypervisor-ifs/hypervisor-if.h
+++ b/xen-2.4.16/include/hypervisor-ifs/hypervisor-if.h
@@ -46,21 +46,41 @@ typedef struct
#define TRAP_INSTR "int $0x82"
+/* Event message note:
+ *
+ * Here, as in the interrupts to the guestos, additional network interfaces
+ * are defined. These definitions server as placeholders for the event bits,
+ * however, in the code these events will allways be referred to as shifted
+ * offsets from the base NET events.
+ */
+
/* Events that a guest OS may receive from the hypervisor. */
-#define EVENT_NET_TX 0x01 /* packets for transmission. */
-#define EVENT_NET_RX 0x02 /* empty buffers for receive. */
-#define EVENT_TIMER 0x04 /* a timeout has been updated. */
-#define EVENT_DIE 0x08 /* OS is about to be killed. Clean up please! */
-#define EVENT_BLK_TX 0x10 /* packets for transmission. */
-#define EVENT_BLK_RX 0x20 /* empty buffers for receive. */
+#define EVENT_BLK_TX 0x01 /* packets for transmission. */
+#define EVENT_BLK_RX 0x02 /* empty buffers for receive. */
+#define EVENT_TIMER 0x04 /* a timeout has been updated. */
+#define EVENT_DIE 0x08 /* OS is about to be killed. Clean up please! */
+#define EVENT_NET_TX 0x10 /* packets for transmission. */
+#define EVENT_NET_RX 0x20 /* empty buffers for receive. */
+#define EVENT_NET2_TX 0x40 /* packets for transmission. */
+#define EVENT_NET2_RX 0x80 /* empty buffers for receive. */
+
+/* should these macros and the ones below test for range violation? */
+#define EVENT_NET_TX_FOR_VIF(x) (EVENT_NET_TX << (2 * x))
+#define EVENT_NET_RX_FOR_VIF(x) (EVENT_NET_RX << (2 * x))
+
/* Bit offsets, as opposed to the above masks. */
-#define _EVENT_NET_TX 0
-#define _EVENT_NET_RX 1
-#define _EVENT_TIMER 2
-#define _EVENT_DIE 3
-#define _EVENT_BLK_TX 4
-#define _EVENT_BLK_RX 5
+#define _EVENT_BLK_TX 0
+#define _EVENT_BLK_RX 1
+#define _EVENT_TIMER 2
+#define _EVENT_DIE 3
+#define _EVENT_NET_TX 4
+#define _EVENT_NET_RX 5
+#define _EVENT_NET2_TX 6
+#define _EVENT_NET2_RX 7
+
+#define _EVENT_NET_TX_FOR_VIF(x) (_EVENT_NET_TX + (2 * x))
+#define _EVENT_NET_RX_FOR_VIF(x) (_EVENT_NET_RX + (2 * x))
/*
* NB. We expect that this struct is smaller than a page.
@@ -72,7 +92,7 @@ typedef struct shared_info_st {
/*
* Hypervisor will only signal event delivery via the "callback
* exception" when this value is non-zero. Hypervisor clears this when
- * notiying the guest OS -- thsi prevents unbounded reentrancy and
+ * notiying the guest OS -- this prevents unbounded reentrancy and
* stack overflow (in this way, acts as an interrupt-enable flag).
*/
unsigned long events_enable;