From: Daniel Castro <evil.dani@gmail.com>
To: xen-devel@lists.xensource.com
Cc: Daniel Castro <evil.dani@gmail.com>
Subject: [PATCH 01/10] Xen: Guest Handlers and Copyrights
Date: Fri, 19 Aug 2011 01:03:18 +0900 [thread overview]
Message-ID: <1313683408-32306-2-git-send-email-evil.dani@gmail.com> (raw)
In-Reply-To: <1313683408-32306-1-git-send-email-evil.dani@gmail.com>
These are used as part of the Xen hypercall interfaces.
Signed-off-by: Daniel Castro <evil.dani@gmail.com>
---
src/xen.h | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 58 insertions(+), 3 deletions(-)
diff --git a/src/xen.h b/src/xen.h
index 0ed1e9f..f65078a 100644
--- a/src/xen.h
+++ b/src/xen.h
@@ -17,6 +17,8 @@ static inline int usingXen(void) {
}
unsigned long xen_hypercall_page;
+typedef unsigned long xen_ulong_t;
+typedef unsigned long xen_pfn_t;
#define _hypercall0(type, name) \
({ \
@@ -121,15 +123,68 @@ unsigned long xen_hypercall_page;
* DEALINGS IN THE SOFTWARE.
*/
-/* xen.h */
+/******************************************************************************
+ * arch-x86/xen.h
+ *
+ * Guest OS interface to x86 Xen.
+ *
+ * Copyright (c) 2004-2006, K A Fraser
+ */
-#define __HYPERVISOR_xen_version 17
-/* version.h */
+/* Structural guest handles introduced in 0x00030201. */
+#define ___DEFINE_XEN_GUEST_HANDLE(name, type) \
+ typedef struct { type *p; } __guest_handle_ ## name
+
+#define __DEFINE_XEN_GUEST_HANDLE(name, type) \
+ ___DEFINE_XEN_GUEST_HANDLE(name, type); \
+ ___DEFINE_XEN_GUEST_HANDLE(const_##name, const type)
+#define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
+#define __XEN_GUEST_HANDLE(name) __guest_handle_ ## name
+#define XEN_GUEST_HANDLE(name) __XEN_GUEST_HANDLE(name)
+#define set_xen_guest_handle_raw(hnd, val) do { (hnd).p = val; } while (0)
+#define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
+
+/******************************************************************************
+ * version.h
+ *
+ * Xen version, type, and compile information.
+ *
+ * Copyright (c) 2005, Nguyen Anh Quynh <aquynh@gmail.com>
+ * Copyright (c) 2005, Keir Fraser <keir@xensource.com>
+ */
/* arg == xen_extraversion_t. */
#define XENVER_extraversion 1
typedef char xen_extraversion_t[16];
#define XEN_EXTRAVERSION_LEN (sizeof(xen_extraversion_t))
+/******************************************************************************
+ * xen.h
+ *
+ * Guest OS interface to Xen.
+ *
+ * Copyright (c) 2004, K A Fraser
+ */
+
+#define DOMID_SELF (0x7FF0U)
+
+/* Guest handles for primitive C types. */
+DEFINE_XEN_GUEST_HANDLE(char);
+__DEFINE_XEN_GUEST_HANDLE(uchar, unsigned char);
+DEFINE_XEN_GUEST_HANDLE(int);
+__DEFINE_XEN_GUEST_HANDLE(uint, unsigned int);
+DEFINE_XEN_GUEST_HANDLE(long);
+__DEFINE_XEN_GUEST_HANDLE(ulong, unsigned long);
+DEFINE_XEN_GUEST_HANDLE(void);
+
+DEFINE_XEN_GUEST_HANDLE(u64);
+DEFINE_XEN_GUEST_HANDLE(xen_pfn_t);
+
+__DEFINE_XEN_GUEST_HANDLE(u8, u8);
+__DEFINE_XEN_GUEST_HANDLE(u16, u16);
+__DEFINE_XEN_GUEST_HANDLE(u32, u32);
+
+#define __HYPERVISOR_xen_version 17
+
#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 ` Daniel Castro [this message]
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 ` [PATCH 07/10] Xen: Support for sched_op hypercall Daniel Castro
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-2-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.