From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751190AbcCKJY3 (ORCPT ); Fri, 11 Mar 2016 04:24:29 -0500 Received: from mail.skyhub.de ([78.46.96.112]:59907 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750744AbcCKJYT (ORCPT ); Fri, 11 Mar 2016 04:24:19 -0500 Date: Fri, 11 Mar 2016 10:24:00 +0100 From: Borislav Petkov To: Toshi Kani Cc: mingo@kernel.org, hpa@zytor.com, tglx@linutronix.de, mcgrof@suse.com, jgross@suse.com, paul.gortmaker@windriver.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] x86/mtrr: Refactor PAT initialization code Message-ID: <20160311092400.GB4347@pd.tnic> References: <1457671546-13486-1-git-send-email-toshi.kani@hpe.com> <1457671546-13486-3-git-send-email-toshi.kani@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1457671546-13486-3-git-send-email-toshi.kani@hpe.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 10, 2016 at 09:45:46PM -0700, Toshi Kani wrote: > MTRR manages PAT initialization as it implements a rendezvous > handler that initializes PAT as part of MTRR initialization. > > When CPU does not support MTRR, ex. qemu32 virtual CPU, MTRR > simply skips PAT init, which causes PAT left enabled without > initialization. Also, get_mtrr_state() calls pat_init() on > BSP even if MTRR is disabled by its MSR. This causes pat_init() > be called on BSP only. So I don't understand what all this hoopla is all about: why can't you simply call pat_disable() in mtrr_ap_init() and be done with it? void mtrr_ap_init(void) { if (!mtrr_enabled()) { pat_disable(); return; } ? -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply.