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] [linux-2.6.18-xen] IA64: xencomm support for multi call

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] IA64: xencomm support for multi call with physdev_op and event_channel_op.
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 05 Dec 2008 10:10:11 -0800
Delivery-date: Fri, 05 Dec 2008 10:09:52 -0800
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 Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1228271912 -32400
# Node ID 6743af9fffc6f531a73af66a86738aa3ab4a2366
# Parent  6591b4869889bdd705267c47ac855f0c4bb7d75b
IA64: xencomm support for multi call with physdev_op and event_channel_op.

Recently the c/s of d545a95fca73 makes use of multi call
with __HYPERVISOR_event_channel_op and __HYPERVISOR_physdev_op.
This patch adds support of those hypercall.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 arch/ia64/xen/xcom_hcall.c |   78 +++++++++++++++++++++++++++++++++++++++------
 1 files changed, 69 insertions(+), 9 deletions(-)

diff -r 6591b4869889 -r 6743af9fffc6 arch/ia64/xen/xcom_hcall.c
--- a/arch/ia64/xen/xcom_hcall.c        Wed Nov 26 10:24:15 2008 +0900
+++ b/arch/ia64/xen/xcom_hcall.c        Wed Dec 03 11:38:32 2008 +0900
@@ -70,13 +70,27 @@ xencomm_hypercall_console_io(int cmd, in
 }
 EXPORT_SYMBOL_GPL(xencomm_hypercall_console_io);
 
+static int
+xencommize_event_channel_op(struct xencomm_mini **xc_area, void *op,
+                           struct xencomm_handle **desc)
+{
+       *desc = __xencomm_map_no_alloc(op, sizeof(evtchn_op_t), *xc_area);
+       if (*desc == NULL)
+               return -EINVAL;
+       (*xc_area)++;
+       return 0;
+}
+
 int
 xencomm_hypercall_event_channel_op(int cmd, void *op)
 {
-       struct xencomm_handle *desc;
-       desc = xencomm_map_no_alloc(op, sizeof(evtchn_op_t));
-       if (desc == NULL)
-               return -EINVAL;
+       int rc;
+       struct xencomm_handle *desc;
+       XENCOMM_MINI_ALIGNED(xc_area, 2);
+
+       rc = xencommize_event_channel_op(&xc_area, op, &desc);
+       if (rc)
+               return rc;
 
        return xencomm_arch_hypercall_event_channel_op(cmd, desc);
 }
@@ -127,8 +141,9 @@ xencomm_hypercall_xen_version(int cmd, v
 }
 EXPORT_SYMBOL_GPL(xencomm_hypercall_xen_version);
 
-int
-xencomm_hypercall_physdev_op(int cmd, void *op)
+static int
+xencommize_physdev_op(struct xencomm_mini **xc_area, int cmd, void *op,
+                     struct xencomm_handle **desc)
 {
        unsigned int argsize;
        
@@ -159,9 +174,26 @@ xencomm_hypercall_physdev_op(int cmd, vo
                printk("%s: unknown physdev op %d\n", __func__, cmd);
                return -ENOSYS;
        }
-       
-       return xencomm_arch_hypercall_physdev_op
-               (cmd, xencomm_map_no_alloc(op, argsize));
+
+       *desc = __xencomm_map_no_alloc(op, argsize, *xc_area);
+       if (*desc == NULL)
+               return -EINVAL;
+       (*xc_area)++;
+       return 0;
+}
+
+int
+xencomm_hypercall_physdev_op(int cmd, void *op)
+{
+       int rc;
+       struct xencomm_handle *desc;
+       XENCOMM_MINI_ALIGNED(xc_area, 2);
+
+       rc = xencommize_physdev_op(&xc_area, cmd, op, &desc);
+       if (rc)
+               return rc;
+
+       return xencomm_arch_hypercall_physdev_op(cmd, desc);
 }
 
 static int
@@ -320,6 +352,34 @@ xencomm_hypercall_multicall(void *call_l
                                return rc;
                        mce->args[1] = (unsigned long)desc;
                        break;
+               case __HYPERVISOR_event_channel_op:
+                       rc = xencommize_event_channel_op(&xc_area,
+                                                        (void *)mce->args[1],
+                                                        &desc);
+                       if (rc)
+                               return rc;
+                       mce->args[1] = (unsigned long)desc;
+                       break;
+               case __HYPERVISOR_physdev_op:
+                       switch (mce->args[0]) {
+                       case PHYSDEVOP_eoi: {
+                               struct physdev_eoi *eoi =
+                                       (struct physdev_eoi *)mce->args[1];
+                               mce->op = __HYPERVISOR_ia64_fast_eoi;
+                               mce->args[0] = eoi->irq;
+                               break;
+                       }
+                       default:
+                               rc = xencommize_physdev_op(&xc_area,
+                                                          mce->args[0],
+                                                          (void *)mce->args[1],
+                                                          &desc);
+                               if (rc)
+                                       return rc;
+                               mce->args[1] = (unsigned long)desc;
+                               break;
+                       }
+                       break;
                case __HYPERVISOR_memory_op:
                default:
                        printk("%s: unhandled multicall op entry op %lu\n",

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] IA64: xencomm support for multi call with physdev_op and event_channel_op., Xen patchbot-linux-2.6.18-xen <=