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] handle EVTCHNOPs from prvicmd

To: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Subject: [XenPPC] [pushed] [ppc] handle EVTCHNOPs from prvicmd
From: jimix@xxxxxxxxxxxxxx
Date: Tue, 23 May 2006 16:51:16 -0400
Delivery-date: Tue, 23 May 2006 13:48:59 -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:   28277:6015477da516af171341708364dbb60c09fb2202
tag:         tip
user:        jimix@xxxxxxxxxxxxxxxxxxxxx
date:        Tue May 23 16:50:40 2006 -0400
files:       arch/powerpc/platforms/xen/hcall.c
description:
[ppc] handle EVTCHNOPs from prvicmd


diff -r fadeca5415a3d3104c3d20c6decf8029ea2a0016 -r 
6015477da516af171341708364dbb60c09fb2202 arch/powerpc/platforms/xen/hcall.c
--- a/arch/powerpc/platforms/xen/hcall.c        Tue May 23 10:36:55 2006 -0400
+++ b/arch/powerpc/platforms/xen/hcall.c        Tue May 23 16:50:40 2006 -0400
@@ -251,6 +251,38 @@ static int xenppc_privcmd_version(privcm
        return ret;
 }
 
+static int xenppc_privcmd_event_channel_op(privcmd_hypercall_t *hypercall)
+{
+       struct xencomm_desc *desc;
+       unsigned int argsize;
+       int ret;
+
+       switch (hypercall->arg[0]) {
+       case EVTCHNOP_alloc_unbound:
+               argsize = sizeof(evtchn_alloc_unbound_t);
+               break;
+
+       case EVTCHNOP_status:
+               argsize = sizeof(evtchn_status_t);
+               break;
+
+       default:
+               printk("%s: unknown EVTCHNOP (%ld)\n",
+                      __func__, hypercall->arg[0]);
+               return -EINVAL;
+       }
+
+       ret = xencomm_create((void *)hypercall->arg[1], argsize, &desc, 
GFP_KERNEL);
+       if (ret)
+               return ret;
+
+       ret = plpar_hcall_norets(XEN_MARK(hypercall->op), hypercall->arg[0],
+                       __pa(desc), 0, 0, 0, 0);
+
+       xencomm_free(desc);
+       return ret;
+}
+
 /* The PowerPC hypervisor runs in a separate address space from Linux
  * kernel/userspace, i.e. real mode. We must therefore translate userspace
  * pointers to something the hypervisor can make sense of. */
@@ -263,6 +295,8 @@ int arch_privcmd_hypercall(privcmd_hyper
                return xenppc_privcmd_memory_op(hypercall);
        case __HYPERVISOR_xen_version:
                return xenppc_privcmd_version(hypercall);
+       case __HYPERVISOR_event_channel_op:
+               return xenppc_privcmd_event_channel_op(hypercall);
        default:
                printk("%s: unknown hcall (%ld)\n", __func__, hypercall->op);
                return plpar_hcall_norets(XEN_MARK(hypercall->op),



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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [pushed] [ppc] handle EVTCHNOPs from prvicmd, jimix <=