On 29 August 2014 17:42, Richard Henderson <r...@twiddle.net> wrote:
> On 08/29/2014 04:21 AM, Peter Maydell wrote:
>> +        /* Watchpoint covers an aligned area up to 2GB in size */
>> +        len = 1ULL << mask;
>> +        /* If masked bits in WVR are not zero it's CONSTRAINED UNPREDICTABLE
>> +         * whether the watchpoint fires when the unmasked bits match; we opt
>> +         * to generate the exceptions.
>> +         */
>> +        wvr &= (len - 1);
>
> This looks funny... address being clipped to length?
> Surely it's ~(len - 1)...

Nice catch. Linux doesn't actually use this bit of the watchpoint
functionality, which is why I didn't notice.

-- PMM

Reply via email to