aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/domain.c
diff options
context:
space:
mode:
authorDaniel De Graaf <dgdegra@tycho.nsa.gov>2013-01-11 10:39:20 +0000
committerDaniel De Graaf <dgdegra@tycho.nsa.gov>2013-01-11 10:39:20 +0000
commit79cd41ecce31b91f0456b57ca1b3cdacde405388 (patch)
tree45758ecee014f9c9f8f1432166e2263019674ae5 /xen/common/domain.c
parent9e41e410f6211835535178ef29d2e987f0f9b1e0 (diff)
downloadxen-79cd41ecce31b91f0456b57ca1b3cdacde405388.tar.gz
xen-79cd41ecce31b91f0456b57ca1b3cdacde405388.tar.bz2
xen-79cd41ecce31b91f0456b57ca1b3cdacde405388.zip
arch/x86: Add missing mem_sharing XSM hooks
This patch adds splits up the mem_sharing and mem_event XSM hooks to better cover what the code is doing. It also changes the utility function get_mem_event_op_target to rcu_lock_live_remote_domain_by_id because there is no mm-specific logic in there. Signed-off-by: Daniel De Graaf <dgdegra@tycho.nsa.gov> Acked-by: Tim Deegan <tim@xen.org> Acked-by: Jan Beulich <jbeulich@suse.com> Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/domain.c')
-rw-r--r--xen/common/domain.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/xen/common/domain.c b/xen/common/domain.c
index 2f8ef0070f..ec8efe8a41 100644
--- a/xen/common/domain.c
+++ b/xen/common/domain.c
@@ -475,6 +475,21 @@ int rcu_lock_remote_domain_by_id(domid_t dom, struct domain **d)
return 0;
}
+int rcu_lock_live_remote_domain_by_id(domid_t dom, struct domain **d)
+{
+ int rv;
+ rv = rcu_lock_remote_domain_by_id(dom, d);
+ if ( rv )
+ return rv;
+ if ( (*d)->is_dying )
+ {
+ rcu_unlock_domain(*d);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
int domain_kill(struct domain *d)
{
int rc = 0;