aboutsummaryrefslogtreecommitdiffstats
path: root/xenolinux-2.4.16-sparse/include
diff options
context:
space:
mode:
authorakw27@labyrinth.cl.cam.ac.uk <akw27@labyrinth.cl.cam.ac.uk>2002-12-06 14:07:32 +0000
committerakw27@labyrinth.cl.cam.ac.uk <akw27@labyrinth.cl.cam.ac.uk>2002-12-06 14:07:32 +0000
commitea17a57b54fdd7908919e2322631d400c9bf030d (patch)
treede4bfdadc72b70d32ff9f2cb4d0336de0da0997e /xenolinux-2.4.16-sparse/include
parent9d5293906a5d768de90313f2ce8e9060576a2f62 (diff)
downloadxen-ea17a57b54fdd7908919e2322631d400c9bf030d.tar.gz
xen-ea17a57b54fdd7908919e2322631d400c9bf030d.tar.bz2
xen-ea17a57b54fdd7908919e2322631d400c9bf030d.zip
bitkeeper revision 1.3.1.1 (3df0af24TbrMOYKGDN9rqaVJMewW5Q)
Checkin so that I can pull other updates and see if the net address fix corrects a nagging bug. There are a lot of debug messages here and associated uglies that will be removed in the next checkin.
Diffstat (limited to 'xenolinux-2.4.16-sparse/include')
-rw-r--r--xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs/hypervisor-if.h45
-rw-r--r--xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs/network.h15
-rw-r--r--xenolinux-2.4.16-sparse/include/asm-xeno/irq.h2
3 files changed, 43 insertions, 19 deletions
diff --git a/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs/hypervisor-if.h b/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs/hypervisor-if.h
index 6a362d3635..3d6c56b59f 100644
--- a/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs/hypervisor-if.h
+++ b/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs/hypervisor-if.h
@@ -165,21 +165,41 @@ static inline int HYPERVISOR_network_op(void *network_op)
return ret;
}
+/* 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.
@@ -263,6 +283,7 @@ typedef struct start_info_st {
int num_net_rings;
blk_ring_t *blk_ring; /* block io communication rings */
unsigned char cmd_line[1]; /* variable-length */
+ unsigned long frame_table; /* mapping of the frame_table for dom0 */
} start_info_t;
/* For use in guest OSes. */
diff --git a/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs/network.h b/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs/network.h
index 54cb99095a..a0cfc9fa2c 100644
--- a/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs/network.h
+++ b/xenolinux-2.4.16-sparse/include/asm-xeno/hypervisor-ifs/network.h
@@ -52,7 +52,7 @@ typedef struct net_ring_st {
} net_ring_t;
/* Specify base of per-domain array. Get returned free slot in the array. */
-net_ring_t *create_net_vif(int domain);
+//net_ring_t *create_net_vif(int domain);
/* Packet routing/filtering code follows:
*/
@@ -60,10 +60,11 @@ net_ring_t *create_net_vif(int domain);
#define NETWORK_ACTION_ACCEPT 0
#define NETWORK_ACTION_COUNT 1
-#define NETWORK_PROTO_IP 0
-#define NETWORK_PROTO_TCP 1
-#define NETWORK_PROTO_UDP 2
-#define NETWORK_PROTO_ARP 3
+#define NETWORK_PROTO_ANY 0
+#define NETWORK_PROTO_IP 1
+#define NETWORK_PROTO_TCP 2
+#define NETWORK_PROTO_UDP 3
+#define NETWORK_PROTO_ARP 4
typedef struct net_rule_st
{
@@ -77,8 +78,8 @@ typedef struct net_rule_st
u16 dst_port_mask;
u16 proto;
- u16 src_interface;
- u16 dst_interface;
+ int src_interface;
+ int dst_interface;
u16 action;
} net_rule_t;
diff --git a/xenolinux-2.4.16-sparse/include/asm-xeno/irq.h b/xenolinux-2.4.16-sparse/include/asm-xeno/irq.h
index f5f65b8b82..619353e696 100644
--- a/xenolinux-2.4.16-sparse/include/asm-xeno/irq.h
+++ b/xenolinux-2.4.16-sparse/include/asm-xeno/irq.h
@@ -16,6 +16,8 @@
#define NET_TX_IRQ _EVENT_NET_TX
#define NET_RX_IRQ _EVENT_NET_RX
+#define NET2_TX_IRQ _EVENT_NET2_TX
+#define NET2_RX_IRQ _EVENT_NET2_RX
#define TIMER_IRQ _EVENT_TIMER
#define NR_IRQS (sizeof(HYPERVISOR_shared_info->events) * 8)