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
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
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel

Reply via email to