aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxc/xenctrl.h
diff options
context:
space:
mode:
authorJoe Epstein <jepstein98@gmail.com>2011-01-07 11:54:45 +0000
committerJoe Epstein <jepstein98@gmail.com>2011-01-07 11:54:45 +0000
commit81f8af44baecf94a72d08cde1619f5af63c1b3a7 (patch)
treee4567ecb0212bfbd8ca85dd0c2cf01e601ec14c4 /tools/libxc/xenctrl.h
parentb405792883f6e2f3001328865af6960968441ad6 (diff)
downloadxen-81f8af44baecf94a72d08cde1619f5af63c1b3a7.tar.gz
xen-81f8af44baecf94a72d08cde1619f5af63c1b3a7.tar.bz2
xen-81f8af44baecf94a72d08cde1619f5af63c1b3a7.zip
mem_access: HVMOPs for setting mem access
* Creates HVMOPs for setting and getting memory access. The hypercalls can set individual pages or the default access for new/refreshed pages. * Added functions to libxc to access these hypercalls. Signed-off-by: Joe Epstein <jepstein98@gmail.com> Reviewed-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Keir Fraser <keir@xen.org> Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'tools/libxc/xenctrl.h')
-rw-r--r--tools/libxc/xenctrl.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h
index 4827303b73..aec258662f 100644
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -701,6 +701,19 @@ int xc_domain_setdebugging(xc_interface *xch,
uint32_t domid,
unsigned int enable);
+/**
+ * This function sets or clears the requirement that an access memory
+ * event listener is required on the domain.
+ *
+ * @parm xch a handle to an open hypervisor interface
+ * @parm domid the domain id to send trigger
+ * @parm enable true to require a listener
+ * return 0 on success, -1 on failure
+ */
+int xc_domain_set_access_required(xc_interface *xch,
+ uint32_t domid,
+ unsigned int required);
+
/*
* CPUPOOL MANAGEMENT FUNCTIONS
*/
@@ -1398,6 +1411,19 @@ int xc_hvm_modified_memory(
int xc_hvm_set_mem_type(
xc_interface *xch, domid_t dom, hvmmem_type_t memtype, uint64_t first_pfn, uint64_t nr);
+/*
+ * Set a range of memory to a specific access.
+ * Allowed types are HVMMEM_access_default, HVMMEM_access_n, any combination of
+ * HVM_access_ + (rwx), and HVM_access_rx2rw
+ */
+int xc_hvm_set_mem_access(
+ xc_interface *xch, domid_t dom, hvmmem_access_t memaccess, uint64_t first_pfn, uint64_t nr);
+
+/*
+ * Gets the mem access for the given page (returned in memacess on success)
+ */
+int xc_hvm_get_mem_access(
+ xc_interface *xch, domid_t dom, uint64_t pfn, hvmmem_access_t* memaccess);
/*
* LOGGING AND ERROR REPORTING
@@ -1704,6 +1730,8 @@ int xc_mem_paging_evict(xc_interface *xch, domid_t domain_id, unsigned long gfn)
int xc_mem_paging_prep(xc_interface *xch, domid_t domain_id, unsigned long gfn);
int xc_mem_paging_resume(xc_interface *xch, domid_t domain_id,
unsigned long gfn);
+int xc_mem_access_resume(xc_interface *xch, domid_t domain_id,
+ unsigned long gfn);
/**
* memshr operations