[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] [IA64] Fix PV driver domains - xenlinux xencomm support
# HG changeset patch # User Isaku Yamahata <yamahata@xxxxxxxxxxxxx> # Date 1218163175 -32400 # Node ID a18df47f671b66e0d0fe68c28a882a69303a9a55 # Parent 324a5c041301d42b662e20f6175cba6c9b26f262 [IA64] Fix PV driver domains - xenlinux xencomm support This adds xencomm support for several PHYSDEVOP calls (map_pirq and unmap_pirq) as well as XEN_DOMCTL_assign_device. Signed-off-by: Alex Williamson <alex.williamson@xxxxxx> --- arch/ia64/xen/xcom_hcall.c | 6 ++++++ arch/ia64/xen/xcom_privcmd.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff -r 324a5c041301 -r a18df47f671b arch/ia64/xen/xcom_hcall.c --- a/arch/ia64/xen/xcom_hcall.c Thu Aug 07 11:58:10 2008 +0900 +++ b/arch/ia64/xen/xcom_hcall.c Fri Aug 08 11:39:35 2008 +0900 @@ -148,6 +148,12 @@ xencomm_hypercall_physdev_op(int cmd, vo case PHYSDEVOP_manage_pci_remove: argsize = sizeof(physdev_manage_pci_t); break; + case PHYSDEVOP_map_pirq: + argsize = sizeof(physdev_map_pirq_t); + break; + case PHYSDEVOP_unmap_pirq: + argsize = sizeof(physdev_unmap_pirq_t); + break; default: printk("%s: unknown physdev op %d\n", __func__, cmd); diff -r 324a5c041301 -r a18df47f671b arch/ia64/xen/xcom_privcmd.c --- a/arch/ia64/xen/xcom_privcmd.c Thu Aug 07 11:58:10 2008 +0900 +++ b/arch/ia64/xen/xcom_privcmd.c Fri Aug 08 11:39:35 2008 +0900 @@ -327,6 +327,7 @@ xencomm_privcmd_domctl(privcmd_hypercall case XEN_DOMCTL_settimeoffset: case XEN_DOMCTL_sendtrigger: case XEN_DOMCTL_set_opt_feature: + case XEN_DOMCTL_assign_device: break; case XEN_DOMCTL_pin_mem_cacheattr: return -ENOSYS; @@ -829,6 +830,36 @@ xencomm_privcmd_ia64_debug_op(privcmd_hy xencomm_free(desc); return ret; +} + +static int +xencomm_privcmd_ia64_physdev_op(privcmd_hypercall_t *hypercall) +{ + int cmd = hypercall->arg[0]; + struct xencomm_handle *desc; + unsigned int argsize; + int ret; + + switch (cmd) { + case PHYSDEVOP_map_pirq: + argsize = sizeof(physdev_map_pirq_t); + break; + case PHYSDEVOP_unmap_pirq: + argsize = sizeof(physdev_unmap_pirq_t); + break; + default: + printk("%s: unknown PHYSDEVOP %d\n", __func__, cmd); + return -EINVAL; + } + + desc = xencomm_map((void *)hypercall->arg[1], argsize); + if ((void *)hypercall->arg[1] != NULL && argsize > 0 && desc == NULL) + return -ENOMEM; + + ret = xencomm_arch_hypercall_physdev_op(cmd, desc); + + xencomm_free(desc); + return ret; } int @@ -857,6 +888,8 @@ privcmd_hypercall(privcmd_hypercall_t *h return xencomm_privcmd_ia64_dom0vp_op(hypercall); case __HYPERVISOR_ia64_debug_op: return xencomm_privcmd_ia64_debug_op(hypercall); + case __HYPERVISOR_physdev_op: + return xencomm_privcmd_ia64_physdev_op(hypercall); default: printk("%s: unknown hcall (%ld)\n", __func__, hypercall->op); return -ENOSYS; _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |