On 25/02/2019 11:39, George Dunlap wrote:
> On Fri, Feb 22, 2019 at 7:15 PM Andrew Cooper <andrew.coop...@citrix.com> 
> wrote:
>> iremap_maddr and qinval_maddr point to the base of a block of contiguous RAM,
>> allocated by the driver, holding the Interrupt Remapping table, and the 
>> Queued
>> Invalidation ring.
>>
>> Despite their name, they are actually the values of the hardware register,
>> including control metadata in the lower 12 bits.  While uses of these fields
>> do appear to correctly shift out the metadata, this is very subtle behaviour
>> and confusing to follow.
> Could I suggest that we add an ASSERT() to that macro, that maddr is
> page aligned?
>
> The algorithm used certainly assumes that's the case, and would
> produce incorrect results if it were ever validly true.  Such an
> ASSERT() would also have detected the storing-garbage-in-maddr issue
> almost immediately.

Where would you suggest putting such an ASSERT() ?  This variable is
written exactly once.

Irrespective, I plan to replace the existing scheme with a vmap()'d one
which will delete this variable completely.

~Andrew

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

Reply via email to