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

Re: [Xen-devel] [PATCH v2 3/8] xen: Use typesafe gfn/mfn in guest_physmap_* helpers



>>> On 20.06.16 at 15:37, <julien.grall@xxxxxxx> wrote:
> Also rename some variables to gfn or mfn when it does not require much
> rework.
> 
> Signed-off-by: Julien Grall <julien.grall@xxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
with one remark:

> @@ -787,39 +792,39 @@ guest_physmap_add_entry(struct domain *d, unsigned long 
> gfn,
>      /* Then, look for m->p mappings for this range and deal with them */
>      for ( i = 0; i < (1UL << page_order); i++ )
>      {
> -        if ( page_get_owner(mfn_to_page(_mfn(mfn + i))) == dom_cow )
> +        if ( page_get_owner(mfn_to_page(mfn_add(mfn, i))) == dom_cow )
>          {
>              /* This is no way to add a shared page to your physmap! */
> -            gdprintk(XENLOG_ERR, "Adding shared mfn %lx directly to dom %hu 
> "
> -                        "physmap not allowed.\n", mfn+i, d->domain_id);
> +            gdprintk(XENLOG_ERR, "Adding shared mfn %lx directly to dom %hu 
> physmap not allowed.\n",
> +                     mfn_x(mfn_add(mfn, i)), d->domain_id);

The %hu here would better become %d (and perhaps the space
ahead of it also removed).

Jan


_______________________________________________
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®.