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 5/7] linux, xencomm: support IA64_DOM0VP_get_mem

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH 5/7] linux, xencomm: support IA64_DOM0VP_get_memmap
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 2 Oct 2008 18:08:04 +0900
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Thu, 02 Oct 2008 02:04:17 -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>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.18 (2008-05-17)
diff -r 4c6040a8b621 arch/ia64/xen/xcom_privcmd.c
--- a/arch/ia64/xen/xcom_privcmd.c      Thu Oct 02 13:57:05 2008 +0900
+++ b/arch/ia64/xen/xcom_privcmd.c      Thu Oct 02 14:52:38 2008 +0900
@@ -799,6 +799,23 @@
 }
 
 static int
+xencomm_privcmd_dom0vp_get_memmap(domid_t domid,
+                                 char* __user buf, unsigned long bufsize)
+{
+       int ret;
+       struct xencomm_handle *desc;
+
+       desc = xencomm_map(buf, bufsize);
+       if (bufsize > 0 && desc == NULL)
+               return -ENOMEM;
+
+       ret = xencomm_arch_hypercall_get_memmap((domid_t)domid, desc);
+
+       xencomm_free(desc);
+       return ret;
+}
+
+static int
 xencomm_privcmd_ia64_dom0vp_op(privcmd_hypercall_t *hypercall)
 {
        int cmd = hypercall->arg[0];
@@ -827,6 +844,11 @@
                ret = xen_foreign_p2m_expose(hypercall);
                break;
 #endif
+       case IA64_DOM0VP_get_memmap:
+               ret = xencomm_privcmd_dom0vp_get_memmap(
+                       (domid_t)hypercall->arg[1],
+                       (char* __user)hypercall->arg[2], hypercall->arg[3]);
+               break;
        default:
                printk("%s: unknown IA64 DOM0VP op %d\n", __func__, cmd);
                ret = -EINVAL;
diff -r 4c6040a8b621 include/asm-ia64/hypercall.h
--- a/include/asm-ia64/hypercall.h      Thu Oct 02 13:57:05 2008 +0900
+++ b/include/asm-ia64/hypercall.h      Thu Oct 02 14:52:38 2008 +0900
@@ -391,6 +391,13 @@
        return _hypercall3(int, ia64_dom0vp_op,
                           IA64_DOM0VP_unexpose_foreign_p2m, gpfn, domid);
 }
+
+static inline int
+xencomm_arch_hypercall_get_memmap(domid_t domid, struct xencomm_handle *arg)
+{
+       return _hypercall3(int, ia64_dom0vp_op,
+                          IA64_DOM0VP_get_memmap, domid, arg);
+}
 #endif
 
 static inline int

Attachment: memmap-get.patch
Description: Text Data

_______________________________________________
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 5/7] linux, xencomm: support IA64_DOM0VP_get_memmap, Isaku Yamahata <=