From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932965AbbCPVJ2 (ORCPT ); Mon, 16 Mar 2015 17:09:28 -0400 Received: from g4t3427.houston.hp.com ([15.201.208.55]:54991 "EHLO g4t3427.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932885AbbCPVJY convert rfc822-to-8bit (ORCPT ); Mon, 16 Mar 2015 17:09:24 -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 3/5] mtrr, x86: Fix MTRR state checks in mtrr_type_lookup() Thread-Topic: [PATCH v3 3/5] mtrr, x86: Fix MTRR state checks in mtrr_type_lookup() Thread-Index: AQHQXdWBp0Ei2CjjSEaE5SfSzGxFcZ0ewGaAgADelC0= Date: Mon, 16 Mar 2015 21:08:16 +0000 Message-ID: <06AEC393-4271-46BB-913E-4909C3ED0C08@hp.com> References: <1426282421-25385-1-git-send-email-toshi.kani@hp.com> <1426282421-25385-4-git-send-email-toshi.kani@hp.com>,<20150316075139.GB15955@gmail.com> In-Reply-To: <20150316075139.GB15955@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:51 AM, Ingo Molnar wrote: > > > * Toshi Kani wrote: > >> 'mtrr_state.enabled' contains FE (fixed MTRRs enabled) and >> E (MTRRs enabled) flags in MSR_MTRRdefType. Intel SDM, >> section 11.11.2.1, defines these flags as follows: >> - All MTRRs are disabled when the E flag is clear. >> The FE flag has no affect when the E flag is clear. >> - The default type is enabled when the E flag is set. >> - MTRR variable ranges are enabled when the E flag is set. >> - MTRR fixed ranges are enabled when both E and FE flags >> are set. >> >> MTRR state checks in __mtrr_type_lookup() do not follow the >> SDM definitions. Therefore, this patch fixes the MTRR state >> checks according to the SDM. This patch defines the flags >> in mtrr_state.enabled as follows. print_mtrr_state() is also >> updated. >> - FE flag: MTRR_STATE_MTRR_FIXED_ENABLED >> - E flag: MTRR_STATE_MTRR_ENABLED >> >> Lastly, this patch fixes the 'else if (start < 0x1000000)', >> which checks a fixed range but has an extra-zero in the >> address, to 'else' with no condition. > > Firstly, this does multiple bug fixes in a single patch, which is a > no-no: please split it up into separate patches. Right. I will split into two patches. > Secondly, please also outline the differences between the old code and > the new code - don't just list the SDM logic and state that we are > updating to it. Yes, I will update the patch log accordingly. Thanks, -Toshi