From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNPHW-0006Jm-Bx for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:44:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XNPHR-0006pH-4z for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:44:10 -0400 Received: from mail-lb0-f172.google.com ([209.85.217.172]:47164) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XNPHQ-0006pC-V6 for qemu-devel@nongnu.org; Fri, 29 Aug 2014 12:44:05 -0400 Received: by mail-lb0-f172.google.com with SMTP id 10so2964450lbg.3 for ; Fri, 29 Aug 2014 09:44:04 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <5400AD69.5040706@twiddle.net> References: <1409311292-18860-1-git-send-email-peter.maydell@linaro.org> <1409311292-18860-6-git-send-email-peter.maydell@linaro.org> <5400AD69.5040706@twiddle.net> From: Peter Maydell Date: Fri, 29 Aug 2014 17:43:43 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 05/10] target-arm: Implement setting of watchpoints List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Paolo Bonzini , QEMU Developers , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Patch Tracking On 29 August 2014 17:42, Richard Henderson 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