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

Re: [Xen-devel] [PATCH 4/8] xen/arm: Add support for read-only foreign mappings



Hello Julien,


It is me again.

On 15.11.18 17:05, Julien Grall wrote:
On 11/15/18 1:19 PM, Andrii Anisov wrote:
So I would prefer to stick with _t which is quite common within the p2m
code base so far.

I've found a similar code only in one place - p2m_get_entry()
function. And it is, at least, somehow commented there:
...
     /* Allow t to be NULL */
     t = t ?: &_t;

     *t = p2m_invalid;
...

And in x86 code...
I've taken care to look into the x86 p2m code about that construction.

I've found it in x86's  `p2m_get_page_from_gfn` function. And it looks reasonable over there. Because that value is not only might be returned to a caller. But is needed by the function code itself to take decisions and passing it to called functions (which do not do a check for the null pointer).


Your code (as well as `p2m_get_entry`) does not actually use that value. So I see no need to calculate or keep it if it is not needed by a caller.

--
Sincerely,
Andrii Anisov.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.