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-changelog

[Xen-changelog] [xen-unstable] xen: define raw version of set_xen_guest_

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xen: define raw version of set_xen_guest_handle
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 15 Sep 2010 07:40:29 -0700
Delivery-date: Wed, 15 Sep 2010 07:45:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1284395393 -3600
# Node ID 35318cc05a50528d8e15585c23cf4578c31702c3
# Parent  ec31bb01c4243df239dbdbe362e8296afda91cc0
xen: define raw version of set_xen_guest_handle

allows users to define more complex (e.g. type-safer) variations on
set_xen_guest_handle if they wish.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
 xen/include/public/arch-ia64.h           |    3 ++-
 xen/include/public/arch-x86/xen-x86_32.h |    4 ++--
 xen/include/public/arch-x86/xen.h        |    3 ++-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff -r ec31bb01c424 -r 35318cc05a50 xen/include/public/arch-ia64.h
--- a/xen/include/public/arch-ia64.h    Mon Sep 13 17:27:22 2010 +0100
+++ b/xen/include/public/arch-ia64.h    Mon Sep 13 17:29:53 2010 +0100
@@ -49,10 +49,11 @@
 #define XEN_GUEST_HANDLE(name)          __guest_handle_ ## name
 #define XEN_GUEST_HANDLE_64(name)       XEN_GUEST_HANDLE(name)
 #define uint64_aligned_t                uint64_t
-#define set_xen_guest_handle(hnd, val)  do { (hnd).p = val; } while (0)
+#define set_xen_guest_handle_raw(hnd, val)  do { (hnd).p = val; } while (0)
 #ifdef __XEN_TOOLS__
 #define get_xen_guest_handle(val, hnd)  do { val = (hnd).p; } while (0)
 #endif
+#define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
 
 #ifndef __ASSEMBLY__
 typedef unsigned long xen_pfn_t;
diff -r ec31bb01c424 -r 35318cc05a50 xen/include/public/arch-x86/xen-x86_32.h
--- a/xen/include/public/arch-x86/xen-x86_32.h  Mon Sep 13 17:27:22 2010 +0100
+++ b/xen/include/public/arch-x86/xen-x86_32.h  Mon Sep 13 17:29:53 2010 +0100
@@ -108,8 +108,8 @@
         __guest_handle_ ## name;                                \
     typedef struct { union { type *p; uint64_aligned_t q; }; }  \
         __guest_handle_64_ ## name
-#undef set_xen_guest_handle
-#define set_xen_guest_handle(hnd, val)                      \
+#undef set_xen_guest_handle_raw
+#define set_xen_guest_handle_raw(hnd, val)                  \
     do { if ( sizeof(hnd) == 8 ) *(uint64_t *)&(hnd) = 0;   \
          (hnd).p = val;                                     \
     } while ( 0 )
diff -r ec31bb01c424 -r 35318cc05a50 xen/include/public/arch-x86/xen.h
--- a/xen/include/public/arch-x86/xen.h Mon Sep 13 17:27:22 2010 +0100
+++ b/xen/include/public/arch-x86/xen.h Mon Sep 13 17:29:53 2010 +0100
@@ -44,10 +44,11 @@
 #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(hnd, val)  do { (hnd).p = val; } while (0)
+#define set_xen_guest_handle_raw(hnd, val)  do { (hnd).p = val; } while (0)
 #ifdef __XEN_TOOLS__
 #define get_xen_guest_handle(val, hnd)  do { val = (hnd).p; } while (0)
 #endif
+#define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
 
 #if defined(__i386__)
 #include "xen-x86_32.h"

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xen: define raw version of set_xen_guest_handle, Xen patchbot-unstable <=