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

Re: [Xen-devel] [PATCH v2 8/8] xen/arm: p2m_cache_flush: Use the correct terminology and typesafe gfn



Hi Andrew,

On 20/06/16 15:53, Andrew Cooper wrote:
On 20/06/16 14:37, Julien Grall wrote:
p2m_cache_flush is expecting GFNs in parameter and not MFNs. Rename
the variable to *gfn* and use typesafe to avoid possible misusage.

Signed-off-by: Julien Grall <julien.grall@xxxxxxx>

On arm32, xen_pfn_t was uint64_t, but gfn_t is unsigned long.

Is the truncation ok?

The PFN will be encoded on 28 bits maximum (40 bits address). Unless we want to check that the guest effectively zeroed the unused bits, I think the truncation is fine.

FWIW, this is not the only place where the truncation xen_pfn_t (aka uin64_t) -> unsigned long happens.

Regards,

--
Julien Grall

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