[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XenPPC] [linux-ppc-2.6] [ppc] new 32/64 bit safe XEN_GUEST_HANDLE



# HG changeset patch
# User Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
# Node ID 1445a5a7397df8f31e1b57b60bfa1199ced04251
# Parent  dbcd4b66a3d868bcc227c4a8ec71cd4cf8e56449
[ppc] new 32/64 bit safe XEN_GUEST_HANDLE

Signed-off-by: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
---
 include/xen/interface/arch-ppc64.h |   27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diff -r dbcd4b66a3d8 -r 1445a5a7397d include/xen/interface/arch-ppc64.h
--- a/include/xen/interface/arch-ppc64.h        Tue Jun 27 08:55:25 2006 -0400
+++ b/include/xen/interface/arch-ppc64.h        Thu Jun 29 13:03:32 2006 -0400
@@ -1,20 +1,21 @@
 /*
- * Copyright (C) 2005 Hollis Blanchard <hollisb@xxxxxxxxxx>, IBM Corporation
- *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
+ * Copyright (C) IBM Corp. 2005, 2006
+ *
+ * Authors: Hollis Blanchard <hollisb@xxxxxxxxxx>
  */
 
 #ifndef __XEN_PUBLIC_ARCH_PPC_64_H__
@@ -26,11 +27,20 @@
 #endif
 
 #define __DEFINE_XEN_GUEST_HANDLE(name, type) \
-    typedef struct { type *p; } __guest_handle_ ## name
+    typedef struct { \
+        int __pad[(sizeof (long long) - sizeof (void *)) / sizeof (int)]; \
+        type *p; \
+    } __attribute__((__aligned__(8))) __guest_handle_ ## name
 
 #define DEFINE_XEN_GUEST_HANDLE(name) __DEFINE_XEN_GUEST_HANDLE(name, name)
 #define XEN_GUEST_HANDLE(name)        __guest_handle_ ## name
-#define set_xen_guest_handle(hnd, val)  do { (hnd).p = val; } while (0)
+#define set_xen_guest_handle(hnd, val) \
+    do { \
+        if (sizeof ((hnd).__pad)) \
+            (hnd).__pad[0] = 0; \
+        (hnd).p = val; \
+    } while (0)
+
 #ifdef __XEN_TOOLS__
 #define get_xen_guest_handle(val, hnd)  do { val = (hnd).p; } while (0)
 #endif
@@ -80,6 +90,7 @@ struct cpu_user_regs
     uint64_t msr;
     uint64_t fpscr;
     uint64_t xer;
+    uint64_t hid4;
     uint32_t cr;
     uint32_t entry_vector;
 };
@@ -99,7 +110,7 @@ struct arch_shared_info {
 struct arch_shared_info {
 };
 
-struct  arch_vcpu_info {
+struct arch_vcpu_info {
 };
 
 /* Support for multi-processor guests. */

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.