From: Andrew Cooper Date: Mon, 21 Mar 2016 14:07:41 +0000 (+0000) Subject: Introduce Memory op ABI and infrastructure X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ec5aadc1c6d5bd9a588fd2a3d4c0e425ea6050b5;p=people%2Froyger%2Fxen-test-framework.git Introduce Memory op ABI and infrastructure Signed-off-by: Andrew Cooper --- diff --git a/include/xen/memory.h b/include/xen/memory.h new file mode 100644 index 0000000..2eeba94 --- /dev/null +++ b/include/xen/memory.h @@ -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: + */ diff --git a/include/xtf/hypercall.h b/include/xtf/hypercall.h index 617a053..885586d 100644 --- a/include/xtf/hypercall.h +++ b/include/xtf/hypercall.h @@ -31,6 +31,7 @@ extern uint8_t hypercall_page[PAGE_SIZE]; #include #include #include +#include #include #include #include @@ -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);