# HG changeset patch # User yamahata@xxxxxxxxxxxxx # Date 1178524861 -32400 # Node ID 0417bce1329f9b58e678140a6d14192bd98cde31 # Parent 13267399e63b83125a12791c21b46811fc1878d5 xencomm stub for GNTTABOP_install_entry PATCHNAME: xencomm_gnttabop_isntall_entry Signed-off-by: Isaku Yamahata diff -r 13267399e63b -r 0417bce1329f linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c --- a/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c Mon May 07 17:00:04 2007 +0900 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xcom_privcmd.c Mon May 07 17:01:01 2007 +0900 @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -710,6 +711,35 @@ xencomm_privcmd_ia64_dom0vp_op(privcmd_h ret = -EINVAL; break; } + return ret; +} + +static int +xencomm_privcmd_grant_table_op(privcmd_hypercall_t *hypercall) +{ + int cmd = hypercall->arg[0]; + unsigned int count = hypercall->arg[2]; + unsigned int argsize; + struct xencomm_handle *desc; + int ret; + + switch (cmd) { + case GNTTABOP_install_entry: + argsize = sizeof(gnttab_install_entry_t) * count; + break; + default: + printk("%s: unknown GNTTABOP %d\n", __func__, cmd); + return -EINVAL; + } + + ret = xencomm_create((void *)hypercall->arg[1], argsize, + &desc, GFP_KERNEL); + if (ret) + return ret; + + ret = xencomm_arch_hypercall_grant_table_op(cmd, desc, count); + + xencomm_free(desc); return ret; } @@ -737,6 +767,8 @@ privcmd_hypercall(privcmd_hypercall_t *h return xencomm_privcmd_sched_op(hypercall); case __HYPERVISOR_ia64_dom0vp_op: return xencomm_privcmd_ia64_dom0vp_op(hypercall); + case __HYPERVISOR_grant_table_op: + return xencomm_privcmd_grant_table_op(hypercall); default: printk("%s: unknown hcall (%ld)\n", __func__, hypercall->op); return -ENOSYS;