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
|