aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/domctl.c
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-01-28 13:48:03 +0000
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>2012-01-28 13:48:03 +0000
commit87521589aa6a677bad2b4a80b8fd3ad152c1c274 (patch)
tree86d58beaeede99086666d61c3d1aff63ee800ee5 /xen/common/domctl.c
parent14eb3b41d03f75b89928fad8f720f7d49598b0be (diff)
downloadxen-87521589aa6a677bad2b4a80b8fd3ad152c1c274.tar.gz
xen-87521589aa6a677bad2b4a80b8fd3ad152c1c274.tar.bz2
xen-87521589aa6a677bad2b4a80b8fd3ad152c1c274.zip
xen: allow global VIRQ handlers to be delegated to other domains
This patch sends global VIRQs to a domain designated as the VIRQ handler instead of sending all global VIRQ events to dom0. This is required in order to run xenstored in a stubdom, because VIRQ_DOM_EXC must be sent to xenstored for domain destruction to work properly. This patch was inspired by the xenstored stubdomain patch series sent to xen-devel by Alex Zeffertt in 2009. 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> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/domctl.c')
-rw-r--r--xen/common/domctl.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/xen/common/domctl.c b/xen/common/domctl.c
index 5b0fc4a511..8001a916cc 100644
--- a/xen/common/domctl.c
+++ b/xen/common/domctl.c
@@ -995,6 +995,23 @@ long do_domctl(XEN_GUEST_HANDLE(xen_domctl_t) u_domctl)
}
break;
+ case XEN_DOMCTL_set_virq_handler:
+ {
+ struct domain *d;
+ uint32_t virq = op->u.set_virq_handler.virq;
+
+ ret = -ESRCH;
+ d = rcu_lock_domain_by_id(op->domain);
+ if ( d != NULL )
+ {
+ ret = xsm_set_virq_handler(d, virq);
+ if ( !ret )
+ ret = set_global_virq_handler(d, virq);
+ rcu_unlock_domain(d);
+ }
+ }
+ break;
+
default:
ret = arch_do_domctl(op, u_domctl);
break;