From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
xen-devel <xen-devel@lists.xenproject.org>
Cc: tamas@tklengyel.com
Subject: Re: [PATCH] x86/memshr: add static
Date: Tue, 6 Dec 2016 15:06:23 +0000 [thread overview]
Message-ID: <31740a04-df51-b8bb-12a6-032319d19ece@citrix.com> (raw)
In-Reply-To: <5846AE58020000780012594D@prv-mh.provo.novell.com>
On 06/12/16 11:26, Jan Beulich wrote:
The subject would be clearer as "x86/memshr: Make more symbols private"
> And with that drop mem_sharing_ prefixes as no longer meaningful. Once
> again convert GFN function argument types at once.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> with two small
suggestions.
> @@ -737,23 +733,23 @@ int mem_sharing_debug_mfn(mfn_t mfn)
> return num_refs;
> }
>
> -int mem_sharing_debug_gfn(struct domain *d, unsigned long gfn)
> +static int debug_gfn(struct domain *d, gfn_t gfn)
> {
> p2m_type_t p2mt;
> mfn_t mfn;
> int num_refs;
>
> - mfn = get_gfn_query(d, gfn, &p2mt);
> + mfn = get_gfn_query(d, gfn_x(gfn), &p2mt);
>
> MEM_SHARING_DEBUG("Debug for domain=%d, gfn=%lx, ",
Mind swapping to PRI_gfn while changing this area?
> - d->domain_id,
> - gfn);
> - num_refs = mem_sharing_debug_mfn(mfn);
> - put_gfn(d, gfn);
> + d->domain_id, gfn_x(gfn));
> + num_refs = debug_mfn(mfn);
> + put_gfn(d, gfn_x(gfn));
> +
> return num_refs;
> }
>
> -int mem_sharing_debug_gref(struct domain *d, grant_ref_t ref)
> +static int debug_gref(struct domain *d, grant_ref_t ref)
> {
> int rc;
> uint16_t status;
> @@ -800,8 +794,9 @@ int mem_sharing_nominate_page(struct dom
> struct page_info *pg = __grab_shared_page(mfn);
> if ( !pg )
> {
> - gdprintk(XENLOG_ERR, "Shared p2m entry gfn %lx, but could not "
> - "grab page %lx dom %d\n", gfn, mfn_x(mfn), d->domain_id);
> + gprintk(XENLOG_ERR,
> + "Shared p2m entry gfn %lx, but could not grab page %lx dom %d\n",
Can this be reworded to "grab mfn" rather than grab page, so make it
clear which address space the address is in? Also PRI_{m,g}fn.
~Andrew
> + gfn_x(gfn), mfn_x(mfn), d->domain_id);
> BUG();
> }
> *phandle = pg->sharing->handle;
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-12-06 15:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-06 11:26 [PATCH] x86/memshr: add static Jan Beulich
2016-12-06 15:06 ` Andrew Cooper [this message]
2016-12-06 21:14 ` Tamas K Lengyel
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=31740a04-df51-b8bb-12a6-032319d19ece@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=tamas@tklengyel.com \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).