Received: by 10.213.65.68 with SMTP id h4csp410558imn; Tue, 13 Mar 2018 08:12:58 -0700 (PDT) X-Google-Smtp-Source: AG47ELtWkvp8lGaiHfzKyl/lHpMjJ4b8PZGVpQgb0pQfThPqppZ290NZciwhGl1DV6cbbm00pVeP X-Received: by 10.99.157.142 with SMTP id i136mr820041pgd.14.1520953978713; Tue, 13 Mar 2018 08:12:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1520953978; cv=none; d=google.com; s=arc-20160816; b=QWTcaPAvA6MzLFKOYW46hVZXEPh5wxzC84faCvSb8gTXmdrVNQ3+mDu4asbSNRdXNa /oIyQ13dR2r/EZeIAc7VU1AFH1/Z5WVMsXBJ+yv+n6vK0MaJ9dVBnCd6Hn0z2kJOQW1c UMPIN2zs6yxkXl6TGFOJKCioqhcEwJcwBHDclbe+YrjuHzMHoANuksxQ9gWvkdMFe2pW VlracLbrSs0NF5u8EpVoXBmY2CFfEg0QSM6Egosy/gLTGrUlt1GNnRho19SE1VKx2/oO yEm6w8Addf8SSXIWUZb6QKag5qILLTVttREdGWG5Hz8pEffKZA8/ld8QWXZztdR5Y8tI xJaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject:arc-authentication-results; bh=CQEdQ4hHiITa+joYhYv4aAkNNBUVbKFQwj8ABy1mKV4=; b=BmqkhTK4YOjM2NS+7wJj8vLpbS+BaLMMUnvSTDnL6o3tlrWyNDeiUoLPEQPeB4uyfI n0uHtUQyhVlQ7fSsVirMOWOjhOBn6EkK45n5T9K/hlq8ZeNEtm7xR3qYf1e3Lk12+c1f NAIAFOu6Y69ECmPSvRbNvEQoObFJRM2pGdy2jc8sE7A5gBzDxEqR7APtLPyvLx3t2NJ8 9nYc+AAVWXS5dR4HoR7sUC+I4xW0aEYNL4goh/2vKoq4japjgi1IUmQAF00084ny3Vul pB2unoOj2aI0A94qhCRxoZ6BGsdL++cBPePfqQokNZEwJKLJYEsLGZVgZPc48N/Ccea8 p39A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x8-v6si269870plo.129.2018.03.13.08.12.44; Tue, 13 Mar 2018 08:12:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751903AbeCMPJv (ORCPT + 99 others); Tue, 13 Mar 2018 11:09:51 -0400 Received: from mga07.intel.com ([134.134.136.100]:10506 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751494AbeCMPJt (ORCPT ); Tue, 13 Mar 2018 11:09:49 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Mar 2018 08:09:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,465,1515484800"; d="scan'208";a="34630726" Received: from unknown (HELO [10.24.8.91]) ([10.24.8.91]) by orsmga003.jf.intel.com with ESMTP; 13 Mar 2018 08:09:49 -0700 Subject: Re: [tip:x86/mm] x86/tme: Detect if TME and MKTME is activated by BIOS To: "Kirill A. Shutemov" , Kai Huang References: <20180305162610.37510-3-kirill.shutemov@linux.intel.com> <1520907122.6421.8.camel@linux.intel.com> <20180313124956.z426zmsr4xl6zomx@node.shutemov.name> Cc: peterz@infradead.org, hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, torvalds@linux-foundation.org, kirill.shutemov@linux.intel.com, thomas.lendacky@amd.com, linux-tip-commits@vger.kernel.org From: Dave Hansen Message-ID: <7b0ef81b-c46b-5fa2-6a69-c008310b2e94@intel.com> Date: Tue, 13 Mar 2018 08:09:48 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180313124956.z426zmsr4xl6zomx@node.shutemov.name> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/13/2018 05:49 AM, Kirill A. Shutemov wrote: > On Tue, Mar 13, 2018 at 03:12:02PM +1300, Kai Huang wrote: >> It seems setup_pku() will call get_cpu_cap to restore c->x86_phys_bits >> later? In which case I think you need to change setup_pku as well. > Thanks for catching this. > > I think setup_pku() shouldn't call get_cpu_cap(). I think if you want to make it illegal to call get_cpu_cap() twice, you should enforce that.