Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4055099yba; Wed, 17 Apr 2019 03:41:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzaemG4rlurZx7BFgmoJ7JaBuZyudBny49YmQFRZAKLM0DcgP0rKQQpQqD+M1keeDqy0qC/ X-Received: by 2002:a62:474a:: with SMTP id u71mr88269566pfa.87.1555497716994; Wed, 17 Apr 2019 03:41:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555497716; cv=none; d=google.com; s=arc-20160816; b=sWfvEcfuqWQk9rAFJhJhSrzfOad2JmezOPpg9vc8FmKMqEdinYdwkmFn5M8a/jrXlE 6PbOP0VFRdSt+WI4U+DOL8EBg6rBG85UsQ8HD6OXcQA9N0JNNNJrxfJp9PYeDqq4DRAm GmJIh1mUq63XQSmOfHK5JABTan6wlvPJZCDI7yyOktferLX/rqJ9GfNW6qguuy51+xRS oZ/3ywkZGuxTZ71h+Px88qhzCybqqFjBELpDJ1NyoGkwVeje6MFRbBGIjAyB/BIZpSab e3CqCJaJHPv6rXGVGIYC0P06LYjmXhpisPUUnaN3ZnixGyD1GuLwbuUYHGOk6zstiZuz FeMg== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=hhHWXk5tFuLTqEa6mBYeaa5y7AYAU91w2hFpy0BNIhw=; b=gBx27v5Mo8OwRl6m5/4Ac8zBNTxr+ZsSSkE2uCpYwv2o3x6a+ymvzVZtMw9Fyekt+i ++gPvUIa8pDgiwcUjZ6zv1LssVifIiDk3ns6X6Kbc673ll+XtRkgs0sAPLkKoHt2zAMo s4AAFvO8ymmhjXugWWaFIsVSDpaAB44PjZStnOrOKGwWqm9EfNMqWFoKZxI+2QQ+ONXk sypB6zVGyNsejqyUurWllzUsNfd/Ma8+naSva9GEPwHc81P8p7gQXMkG4DDR7V16aoBW 8aRHpQ4yhfNlMYzBIxh7d7ad7Ohlk8dpjspIOpmf9PVVgVClVJHlKXnMwR/r9EOKe1tK a5jw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o33si15022434plb.189.2019.04.17.03.41.42; Wed, 17 Apr 2019 03:41:56 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731817AbfDQKke (ORCPT + 99 others); Wed, 17 Apr 2019 06:40:34 -0400 Received: from mga04.intel.com ([192.55.52.120]:54616 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729584AbfDQKke (ORCPT ); Wed, 17 Apr 2019 06:40:34 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Apr 2019 03:40:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,361,1549958400"; d="scan'208";a="132119892" Received: from jsakkine-mobl1.tm.intel.com (HELO localhost) ([10.237.50.189]) by orsmga007.jf.intel.com with ESMTP; 17 Apr 2019 03:40:27 -0700 From: Jarkko Sakkinen To: linux-kernel@vger.kernel.org, x86@kernel.org, linux-sgx@vger.kernel.org Cc: akpm@linux-foundation.org, dave.hansen@intel.com, sean.j.christopherson@intel.com, nhorman@redhat.com, npmccallum@redhat.com, serge.ayoun@intel.com, shay.katz-zamir@intel.com, haitao.huang@intel.com, andriy.shevchenko@linux.intel.com, tglx@linutronix.de, kai.svahn@intel.com, bp@alien8.de, josh@joshtriplett.org, luto@kernel.org, kai.huang@intel.com, rientjes@google.com, Dave Hansen , Jarkko Sakkinen Subject: [PATCH v20 06/28] x86/mm: x86/sgx: Add new 'PF_SGX' page fault error code bit Date: Wed, 17 Apr 2019 13:39:16 +0300 Message-Id: <20190417103938.7762-7-jarkko.sakkinen@linux.intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190417103938.7762-1-jarkko.sakkinen@linux.intel.com> References: <20190417103938.7762-1-jarkko.sakkinen@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sean Christopherson The SGX bit is set in the #PF error code if and only if the fault is detected by the Enclave Page Cache Map (EPCM), a hardware-managed table that enforces the paging permissions defined by the enclave, e.g. to prevent the kernel from changing the permissions of an enclave's page(s). Despite triggering a #PF, a #PF with PF_SGX has nothing to do with paging. Cc: Dave Hansen Signed-off-by: Sean Christopherson Signed-off-by: Jarkko Sakkinen --- arch/x86/include/asm/traps.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h index 7d6f3f3fad78..c3e02912e9c7 100644 --- a/arch/x86/include/asm/traps.h +++ b/arch/x86/include/asm/traps.h @@ -171,5 +171,6 @@ enum x86_pf_error_code { X86_PF_RSVD = 1 << 3, X86_PF_INSTR = 1 << 4, X86_PF_PK = 1 << 5, + X86_PF_SGX = 1 << 15, }; #endif /* _ASM_X86_TRAPS_H */ -- 2.19.1