|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 5/8] xen: Use the typesafe mfn and gfn in map_mmio_regions...
>>> On 14.06.16 at 14:07, <julien.grall@xxxxxxx> wrote:
> to avoid mixing machine frame with guest frame.
>
> Signed-off-by: Julien Grall <julien.grall@xxxxxxx>
Non-ARM bits:
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
> @@ -2217,10 +2217,11 @@ int map_mmio_regions(struct domain *d,
> i += 1UL << order, ++iter )
> {
> /* OR'ing gfn and mfn values will return an order suitable to both.
> */
> - for ( order = mmio_order(d, (start_gfn + i) | (mfn + i), nr - i); ;
> + for ( order = mmio_order(d, (gfn_x(start_gfn) + i) | (mfn_x(mfn) +
> i), nr - i); ;
> order = ret - 1 )
> {
> - ret = set_mmio_p2m_entry(d, start_gfn + i, _mfn(mfn + i), order,
> + ret = set_mmio_p2m_entry(d, gfn_x(start_gfn) + i,
> + _mfn(mfn_x(mfn) + i), order,
Considering this new instance I realize we really should have
constructs like mfn_add() to avoid such ugly to read expressions.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |