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-ia64-devel

[Xen-ia64-devel] [PATCH] 1/3 Fix PV driver domains - xenlinux xencomm su

To: xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-ia64-devel] [PATCH] 1/3 Fix PV driver domains - xenlinux xencomm support
From: Alex Williamson <alex.williamson@xxxxxx>
Date: Thu, 07 Aug 2008 14:20:23 -0600
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Thu, 07 Aug 2008 13:20:23 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: OSLO R&D
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
This adds xencomm support for several PHYSDEVOP calls (manage_pci_add,
manage_pci_remove, map_pirq, and unmap_pirq) as well
as XEN_DOMCTL_assign_device.

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
--

diff -r 2866e6af503e arch/ia64/xen/xcom_hcall.c
--- a/arch/ia64/xen/xcom_hcall.c        Thu Jul 31 15:33:54 2008 +0100
+++ b/arch/ia64/xen/xcom_hcall.c        Thu Aug 07 13:51:05 2008 -0600
@@ -143,6 +143,16 @@ xencomm_hypercall_physdev_op(int cmd, vo
                break;
        case PHYSDEVOP_irq_status_query:
                argsize = sizeof(physdev_irq_status_query_t);
+               break;
+       case PHYSDEVOP_manage_pci_add:
+       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:
diff -r 2866e6af503e arch/ia64/xen/xcom_privcmd.c
--- a/arch/ia64/xen/xcom_privcmd.c      Thu Jul 31 15:33:54 2008 +0100
+++ b/arch/ia64/xen/xcom_privcmd.c      Thu Aug 07 13:51:05 2008 -0600
@@ -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;
@@ -828,6 +829,36 @@ xencomm_privcmd_ia64_debug_op(privcmd_hy
        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
 privcmd_hypercall(privcmd_hypercall_t *hypercall)
 {
@@ -854,6 +885,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-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH] 1/3 Fix PV driver domains - xenlinux xencomm support, Alex Williamson <=