]> xenbits.xensource.com Git - xen.git/commitdiff
x86/mem_sharing: Clean up debugging calls
authorAndres Lagar-Cavilla <andres@lagarcavilla.org>
Tue, 24 Apr 2012 18:05:08 +0000 (19:05 +0100)
committerAndres Lagar-Cavilla <andres@lagarcavilla.org>
Tue, 24 Apr 2012 18:05:08 +0000 (19:05 +0100)
- Remove debug_mfn from the user-space interface
- Clean up errno codes

Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
Acked-by: Tim Deegan <tim@xen.org>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/libxc/xc_memshr.c
tools/libxc/xenctrl.h
xen/arch/x86/mm/mem_sharing.c

index ae60571deef66e597a79c7b4694d135a61121cdb..d6a9539267b40b7517aaefb0ec888183f4661b9e 100644 (file)
@@ -208,20 +208,6 @@ int xc_memshr_debug_gfn(xc_interface *xch,
     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)
index 812e72331d4a6dc41bafa7adc1c1c14eaa49d4e9..0163b73f48a3fb15fe0a5b32a31291c3e674bb8c 100644 (file)
@@ -1955,9 +1955,6 @@ int xc_memshr_domain_resume(xc_interface *xch,
 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);
index 42e8a976e8fba2988ba1192a24f56215b493a278..d4488ec9f6f8406fa7e465798f594096a2c38f25 100644 (file)
@@ -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 *d, grant_ref_t ref)
         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);
@@ -1222,13 +1222,6 @@ int mem_sharing_memop(struct domain *d, xen_mem_sharing_op_t *mec)
         }
         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;