aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/public/domctl.h
diff options
context:
space:
mode:
authorJoe Epstein <jepstein98@gmail.com>2011-01-07 11:54:40 +0000
committerJoe Epstein <jepstein98@gmail.com>2011-01-07 11:54:40 +0000
commitfbbedcae8c0c5374f8c0a869f49784b37baf04bb (patch)
tree6a2a50b6ea18fef45c61f6e648f154c0138e244c /xen/include/public/domctl.h
parenta6cdb9545035b731802de41e10b2b43ef4ffd9c0 (diff)
downloadxen-fbbedcae8c0c5374f8c0a869f49784b37baf04bb.tar.gz
xen-fbbedcae8c0c5374f8c0a869f49784b37baf04bb.tar.bz2
xen-fbbedcae8c0c5374f8c0a869f49784b37baf04bb.zip
mem_access: mem event additions for access
* Adds an ACCESS memory event type, with RESUME as the action. * Refactors the bits in the memory event to store whether the memory event was a read, write, or execute (for access memory events only). I used bits sparingly to keep the structure somewhat the same size. * Modified VMX to report the needed information in its nested page fault. SVM is not implemented in this patch series. Signed-off-by: Joe Epstein <jepstein98@gmail.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'xen/include/public/domctl.h')
-rw-r--r--xen/include/public/domctl.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h
index 161dc7020d..06507bfaab 100644
--- a/xen/include/public/domctl.h
+++ b/xen/include/public/domctl.h
@@ -714,7 +714,7 @@ struct xen_domctl_gdbsx_domstatus {
/*
* Page memory in and out.
*/
-#define XEN_DOMCTL_MEM_EVENT_OP_PAGING (1 << 0)
+#define XEN_DOMCTL_MEM_EVENT_OP_PAGING 1
/* Domain memory paging */
#define XEN_DOMCTL_MEM_EVENT_OP_PAGING_NOMINATE 0
@@ -722,6 +722,19 @@ struct xen_domctl_gdbsx_domstatus {
#define XEN_DOMCTL_MEM_EVENT_OP_PAGING_PREP 2
#define XEN_DOMCTL_MEM_EVENT_OP_PAGING_RESUME 3
+/*
+ * Access permissions.
+ *
+ * There are HVM hypercalls to set the per-page access permissions of every
+ * page in a domain. When one of these permissions--independent, read,
+ * write, and execute--is violated, the VCPU is paused and a memory event
+ * is sent with what happened. (See public/mem_event.h) The memory event
+ * handler can then resume the VCPU and redo the access with an
+ * ACCESS_RESUME mode for the following domctl.
+ */
+#define XEN_DOMCTL_MEM_EVENT_OP_ACCESS 2
+#define XEN_DOMCTL_MEM_EVENT_OP_ACCESS_RESUME 0
+
struct xen_domctl_mem_event_op {
uint32_t op; /* XEN_DOMCTL_MEM_EVENT_OP_* */
uint32_t mode; /* XEN_DOMCTL_MEM_EVENT_ENABLE_* */