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

[Xen-changelog] [linux-2.6.18-xen] [IA64] xencomm update for acm interface change



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1181685161 21600
# Node ID 1483ef74511b1c9819212aac9f67232a66f71adf
# Parent  a62cfa35d3b504d5ee1acd4a409a6fb3ee45a6bd
[IA64] xencomm update for acm interface change

Changed by c/s 15189:96915ca8d5f2 of xen-unstable.h

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 arch/ia64/xen/xcom_privcmd.c |   57 +++++++++++++++++++++----------------------
 include/asm-ia64/hypercall.h |    6 ++--
 2 files changed, 31 insertions(+), 32 deletions(-)

diff -r a62cfa35d3b5 -r 1483ef74511b arch/ia64/xen/xcom_privcmd.c
--- a/arch/ia64/xen/xcom_privcmd.c      Tue Jun 12 15:48:23 2007 -0600
+++ b/arch/ia64/xen/xcom_privcmd.c      Tue Jun 12 15:52:41 2007 -0600
@@ -338,40 +338,39 @@ static int
 static int
 xencomm_privcmd_acm_op(privcmd_hypercall_t *hypercall)
 {
-       int cmd = hypercall->arg[0];
-       void __user *arg = (void __user *)hypercall->arg[1];
+       void __user *arg = (void __user *)hypercall->arg[0];
+       xen_acmctl_t kern_arg;
        struct xencomm_handle *op_desc;
        struct xencomm_handle *desc = NULL;
        int ret;
 
-       switch (cmd) {
-       case ACMOP_getssid:
-       {
-               struct acm_getssid kern_arg;
-
-               if (copy_from_user(&kern_arg, arg, sizeof (kern_arg)))
+       if (copy_from_user(&kern_arg, arg, sizeof(kern_arg)))
+               return -EFAULT;
+       if (kern_arg.interface_version != ACM_INTERFACE_VERSION)
+               return -ENOSYS;
+       
+       switch (kern_arg.cmd) {
+       case ACMOP_getssid: {
+               op_desc = xencomm_create_inline(&kern_arg);
+
+               ret = xencomm_create(
+                       xen_guest_handle(kern_arg.u.getssid.ssidbuf),
+                       kern_arg.u.getssid.ssidbuf_size, &desc, GFP_KERNEL);
+               if (ret)
+                       return ret;
+
+               set_xen_guest_handle(kern_arg.u.getssid.ssidbuf, (void *)desc);
+
+               ret = xencomm_arch_hypercall_acm_op(op_desc);
+
+               xencomm_free(desc);
+
+               if (copy_to_user(arg, &kern_arg, sizeof(kern_arg)))
                        return -EFAULT;
-
-               op_desc = xencomm_create_inline(&kern_arg);
-
-               ret = xencomm_create(xen_guest_handle(kern_arg.ssidbuf),
-                                    kern_arg.ssidbuf_size, &desc, GFP_KERNEL);
-               if (ret)
-                       return ret;
-
-               set_xen_guest_handle(kern_arg.ssidbuf, (void *)desc);
-
-               ret = xencomm_arch_hypercall_acm_op(cmd, op_desc);
-
-               xencomm_free(desc);
-
-               if (copy_to_user(arg, &kern_arg, sizeof (kern_arg)))
-                       return -EFAULT;
-
-               return ret;
-       }
-       default:
-               printk("%s: unknown acm_op cmd %d\n", __func__, cmd);
+               return ret;
+       }
+       default:
+               printk("%s: unknown acm_op cmd %d\n", __func__, kern_arg.cmd);
                return -ENOSYS;
        }
 
diff -r a62cfa35d3b5 -r 1483ef74511b include/asm-ia64/hypercall.h
--- a/include/asm-ia64/hypercall.h      Tue Jun 12 15:48:23 2007 -0600
+++ b/include/asm-ia64/hypercall.h      Tue Jun 12 15:52:41 2007 -0600
@@ -157,9 +157,9 @@ xencomm_arch_hypercall_event_channel_op(
 }
 
 static inline int
-xencomm_arch_hypercall_acm_op(unsigned int cmd, struct xencomm_handle *arg)
-{
-       return _hypercall2(int, acm_op, cmd, arg);
+xencomm_arch_hypercall_acm_op(struct xencomm_handle *arg)
+{
+       return _hypercall1(int, acm_op, arg);
 }
 
 static inline int

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


 


Rackspace

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