|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] x86/memshr: add static
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@xxxxxxxx>
Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> 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@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |