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

[Xen-devel] [PATCH 1 of 2] x86/mem_sharing: Clean up debugging calls


  • To: xen-devel@xxxxxxxxxxxxx
  • From: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>
  • Date: Mon, 02 Apr 2012 15:11:03 -0400
  • Cc: ian.jackson@xxxxxxxxxx, andres@xxxxxxxxxxxxxx, tim@xxxxxxx, ian.campbell@xxxxxxxxxx, adin@xxxxxxxxxxxxxx
  • Delivery-date: Mon, 02 Apr 2012 19:08:15 +0000
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=lagarcavilla.org; h=content-type :mime-version:content-transfer-encoding:subject:message-id :in-reply-to:references:date:from:to:cc; q=dns; s= lagarcavilla.org; b=F2q4zN5LjDmibU6Ut8wicDVp4OHD+M8/h0riOkpTcRti HLdZs46HLOQlyy1UzjS/goyaOPGd0Thls21LoMaEH82ra8i93MxW/aV9AOC3gqPo v2q+5AozgzbQN+7f9jP1LnEu7tQ23cenwpUqDek0KZdjLDKOmjIvKu11UAvc8IM=
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

 tools/libxc/xc_memshr.c       |  14 --------------
 tools/libxc/xenctrl.h         |   3 ---
 xen/arch/x86/mm/mem_sharing.c |  11 ++---------
 3 files changed, 2 insertions(+), 26 deletions(-)


- Remove debug_mfn from the user-space interface
- Clean up errno codes

Signed-off-by: Andres Lagar-Cavilla <andres@xxxxxxxxxxxxxxxx>

diff -r 9f585ddcbe0c -r f110cf1372a8 tools/libxc/xc_memshr.c
--- a/tools/libxc/xc_memshr.c
+++ b/tools/libxc/xc_memshr.c
@@ -208,20 +208,6 @@ int xc_memshr_debug_gfn(xc_interface *xc
     return xc_memshr_memop(xch, domid, &mso);
 }
 
-int xc_memshr_debug_mfn(xc_interface *xch,
-                        domid_t domid,
-                        unsigned long mfn)
-{
-    xen_mem_sharing_op_t mso;
-
-    memset(&mso, 0, sizeof(mso));
-
-    mso.op = XENMEM_sharing_op_debug_mfn;
-    mso.u.debug.u.mfn = mfn; 
-
-    return xc_memshr_memop(xch, domid, &mso);
-}
-
 int xc_memshr_debug_gref(xc_interface *xch,
                          domid_t domid,
                          grant_ref_t gref)
diff -r 9f585ddcbe0c -r f110cf1372a8 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h
+++ b/tools/libxc/xenctrl.h
@@ -1960,9 +1960,6 @@ int xc_memshr_domain_resume(xc_interface
 int xc_memshr_debug_gfn(xc_interface *xch,
                         domid_t domid,
                         unsigned long gfn);
-int xc_memshr_debug_mfn(xc_interface *xch,
-                        domid_t domid,
-                        unsigned long mfn);
 int xc_memshr_debug_gref(xc_interface *xch,
                          domid_t domid,
                          grant_ref_t gref);
diff -r 9f585ddcbe0c -r f110cf1372a8 xen/arch/x86/mm/mem_sharing.c
--- a/xen/arch/x86/mm/mem_sharing.c
+++ b/xen/arch/x86/mm/mem_sharing.c
@@ -512,7 +512,7 @@ int mem_sharing_debug_mfn(mfn_t mfn)
     if ( (page = __grab_shared_page(mfn)) == NULL)
     {
         gdprintk(XENLOG_ERR, "Invalid MFN=%lx\n", mfn_x(mfn));
-        return -1;
+        return -EINVAL;
     }
 
     MEM_SHARING_DEBUG( 
@@ -599,7 +599,7 @@ int mem_sharing_debug_gref(struct domain
         MEM_SHARING_DEBUG( 
                 "Asked to debug [dom=%d,gref=%d], but not yet inited.\n",
                 d->domain_id, ref);
-        return -1;
+        return -EINVAL;
     }
     (void)mem_sharing_gref_to_gfn(d, ref, &gfn); 
     shah = shared_entry_header(d->grant_table, ref);
@@ -1216,13 +1216,6 @@ int mem_sharing_memop(struct domain *d, 
         }
         break;
 
-        case XENMEM_sharing_op_debug_mfn:
-        {
-            unsigned long mfn = mec->u.debug.u.mfn;
-            rc = mem_sharing_debug_mfn(_mfn(mfn));
-        }
-        break;
-
         case XENMEM_sharing_op_debug_gref:
         {
             grant_ref_t gref = mec->u.debug.u.gref;

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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