From: Daniel Castro <evil.dani@gmail.com>
To: xen-devel@lists.xensource.com
Cc: Daniel Castro <evil.dani@gmail.com>
Subject: [PATCH 07/10] Xen: Support for sched_op hypercall
Date: Fri, 19 Aug 2011 01:03:24 +0900 [thread overview]
Message-ID: <1313683408-32306-8-git-send-email-evil.dani@gmail.com> (raw)
In-Reply-To: <1313683408-32306-1-git-send-email-evil.dani@gmail.com>
Adds support for CPU yield operation until event arrives.
Signed-off-by: Daniel Castro <evil.dani@gmail.com>
---
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@xensource.com>
+ */
+
+
+
+/*
+ * 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
next prev parent reply other threads:[~2011-08-18 16:03 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-18 16:03 [PATCH 00/10] Xenstore communication support for Seabios Daniel Castro
2011-08-18 16:03 ` [PATCH 01/10] Xen: Guest Handlers and Copyrights Daniel Castro
2011-08-18 16:03 ` [PATCH 02/10] Move PAGE_SHIFT to memmap.h Daniel Castro
2011-08-24 17:51 ` Konrad Rzeszutek Wilk
2011-08-24 21:08 ` Ian Campbell
2011-08-18 16:03 ` [PATCH 03/10] Xen: Use PAGE_SHIFT as a constant Daniel Castro
2011-08-18 16:03 ` [PATCH 04/10] Xen: Support for interdomain event channel Daniel Castro
2011-08-18 16:03 ` [PATCH 05/10] Xen: Support for HVM_op Hypercall Daniel Castro
2011-08-18 16:03 ` [PATCH 06/10] Xen: Support for memory_op Hypercall Daniel Castro
2011-08-18 16:03 ` Daniel Castro [this message]
2011-08-18 16:03 ` [PATCH 08/10] Xen: Shared info for CPU yield support and xenbus protocol Daniel Castro
2011-08-18 16:03 ` [PATCH 09/10] Xen: Xenstore communication via xenbus Daniel Castro
2011-08-18 16:03 ` [PATCH 10/10] Xen: Xenstore example -do not apply Daniel Castro
2011-08-18 16:03 ` [PATCH 10/10] Xen: Xenstore example Daniel Castro
2011-08-24 17:56 ` [PATCH 00/10] Xenstore communication support for Seabios Konrad Rzeszutek Wilk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1313683408-32306-8-git-send-email-evil.dani@gmail.com \
--to=evil.dani@gmail.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.