aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/domctl.c
diff options
context:
space:
mode:
authorJoe Epstein <jepstein98@gmail.com>2011-01-07 11:54:42 +0000
committerJoe Epstein <jepstein98@gmail.com>2011-01-07 11:54:42 +0000
commitb405792883f6e2f3001328865af6960968441ad6 (patch)
treeefeb8442b605df3abc03ce2e5daa6fee912c1b46 /xen/arch/x86/domctl.c
parentfbbedcae8c0c5374f8c0a869f49784b37baf04bb (diff)
downloadxen-b405792883f6e2f3001328865af6960968441ad6.tar.gz
xen-b405792883f6e2f3001328865af6960968441ad6.tar.bz2
xen-b405792883f6e2f3001328865af6960968441ad6.zip
mem_access: access listener can be required
* Adds the ability to set that a domain that an access listener; that is, it pauses the VCPU if there is no memory event listener. Signed-off-by: Joe Epstein <jepstein98@gmail.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/domctl.c')
-rw-r--r--xen/arch/x86/domctl.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/xen/arch/x86/domctl.c b/xen/arch/x86/domctl.c
index 0673df9e98..6652aad8af 100644
--- a/xen/arch/x86/domctl.c
+++ b/xen/arch/x86/domctl.c
@@ -1566,6 +1566,26 @@ long arch_do_domctl(
break;
#endif /* __x86_64__ */
+ case XEN_DOMCTL_set_access_required:
+ {
+ struct domain *d;
+ struct p2m_domain* p2m;
+
+ ret = -EPERM;
+ if ( current->domain->domain_id == domctl->domain )
+ break;
+
+ ret = -ESRCH;
+ d = rcu_lock_domain_by_id(domctl->domain);
+ if ( d != NULL )
+ {
+ p2m = p2m_get_hostp2m(d);
+ p2m->access_required = domctl->u.access_required.access_required;
+ rcu_unlock_domain(d);
+ }
+ }
+ break;
+
default:
ret = -ENOSYS;
break;