From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: Silence compiler warning in arch/x86/kvm/emulate.c Date: Fri, 19 Feb 2016 18:56:05 +0100 Message-ID: <56C75735.3010602@redhat.com> References: <142668.1440884956@turing-police.cc.vt.edu> <20160219111139.GA22041@aurel32.net> <20160219164548.GA28630@aurel32.net> <10537.1455904440@turing-police.cc.vt.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Aruna Hewapathirane To: Valdis.Kletnieks@vt.edu, Aurelien Jarno Return-path: Received: from mx1.redhat.com ([209.132.183.28]:53811 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1425137AbcBSR4K (ORCPT ); Fri, 19 Feb 2016 12:56:10 -0500 In-Reply-To: <10537.1455904440@turing-police.cc.vt.edu> Sender: kvm-owner@vger.kernel.org List-ID: -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 19/02/2016 18:54, Valdis.Kletnieks@vt.edu wrote: > la can get changed here - but there's 2 cases to consider. If it's > in a 32-bit kernel, anding with -1 is a no-op. > > Now if we're on a 64-bit kernel, the 'and' clears the high 32 > bits. > > But under what conditions is 'la' a 64-bit quantity that has any > bits set in the high 32 bits (meaning it's a pointer to something > over the 4G line) - but it's still valid to smash those bits? That can happen for example if there is a non-zero segment base. Then the linear address wraps at 4G. Paolo -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWx1cxAAoJEL/70l94x66DFBcIAIkWZ7KaTyh3gfy5Cur7aukA 8NkEKvxZxO46lQAiKxf5ORTdBCdtZDjUjbxTVJoguITK/nnXuBLQIP/aeDhfHdhz BTYumgH+QV+kmZfn7mwgY5omS05Qx08DmdpQ1jyu1Y1aPVBv6FlsoWcHFrA+oXI2 wtit0OejbPJ9gT4dv1S/etuJvzdINQ/Y4fh/ulkyJJRIw5vvEgW+PN81UNCiSust w1zkljlfoU4he54IWHa0R1Am/uQBmWRuhvzaMZVKdkGlrN/jJo4ObR5DX+qPujPB sGSw2HTh8p4IuLwAJ0PvZZPNag+6vdOv9jxJuFpRNQGZLYY5eHL1IFVHaESv0vQ= =ssTD -----END PGP SIGNATURE-----