From: Christoph Egger <Christoph.Egger@amd.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] xen: make (set|get)_xen_guest_handle available
Date: Thu, 30 Jul 2009 11:12:15 +0200 [thread overview]
Message-ID: <200907301112.15209.Christoph.Egger@amd.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 727 bytes --]
Hi!
Make (set|get)_xen_guest_handle() always available.
This avoids code snippets in the guest like this:
#if __XEN_ITNERFACE_VERSION__ >= 0x00030201
set_xen_guest_handle(hnd, val);
#else
hnd = val;
#endif
Also make get_xen_guest_handle() available for the guest.
It is useful for the guest, too.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
P.S.: Keir: Please apply this patch also in xen-3.4-testing and
xen-3.3-testing tree.
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
[-- Attachment #2: xen_public.diff --]
[-- Type: text/x-diff, Size: 787 bytes --]
diff -r 41b2c4e4f674 xen/include/public/arch-x86/xen.h
--- a/xen/include/public/arch-x86/xen.h Wed Jul 29 09:20:46 2009 +0100
+++ b/xen/include/public/arch-x86/xen.h Thu Jul 30 11:08:01 2009 +0200
@@ -44,9 +44,13 @@
#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)
+
+#if __XEN_INTERFACE_VERSION__ >= 0x00030201
#define set_xen_guest_handle(hnd, val) do { (hnd).p = val; } while (0)
-#ifdef __XEN_TOOLS__
#define get_xen_guest_handle(val, hnd) do { val = (hnd).p; } while (0)
+#else
+#define set_xen_guest_handle(hnd, val) (hnd) = val
+#define get_xen_guest_handle(val, hnd) val = (hnd)
#endif
#if defined(__i386__)
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2009-07-30 9:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-30 9:12 Christoph Egger [this message]
2009-07-30 10:06 ` [PATCH] xen: make (set|get)_xen_guest_handle available Keir Fraser
2009-07-30 10:14 ` Keir Fraser
2009-07-30 10:34 ` Christoph Egger
2009-07-30 11:16 ` Boris Derzhavets
2009-07-30 11:55 ` Christoph Egger
2009-07-30 12:41 ` Boris Derzhavets
2009-07-30 12:53 ` Christoph Egger
2009-07-30 13:24 ` Keir Fraser
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=200907301112.15209.Christoph.Egger@amd.com \
--to=christoph.egger@amd.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.