diff options
author | Alex Zeffertt <alex.zeffertt@eu.citrix.com> | 2012-02-09 18:33:30 +0000 |
---|---|---|
committer | Alex Zeffertt <alex.zeffertt@eu.citrix.com> | 2012-02-09 18:33:30 +0000 |
commit | ca8a593cc7ff51d6360d16fce31f934c3026ded2 (patch) | |
tree | 57d305c6f66f0ad303bce7e299d50ef4f2e41222 /extras/mini-os/include | |
parent | d45361b2ae45238fac9259d79daf32a022acdfcc (diff) | |
download | xen-ca8a593cc7ff51d6360d16fce31f934c3026ded2.tar.gz xen-ca8a593cc7ff51d6360d16fce31f934c3026ded2.tar.bz2 xen-ca8a593cc7ff51d6360d16fce31f934c3026ded2.zip |
mini-os: remove per-fd evtchn limit
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>
Diffstat (limited to 'extras/mini-os/include')
-rw-r--r-- | extras/mini-os/include/lib.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/extras/mini-os/include/lib.h b/extras/mini-os/include/lib.h index bd3eeafb0e..3d03cf40f8 100644 --- a/extras/mini-os/include/lib.h +++ b/extras/mini-os/include/lib.h @@ -52,6 +52,7 @@ #include <stddef.h> #include <xen/xen.h> #include <xen/event_channel.h> +#include <sys/queue.h> #include "gntmap.h" #ifdef HAVE_LIBC @@ -143,7 +144,14 @@ enum fd_type { 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; @@ -158,13 +166,7 @@ extern struct file { 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 { |