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 07/10] Xen: Support for sched_op hypercall

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 07/10] Xen: Support for sched_op hypercall
From: Daniel Castro <evil.dani@xxxxxxxxx>
Date: Fri, 19 Aug 2011 01:03:24 +0900
Cc: Daniel Castro <evil.dani@xxxxxxxxx>
Delivery-date: Thu, 18 Aug 2011 09:14:45 -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=7RI+yzL5UxuQCU+7CGKzvbruiTvWyw5R2eYzwV89XAM=; b=UM4lbrIEeh5aiAocjHkuppgyEiMLx+mGIwGU+YUlAZzlvfp7xfj3uJZPK7NDPCWdlX rsVM3RL2uN9GcRhtx4AvN02lTzwwoF7aS0UwE0gZqMP+Jy8RrQA3HPCqkEBIFdunYVX+ TRnAZSF4PSvlFbfpEf0FiJGNp7tu/aiRspFeg=
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
Adds support for CPU yield operation until event arrives.

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

diff --git a/src/xen.h b/src/xen.h
index de2b1ef..b70593a 100644
--- a/src/xen.h
+++ b/src/xen.h
@@ -188,6 +188,7 @@ __DEFINE_XEN_GUEST_HANDLE(u32, u32);
 
 #define __HYPERVISOR_memory_op            12
 #define __HYPERVISOR_xen_version          17
+#define __HYPERVISOR_sched_op             29
 #define __HYPERVISOR_event_channel_op     32
 #define __HYPERVISOR_hvm_op               34
 
@@ -236,6 +237,42 @@ struct evtchn_send {
 typedef struct evtchn_send evtchn_send_t;
 
 /******************************************************************************
+ * sched.h
+ *
+ * Scheduler state interactions
+ *
+ * Copyright (c) 2005, Keir Fraser <keir@xxxxxxxxxxxxx>
+ */
+
+
+
+/*
+ * Poll a set of event-channel ports. Return when one or more are pending. An
+ * optional timeout may be specified.
+ * @arg == pointer to sched_poll structure.
+ */
+#define SCHEDOP_poll        3
+struct sched_poll {
+    XEN_GUEST_HANDLE(evtchn_port_t) ports;
+    unsigned int nr_ports;
+    u64 timeout;
+};
+typedef struct sched_poll sched_poll_t;
+DEFINE_XEN_GUEST_HANDLE(sched_poll_t);
+
+/*
+ * Error base
+ */
+#define        EPERM            1      /* Operation not permitted */
+#define        ENOENT           2      /* No such file or directory */
+#define        EIO              5      /* I/O error */
+#define        EACCES          13      /* Permission denied */
+#define        EINVAL          22      /* Invalid argument */
+#define        ENOSYS          38      /* Function not implemented */
+#define        EISCONN         106     /* Transport endpoint is already 
connected */
+
+
+/******************************************************************************
  * memory.h
  *
  * Memory reservation and information.
@@ -285,5 +322,9 @@ static inline int hypercall_memory_op(int cmd ,void *arg)
 {
        return _hypercall2(int, memory_op, cmd ,arg);
 }
+static inline int hypercall_sched_op(int cmd, void *arg)
+{
+       return _hypercall2(int, sched_op, cmd, arg);
+}
 
 #endif
-- 
1.7.4.1


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