|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] [PATCH 3 of 7] REDO2: mem_access & mem_access 2: access list
* 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@xxxxxxxxx>
diff -r 253cc5185fb5 -r 281e5488ee97 xen/arch/x86/domctl.c --- a/xen/arch/x86/domctl.c Wed Jan 05 18:49:34 2011 -0800 +++ b/xen/arch/x86/domctl.c Wed Jan 05 18:50:54 2011 -0800 @@ -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; diff -r 253cc5185fb5 -r 281e5488ee97 xen/include/public/domctl.h --- a/xen/include/public/domctl.h Wed Jan 05 18:49:34 2011 -0800
+++ b/xen/include/public/domctl.h Wed Jan 05 18:50:54 2011 -0800 @@ -820,6 +820,16 @@ typedef struct xen_domctl_vcpuextstate x DEFINE_XEN_GUEST_HANDLE(xen_domctl_vcpuextstate_t); #endif +/* XEN_DOMCTL_set_access_required: sets whether a memory event listener
+ * must be present to handle page access events: if false, the page + * access will revert to full permissions if no one is listening; + * */ +struct xen_domctl_set_access_required { + uint8_t access_required;
+}; +typedef struct xen_domctl_set_access_required xen_domctl_set_access_required_t; +DEFINE_XEN_GUEST_HANDLE(xen_domctl_set_access_required_t); + struct xen_domctl { uint32_t cmd; #define XEN_DOMCTL_createdomain 1
@@ -882,6 +892,7 @@ struct xen_domctl { #define XEN_DOMCTL_getpageframeinfo3 61 #define XEN_DOMCTL_setvcpuextstate 62 #define XEN_DOMCTL_getvcpuextstate 63 +#define XEN_DOMCTL_set_access_required 64
#define XEN_DOMCTL_gdbsx_guestmemio 1000 #define XEN_DOMCTL_gdbsx_pausevcpu 1001 #define XEN_DOMCTL_gdbsx_unpausevcpu 1002 @@ -934,6 +945,7 @@ struct xen_domctl { struct xen_domctl_cpuid cpuid;
struct xen_domctl_vcpuextstate vcpuextstate; #endif + struct xen_domctl_set_access_required access_required; struct xen_domctl_gdbsx_memio gdbsx_guest_memio; struct xen_domctl_gdbsx_pauseunp_vcpu gdbsx_pauseunp_vcpu;
struct xen_domctl_gdbsx_domstatus gdbsx_domstatus;
3.patch
Description: Text Data
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] [PATCH 3 of 7] REDO2: mem_access & mem_access 2: access listener can be required,
Joe Epstein <=
|
|
|
|
|