[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 05/10] Xen: Support for HVM_op Hypercall



Added support for hvm_op and hvm_params hypercalls.

Signed-off-by: Daniel Castro <evil.dani@xxxxxxxxx>
---
 src/xen.h |   31 +++++++++++++++++++++++++++++++
 1 files changed, 31 insertions(+), 0 deletions(-)

diff --git a/src/xen.h b/src/xen.h
index b6b72b9..9e218fc 100644
--- a/src/xen.h
+++ b/src/xen.h
@@ -188,6 +188,33 @@ __DEFINE_XEN_GUEST_HANDLE(u32, u32);
 
 #define __HYPERVISOR_xen_version          17
 #define __HYPERVISOR_event_channel_op     32
+#define __HYPERVISOR_hvm_op               34
+
+/*
+ *  from: xen/include/public/hvm/hvm_op.h
+ */
+
+/*
+ *  in an HVM guest you find your xenstore ring and evtchn via hvmparams,
+ *  HVM_PARAM_STORE_PFN and HVM_PARAM_STORE_EVTCHN.
+ *  it's a hypercall (type) hvmop, subcommand HVMOP_get_param (this is the 
hypercall actually) with this:
+ *  Get/set subcommands: extra argument == pointer to xen_hvm_param struct.
+*/
+#define HVMOP_set_param  0
+#define HVMOP_get_param  1
+
+/*
+ * from: include/public/hvm/params.h
+ */
+
+#define HVM_PARAM_STORE_PFN    1 //pass as index
+#define HVM_PARAM_STORE_EVTCHN 2 //pass as index
+
+struct xen_hvm_param {
+    u32 domid;    //IN
+    u32 index;    //IN
+    u64 value;    //IN/OUT
+};
 
 /******************************************************************************
  * event_channel.h
@@ -210,6 +237,10 @@ typedef struct evtchn_send evtchn_send_t;
 /*
  * Wrappers for hypercalls
  */
+static inline int hypercall_hvm_op(int cmd, void *arg)
+{
+       return _hypercall2(int, hvm_op, cmd, arg);
+}
 static inline int hypercall_event_channel_op(int cmd, void *arg)
 {
        return _hypercall2(int, event_channel_op, cmd, arg);
-- 
1.7.4.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.