Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2257031ybi; Sat, 13 Jul 2019 10:11:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwRSEYLR0xbRHEsX2Qo185n4eQpIhxcFb4unjZaSinmNCsn/N4qqeunJ/WErZXRYF8DMc09 X-Received: by 2002:a17:90a:2525:: with SMTP id j34mr19876224pje.11.1563037918403; Sat, 13 Jul 2019 10:11:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563037918; cv=none; d=google.com; s=arc-20160816; b=ZSFW1m6Fv/Hdlg0gwrmE8nzZWzNV+1Mgd11C6V3R1C2ankHG4SaQTdleZOwnNq6RAk Cc3mBklABjnNj3ecSjDcucxb69iuYCLHl7zUFTLqd8if8qv4IML6ENdpnFzQP9qWQctn oHrurqQxGLEO/KaqvC2SjTjw4OQvk3ifRsck5miUKcqA8aAzvE7Ci0xN7lMKOZhttiOf g4Kz6+KGaQHUYCpZ7uigAURsdBOC1l0dGgJWANyKwq8XM0cccJrDfh0PFRbQ/55jQ4Il ICQZEYPI7kFoCV8CjqPfp1JlAUjuVp3OnyVXSzieWe3AX00geqTvZcjtAnnR72O4PlgK DzKg== 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=sTogyCdiYjYh+bgKnUO/RLE15EVGv+dRp/Oxr/Zhm3c=; b=urYe2vXukuCVCt0kMg2M4OciirH4Mt5HImG3oZWEU5dmCP8c6NdJLfpsc4fhNzSeLV EPPuNjqbPMkfdc7aR0+wBcqS7vXZsnLgG5T1mXG6T4HA3DswMnuECE0D6/F9q2AdVQLf 3iyuv2XDitsPemghH/iI8JMvAGntDOl82v96463V03IKWerI212fn8ha3vd2WwfpDxvJ Ly0/qbQv/dgvifPyi+lMYK6FvPHqYmf/mhT7Es+wFI4sfrO864nntG8wxt0PEa3B+W5j a765oKTmBLB0SuK5GJGMBy77shRQBoqOj1v2RZTlsS9CDgGJpTfQyoaY1g8+CqW1wC9w WxgA== 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 o23si12182264pfp.131.2019.07.13.10.11.43; Sat, 13 Jul 2019 10:11: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728148AbfGMRJS (ORCPT + 99 others); Sat, 13 Jul 2019 13:09:18 -0400 Received: from mga12.intel.com ([192.55.52.136]:62192 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727939AbfGMRJS (ORCPT ); Sat, 13 Jul 2019 13:09:18 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Jul 2019 10:09:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,487,1557212400"; d="scan'208";a="341981167" Received: from hbriegel-mobl.ger.corp.intel.com (HELO localhost) ([10.252.50.48]) by orsmga005.jf.intel.com with ESMTP; 13 Jul 2019 10:09:07 -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, cedric.xing@intel.com, Dave Hansen , Jarkko Sakkinen Subject: [PATCH v21 06/28] x86/mm: x86/sgx: Add new 'PF_SGX' page fault error code bit Date: Sat, 13 Jul 2019 20:07:42 +0300 Message-Id: <20190713170804.2340-7-jarkko.sakkinen@linux.intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190713170804.2340-1-jarkko.sakkinen@linux.intel.com> References: <20190713170804.2340-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.20.1