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

Re: [Xen-devel] [PATCH v2 5/6] gnttab: fix/adjust gnttab_transfer()



On 15/06/15 13:28, Jan Beulich wrote:
> - don't update shared entry's frame number for translated domains (as
>   MFNs shouldn't be exposed to such guests)
> - for v1 grant table format, force copying of the page also when the
>   intended MFN doesn't fit in 32 bits (and the domain isn't translated)
> - fix an apparent off-by-one error (it's unclear to me why commit
>   5cc77f9098 ("32-on-64: Fix domain address-size clamping, implement")
>   uses BITS_PER_LONG-1 here, while using BITS_PER_LONG in the two other
>   invocations of domain_clamp_alloc_bitsize())
> - adjust comments accompanying the shared entry's frame field
>
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, although...

>
> --- a/xen/common/grant_table.c
> +++ b/xen/common/grant_table.c
> @@ -1708,7 +1708,8 @@ gnttab_transfer(
>          }
>  
>          max_bitsize = domain_clamp_alloc_bitsize(
> -            e, BITS_PER_LONG+PAGE_SHIFT-1);
> +            e, e->grant_table->gt_version > 1 || paging_mode_translate(e)

I would recommend two pairs of brackets here for clarity.

~Andrew

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