From 8ec7763c807f252e930c9647a0631253db2844a7 Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Mon, 14 Oct 2013 10:23:10 +0200 Subject: Add DOMCTL to limit the number of event channels a domain may use Add XEN_DOMCTL_set_max_evtchn which may be used during domain creation to set the maximum event channel port a domain may use. This may be used to limit the amount of Xen resources (global mapping space and xenheap) that a domain may use for event channels. A domain that does not have a limit set may use all the event channels supported by the event channel ABI in use. Signed-off-by: David Vrabel Reviewed-by: Jan Beulich Acked-by: Daniel De Graaf Acked-by: Keir Fraser --- xen/common/domctl.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'xen/common/domctl.c') diff --git a/xen/common/domctl.c b/xen/common/domctl.c index 9760d50955..870eef13b5 100644 --- a/xen/common/domctl.c +++ b/xen/common/domctl.c @@ -863,6 +863,14 @@ long do_domctl(XEN_GUEST_HANDLE_PARAM(xen_domctl_t) u_domctl) } break; + case XEN_DOMCTL_set_max_evtchn: + { + d->max_evtchn_port = min_t(unsigned int, + op->u.set_max_evtchn.max_port, + INT_MAX); + } + break; + default: ret = arch_do_domctl(op, d, u_domctl); break; -- cgit v1.2.3