[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] [IA64] xencomm: support DOM0VP_get_memmap



# HG changeset patch
# User Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
# Date 1223006924 -32400
# Node ID 7d2d7b1deda42a8542f98697ad8f86195432b04b
# Parent  96655d262fa5a82310872faa8ae295418db9517d
[IA64] xencomm: support DOM0VP_get_memmap

add xencomm support for DOM0VP_get_memmap.

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 arch/ia64/xen/xcom_privcmd.c |   22 ++++++++++++++++++++++
 include/asm-ia64/hypercall.h |    7 +++++++
 2 files changed, 29 insertions(+)

diff -r 96655d262fa5 -r 7d2d7b1deda4 arch/ia64/xen/xcom_privcmd.c
--- a/arch/ia64/xen/xcom_privcmd.c      Fri Oct 03 13:07:57 2008 +0900
+++ b/arch/ia64/xen/xcom_privcmd.c      Fri Oct 03 13:08:44 2008 +0900
@@ -799,6 +799,23 @@ xencomm_privcmd_sched_op(privcmd_hyperca
 }
 
 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 @@ xencomm_privcmd_ia64_dom0vp_op(privcmd_h
                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 96655d262fa5 -r 7d2d7b1deda4 include/asm-ia64/hypercall.h
--- a/include/asm-ia64/hypercall.h      Fri Oct 03 13:07:57 2008 +0900
+++ b/include/asm-ia64/hypercall.h      Fri Oct 03 13:08:44 2008 +0900
@@ -390,6 +390,13 @@ HYPERVISOR_unexpose_foreign_p2m(unsigned
 {
        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
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.