Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp505766ybk; Wed, 20 May 2020 05:18:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUHwx+XsxrChicAhaSFQsg2961dfb3xpWozNMbzujgCF7Op5VQsm9gub9u35J07n3oQuhG X-Received: by 2002:a17:906:379b:: with SMTP id n27mr3333284ejc.432.1589977139123; Wed, 20 May 2020 05:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589977139; cv=none; d=google.com; s=arc-20160816; b=cxvm57E/ks01jrjt29a3Zk7MfuZ0yhxd2b6GryZG44wseJw1CeOHTN7rNx51N8oSO7 J9MAEhWpWDJ95Apd1Njx37vVvbCZjvIHeboVe4xRid7cUYtr2y2XLF+9fMs1ixjheAIq YnumNeWnB1rNu7HF4FIYGyIVU82AL3UXAFMiurNHs1Oa7UXuedj6W/QKOGfUCVEZO86J uciDNdNaNOBPeaeFr9Rulum5CsMma3oXfGOzAP3TM+72i+3LaoH/QxMur6xLeUqRsjdH zSTHvnoS2RIgh7rLlMB/9X2cU1WbiHBxOe6GkdHWwwJL/YF57cBSVNSDJKjTqLCEEIkx 5iug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MLD/1PujuqFss8hz/rJreIyFo+695cA8jplss0woFC0=; b=tbWdlhuFxqWxDwHO1rfBs8hWmF+a1aNGArkepHXWGT10CltdhBdulPf4zKyZ64YGRN k21CwC16/ylG2L+HMrCXgmkb11WL4jr4TeEIeFETkrTK8j/UDT/L+ko1RIjyXOAebWHZ F6RA7bEjHsdrXrvOqWJd1QYPrMnIL71wrD5ZgSOIA3eT5AfbPI+zuO/u338WhuJJYSH8 Sac3trWulpmkOSdVcUHGJjqRS7aFHyuBjOb4qmHsNLTLt6DqKDe3bv502+XHfGmaolAs +pEgN0dSXKQZusgn8AmmIuTKxvPyxbEoaM7uG565NRFOAikcO9JcX5iLQLDhuXUFUa4r DNwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=B5qxRDCT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u23si1331064edy.361.2020.05.20.05.18.35; Wed, 20 May 2020 05:18:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=B5qxRDCT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726856AbgETMQb (ORCPT + 99 others); Wed, 20 May 2020 08:16:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726224AbgETMQ3 (ORCPT ); Wed, 20 May 2020 08:16:29 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A5901C061A0E for ; Wed, 20 May 2020 05:16:29 -0700 (PDT) Received: from zn.tnic (p200300ec2f0bab004cc75e27543cdd50.dip0.t-ipconnect.de [IPv6:2003:ec:2f0b:ab00:4cc7:5e27:543c:dd50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id ABFD81EC0350; Wed, 20 May 2020 14:16:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1589976986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=MLD/1PujuqFss8hz/rJreIyFo+695cA8jplss0woFC0=; b=B5qxRDCTQxiyFy4fFKxZK2LdpdIx/LzOzUBuO69SdVrpw7DsLMMikIfLwHcA2gLZsMjPnD mK8y8epGTitGCAfn4S5hFNG6bCUs3WdpoPA/ar1PdfiUGOKL+phkljOR2MAjq42s7yHKkI 1gk2InIuHiuU9tXKjFyi7dISZ8nFSss= Date: Wed, 20 May 2020 14:16:21 +0200 From: Borislav Petkov To: Jarkko Sakkinen Cc: linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org, akpm@linux-foundation.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, haitao.huang@intel.com, andriy.shevchenko@linux.intel.com, tglx@linutronix.de, kai.svahn@intel.com, josh@joshtriplett.org, luto@kernel.org, kai.huang@intel.com, rientjes@google.com, cedric.xing@intel.com, puiterwijk@redhat.com, Jethro Beekman Subject: Re: [PATCH v30 01/20] x86/cpufeatures: x86/msr: Add Intel SGX hardware bits Message-ID: <20200520121604.GF1457@zn.tnic> References: <20200515004410.723949-1-jarkko.sakkinen@linux.intel.com> <20200515004410.723949-2-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200515004410.723949-2-jarkko.sakkinen@linux.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 15, 2020 at 03:43:51AM +0300, Jarkko Sakkinen wrote: > From: Sean Christopherson > > Add X86_FEATURE_SGX from CPUID.(EAX=7, ECX=1), which informs whether the > CPU has SGX. > > Add X86_FEATURE_SGX1 and X86_FEATURE_SGX2 from CPUID.(EAX=12H, ECX=0), > which describe the level of SGX support available [1]. > > Remap CPUID.(EAX=12H, ECX=0) bits to the Linux fake CPUID 8 in order to > conserve some space. Keep the bit positions intact because KVM requires > this. Reserve bits 0-7 for SGX in order to maintain this invariant also > when new SGX specific feature bits get added. That paragraph needs dropping now. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette