From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754809AbbCLN7L (ORCPT ); Thu, 12 Mar 2015 09:59:11 -0400 Received: from g4t3427.houston.hp.com ([15.201.208.55]:48579 "EHLO g4t3427.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754063AbbCLN7H (ORCPT ); Thu, 12 Mar 2015 09:59:07 -0400 Message-ID: <1426168698.17007.385.camel@misato.fc.hp.com> Subject: Re: [PATCH 3/3] mtrr, mm, x86: Enhance MTRR checks for KVA huge page mapping From: Toshi Kani To: Ingo Molnar Cc: "akpm@linux-foundation.org" , "hpa@zytor.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "arnd@arndb.de" , "linux-mm@kvack.org" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "dave.hansen@intel.com" , "Elliott, Robert (Server Storage)" , "pebolle@tiscali.nl" Date: Thu, 12 Mar 2015 07:58:18 -0600 In-Reply-To: <20150312110333.GA6898@gmail.com> References: <1426018997-12936-1-git-send-email-toshi.kani@hp.com> <1426018997-12936-4-git-send-email-toshi.kani@hp.com> <20150311070216.GD29788@gmail.com> <1426092728.17007.380.camel@misato.fc.hp.com> <20150312110333.GA6898@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-03-12 at 11:03 +0000, Ingo Molnar wrote: > * Toshi Kani wrote: > > > > Did it perhaps want to be the other way around: > > > > > > if (mtrr_state.have_fixed && (start < 0x1000000)) { > > > ... > > > } else if (start < 0x100000) { > > > ... > > > > > > or did it simply mess up the condition? > > > > I think it was just paranoid to test the same condition twice... > > Read the code again, it's _not_ the same condition ... Oh, I see... It must be a typo. The fixed range is 0x0 to 0xFFFFF, so it only makes sense to check with (start < 0x100000). Thanks, -Toshi