This changes the minios evtchn implementation to use a list instead of
an array which ahis allows it to grow as necessary to support any number
of ports, only limited by Xen (NR_EVS is 1024, should be enough for now).
Signed-off-by: Diego Ongaro <diego.ongaro@citrix.com>
Signed-off-by: Alex Zeffertt <alex.zeffertt@eu.citrix.com>
Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
#include <stddef.h>
#include <xen/xen.h>
#include <xen/event_channel.h>
+#include <sys/queue.h>
#include "gntmap.h"
#ifdef HAVE_LIBC
FTYPE_SAVEFILE,
};
-#define MAX_EVTCHN_PORTS 16
+LIST_HEAD(evtchn_port_list, evtchn_port_info);
+
+struct evtchn_port_info {
+ LIST_ENTRY(evtchn_port_info) list;
+ evtchn_port_t port;
+ unsigned long pending;
+ int bound;
+};
extern struct file {
enum fd_type type;
off_t offset;
} file;
struct {
- /* To each event channel FD is associated a series of ports which
- * wakes select for this FD. */
- struct {
- evtchn_port_t port;
- unsigned long pending;
- int bound;
- } ports[MAX_EVTCHN_PORTS];
+ struct evtchn_port_list ports;
} evtchn;
struct gntmap gntmap;
struct {