All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andres Lagar-Cavilla <andres@lagarcavilla.org>
To: xen-devel@lists.xen.org
Cc: ian.jackson@citrix.com, andres@gridcentric.ca, tim@xen.org,
	ian.campbell@citrix.com, adin@gridcentric.ca
Subject: [PATCH 1 of 2] x86/mem_sharing: Clean up debugging calls
Date: Mon, 02 Apr 2012 15:11:03 -0400	[thread overview]
Message-ID: <f110cf1372a894851231.1333393863@xdev.gridcentric.ca> (raw)
In-Reply-To: <patchbomb.1333393862@xdev.gridcentric.ca>

 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@lagarcavilla.org>

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;

  reply	other threads:[~2012-04-02 19:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-02 19:11 [PATCH 0 of 2] Sharing Documentation Andres Lagar-Cavilla
2012-04-02 19:11 ` Andres Lagar-Cavilla [this message]
2012-04-02 19:11 ` [PATCH 2 of 2] Document the sharing interface Andres Lagar-Cavilla
2012-04-05 10:15 ` [PATCH 0 of 2] Sharing Documentation Tim Deegan
2012-04-12 14:18   ` Andres Lagar-Cavilla
2012-04-23 17:06     ` Andres Lagar-Cavilla
2012-04-24 18:08   ` Ian Jackson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f110cf1372a894851231.1333393863@xdev.gridcentric.ca \
    --to=andres@lagarcavilla.org \
    --cc=adin@gridcentric.ca \
    --cc=andres@gridcentric.ca \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.