From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvHi5-0003eR-NU for qemu-devel@nongnu.org; Tue, 04 Apr 2017 02:12:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvHi2-0004ir-KZ for qemu-devel@nongnu.org; Tue, 04 Apr 2017 02:12:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52404) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cvHi2-0004iK-Eg for qemu-devel@nongnu.org; Tue, 04 Apr 2017 02:12:54 -0400 Message-ID: <1491286370.1455.22.camel@redhat.com> From: Gerd Hoffmann Date: Tue, 04 Apr 2017 08:12:50 +0200 In-Reply-To: <81c92413-024a-5448-1160-b24ca944e88e@ilande.co.uk> References: <1490856931-21732-1-git-send-email-kraxel@redhat.com> <1490881315.28523.11.camel@redhat.com> <1491221026.17505.39.camel@redhat.com> <1491223335.17505.48.camel@redhat.com> <81c92413-024a-5448-1160-b24ca944e88e@ilande.co.uk> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 Subject: Re: [Qemu-devel] [RfC PATCH 0/4] make display updates thread safe. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Cave-Ayland Cc: Paolo Bonzini , Alex =?ISO-8859-1?Q?Benn=E9e?= , qemu-devel@nongnu.org Hi, > - unsigned long align =3D 1 << (TARGET_PAGE_BITS + BITS_PER_LEVEL); > + unsigned long align =3D 1UL << (TARGET_PAGE_BITS + BITS_PER_LEVEL); > There were 2 issues here: without the UL suffix on align I was getting > incorrect first/last addresses since the high bits of align weren't > being cleared, Ah, thanks, I'll add that. > and then offset appeared to be shifted twice. Yep, noticed that too meanwhile, fixed in the branch pushed half an hour ago. I've dropped the other shift though ;) cheers, Gerd