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-ppc-devel

[XenPPC] [pushed] [ppc] build multicall but the hcall is still unhooked

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [pushed] [ppc] build multicall but the hcall is still unhooked
From: jimix@xxxxxxxxxxxxxx
Date: Tue, 23 May 2006 10:30:20 -0400
Delivery-date: Tue, 23 May 2006 07:28:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
changeset:   10379:b551a6e96c11117c0a8dac11c27e92069e7784d5
user:        jimix@xxxxxxxxxxxxxxxxxxxxx
date:        Tue May 23 10:20:01 2006 -0400
files:       xen/arch/ppc/hcalls.c xen/include/asm-ppc/guest_access.h
description:
[ppc] build multicall but the hcall is still unhooked


diff -r e103e54a3f343b8c222d337554f427dc5e6cf63a -r 
b551a6e96c11117c0a8dac11c27e92069e7784d5 xen/arch/ppc/hcalls.c
--- a/xen/arch/ppc/hcalls.c     Mon May 22 16:08:01 2006 -0400
+++ b/xen/arch/ppc/hcalls.c     Tue May 23 10:20:01 2006 -0400
@@ -21,6 +21,7 @@
 #include <xen/sched.h>
 #include <xen/lib.h>
 #include <xen/init.h>
+#include <xen/multicall.h>
 #include <public/xen.h>
 #include <asm/current.h>
 #include <asm/papr.h>
@@ -71,6 +72,22 @@ static void hcall_xen(ulong num, struct 
     }
 
     regs->gprs[3] = xen_hvcall_jump(regs, address);
+}
+
+void do_multicall_call(multicall_entry_t *call)
+{
+    struct cpu_user_regs regs;
+
+    regs.gprs[3] = call->args[0];
+    regs.gprs[4] = call->args[1];
+    regs.gprs[5] = call->args[2];
+    regs.gprs[6] = call->args[3];
+    regs.gprs[7] = call->args[4];
+    regs.gprs[8] = call->args[5];
+
+    hcall_xen(call->op, &regs);
+
+    call->result = regs.gprs[3];
 }
 
 void do_hcall(struct cpu_user_regs *regs)
diff -r e103e54a3f343b8c222d337554f427dc5e6cf63a -r 
b551a6e96c11117c0a8dac11c27e92069e7784d5 xen/include/asm-ppc/guest_access.h
--- a/xen/include/asm-ppc/guest_access.h        Mon May 22 16:08:01 2006 -0400
+++ b/xen/include/asm-ppc/guest_access.h        Tue May 23 10:20:01 2006 -0400
@@ -73,15 +73,12 @@ extern void xencomm_add_offset(void *han
     xencomm_copy_to_guest(_x, _y, sizeof(*_x)*(nr), sizeof(*_x)*(idx)); \
 })
 
-/*
-XXX offset sizeof stuff looks broken, but there are no users anyways
 #define __copy_field_to_guest(hnd, ptr, field) ({                   \
-    const int _off = offsetof(typeof(ptr), field);                  \
-    const typeof(ptr) _x = (hnd).p;                                 \
-    const typeof(ptr) _y = (ptr);                                   \
+    const int _off = offsetof(typeof(*ptr), field);                  \
+    const typeof(&(ptr)->field) _x = &(hnd).p->field;               \
+    const typeof(&(ptr)->field) _y = &(ptr)->field;                 \
     xencomm_copy_to_guest(_x, _y, sizeof(*_x), sizeof(*_x)*(_off)); \
 })
-*/
 
 #define __copy_from_guest_offset(ptr, hnd, idx, nr) ({              \
     const typeof(ptr) _x = (hnd).p;                                 \
@@ -89,14 +86,11 @@ XXX offset sizeof stuff looks broken, bu
     xencomm_copy_from_guest(_y, _x, sizeof(*_x)*(nr), sizeof(*_x)*(idx));  \
 })
 
-/*
-XXX offset sizeof stuff looks broken, but there are no users anyways
 #define __copy_field_from_guest(ptr, hnd, field) ({                 \
-    const int _off = offsetof(typeof(ptr), field);                  \
-    const typeof(ptr) _x = (hnd).p;                                 \
-    const typeof(ptr) _y = (ptr);                                   \
-    xencomm_copy_to_guest(_x, _y, sizeof(*_x), sizeof(*_x)*(_off)); \
+    const int _off = offsetof(typeof(*ptr), field);                 \
+    const typeof(&(ptr)->field) _x = &(hnd).p->field;               \
+    const typeof(&(ptr)->field) _y = &(ptr)->field;                 \
+    xencomm_copy_to_guest(_y, _x, sizeof(*_x), sizeof(*_x)*(_off)); \
 })
-*/
 
 #endif /* __PPC_GUEST_ACCESS_H__ */



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

<Prev in Thread] Current Thread [Next in Thread>