From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933112AbbCPVFD (ORCPT ); Mon, 16 Mar 2015 17:05:03 -0400 Received: from g4t3426.houston.hp.com ([15.201.208.54]:35195 "EHLO g4t3426.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932400AbbCPVE7 convert rfc822-to-8bit (ORCPT ); Mon, 16 Mar 2015 17:04:59 -0400 From: "Kani, Toshimitsu" To: Ingo Molnar CC: "akpm@linux-foundation.org" , "hpa@zytor.com" , "tglx@linutronix.de" , "mingo@redhat.com" , "linux-mm@kvack.org" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "dave.hansen@intel.com" , "Elliott, Robert (Server Storage)" , "pebolle@tiscali.nl" Subject: Re: [PATCH v3 2/5] mtrr, x86: Fix MTRR lookup to handle inclusive entry Thread-Topic: [PATCH v3 2/5] mtrr, x86: Fix MTRR lookup to handle inclusive entry Thread-Index: AQHQXdWAAYmKsgQGJEa0TV+p+9RT1p0ev+kAgADd1g0= Date: Mon, 16 Mar 2015 21:03:52 +0000 Message-ID: References: <1426282421-25385-1-git-send-email-toshi.kani@hp.com> <1426282421-25385-3-git-send-email-toshi.kani@hp.com>,<20150316074954.GA15955@gmail.com> In-Reply-To: <20150316074954.GA15955@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Mar 16, 2015, at 3:50 AM, Ingo Molnar wrote: > > > * Toshi Kani wrote: > >> When an MTRR entry is inclusive to a requested range, i.e. >> the start and end of the request are not within the MTRR >> entry range but the range contains the MTRR entry entirely, >> __mtrr_type_lookup() ignores such a case because both >> start_state and end_state are set to zero. >> >> This patch fixes the issue by adding a new flag, 'inclusive', >> to detect the case. This case is then handled in the same >> way as (!start_state && end_state). > > It would be nice to discuss the high level effects of this fix in the > changelog: i.e. what (presumably bad thing) happened before the > change, what will happen after the change? What did users experience > before the patch, and what will users experience after the patch? The original code uses this function to track memory attributes of ioremap'd ranges in order to avoid any aliasing. So, ignoring MTRR entries leads a tracked memory attribute different from its effective memory attribute. I will document more details in the next version. I will update the patchset next week. Thanks, -Toshi