]> xenbits.xensource.com Git - people/royger/xen-test-framework.git/commitdiff
Introduce Memory op ABI and infrastructure
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 21 Mar 2016 14:07:41 +0000 (14:07 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 8 Apr 2016 10:44:46 +0000 (11:44 +0100)
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
include/xen/memory.h [new file with mode: 0644]
include/xtf/hypercall.h

diff --git a/include/xen/memory.h b/include/xen/memory.h
new file mode 100644 (file)
index 0000000..2eeba94
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * Xen public memory_op hypercall interface
+ */
+
+#ifndef XEN_PUBLIC_MEMORY_H
+#define XEN_PUBLIC_MEMORY_H
+
+#define XENMEM_increase_reservation 0
+#define XENMEM_decrease_reservation 1
+#define XENMEM_populate_physmap     6
+
+struct xen_memory_reservation {
+    unsigned long *extent_start;
+    unsigned long nr_extents;
+    unsigned int extent_order;
+    unsigned int mem_flags;
+    domid_t domid;
+};
+
+#define XENMEM_maximum_gpfn         14
+
+#endif /* XEN_PUBLIC_MEMORY_H */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-file-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
index 617a0537bdb8a9fa151cb8619f03c39f2b21a1dc..885586dea01299e692d56e9bd23e9e6349c53eeb 100644 (file)
@@ -31,6 +31,7 @@ extern uint8_t hypercall_page[PAGE_SIZE];
 #include <xen/sched.h>
 #include <xen/errno.h>
 #include <xen/event_channel.h>
+#include <xen/memory.h>
 #include <xen/version.h>
 #include <xen/hvm/hvm_op.h>
 #include <xen/hvm/params.h>
@@ -48,6 +49,11 @@ static inline long hypercall_stack_switch(const unsigned int ss, const void *sp)
     return HYPERCALL2(long, __HYPERVISOR_stack_switch, ss, sp);
 }
 
+static inline long hypercall_memory_op(unsigned int cmd, void *arg)
+{
+    return HYPERCALL2(long, __HYPERVISOR_memory_op, cmd, arg);
+}
+
 static inline long hypercall_xen_version(unsigned cmd, void *arg)
 {
     return HYPERCALL2(long, __HYPERVISOR_xen_version, cmd, arg);