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

Re: [Xen-devel] [v5][PATCH 1/2] xen:x86:mm:p2m: introduce set_identity_p2m_entry

>>> On 29.07.14 at 12:18, <tiejun.chen@xxxxxxxxx> wrote:
> On 2014/7/29 17:53, Jan Beulich wrote:
>>>>> On 29.07.14 at 11:11, <tiejun.chen@xxxxxxxxx> wrote:
>>> On 2014/7/29 16:19, Jan Beulich wrote:
>>>> ? Of course it may still be necessary to also inspect the obtained p2mt
>>>> and a.
>>> Are you saying this?
>>>     if ( !p2m_is_valid(p2mt) ||
>>>          !mfn_valid(mfn) ||
>>>          (a != p2m_access_rw) )
>> I'm afraid that's not enough context to know whether what you
>> mean to do is sufficient. Plus !p2m_is_valid() is too weak. You
>> simply need to properly think through what should happen if you
>> find a valid mapping, but any of the tuple (mfn, p2mt, a) don't
>> match what you intend to be there.
> Actually as I understand we can create these mapping only in one case of 
> !mfn_valid(mfn). For others scenarios we just return with that  warning 
> message no matter what that tuple is explicitly. So here I try to 
> understand why you're saying we need check more by show this condition 
> combination.

Perhaps, but with the exception that at least if the entire tuple
matches you should return success (and not print anything).
There might be further cases where an existing mapping would
be good enough (like a being p2m_access_rwx), but perhaps
there's not much point in trying to deal with them without explicit


Xen-devel mailing list



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