WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 05/10] Xen: Support for HVM_op Hypercall
From: Daniel Castro <evil.dani@xxxxxxxxx>
Date: Fri, 19 Aug 2011 01:03:22 +0900
Cc: Daniel Castro <evil.dani@xxxxxxxxx>
Delivery-date: Thu, 18 Aug 2011 09:12:08 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=PEuPabJDy9mrNCMIhsLaYvQPL36K1FSmD37/kJzslAM=; b=epCspbn/F2DwZ6R1AebdAnW18EI7h20NVEHQ2PVWv6CtwQisyYQ3s8V+oRWfvV+6F9 YWd04xWqbMB5W6hz5113/n/U53iSR8jYMOj6dSJRjB/NSFrH3jjY8eWKJVdBt7+V0DqH HYj9fy/UKYO1onWe0VEQTlHYDFQfncd5n4cCA=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1313683408-32306-1-git-send-email-evil.dani@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1313683408-32306-1-git-send-email-evil.dani@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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