Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2690695imd; Fri, 2 Nov 2018 16:16:24 -0700 (PDT) X-Google-Smtp-Source: AJdET5fpbc2mHZ/NMcCsFfjEzlDZ+dSfVlBJgk73fI0UXgdATjzAXnhEk4PZnmvPX5QoNJ2CbfJc X-Received: by 2002:a62:4816:: with SMTP id v22-v6mr5031200pfa.233.1541200584551; Fri, 02 Nov 2018 16:16:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541200584; cv=none; d=google.com; s=arc-20160816; b=ERkUEORwuZD/i5jvU2fhqxmtZlh5YSSWlRafhKBvuwS++2bTqc/a1H5ndNp1ck2CSJ L1t13BJJlLqlDnBtXH0CBu50qH6xXUNB0Dv9+lXRJe0I0rN7yO6tgtKhxZHpfDOJl3Ly 1U+7RWvgpf1dAtyswYsWVoyYzwv4xlpmcmXGN2llyv8AFSFwJ9ZNt2YelAvxgOCuyMFi rT3gSpVhrna0ofIN13vpRq0uQ6zfgOJ7mV4ZquoRsDgw8CZBXcUBcMJoZru/06InFJJn DiwbxZIOkWDIWmBziqLcAwISpR5+07g5UMdbMBCeBBEnjfjPIHLCRaQ1D3+4z4QaNUdz IvMw== 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=8C7zlNNgsevqS6nqIkTZz6H0EDf5MIQ1iyes1Zmr0LI=; b=wegNVAF5ONNjmk0hiN3fOHNaGTOW2IGcPSptZAAE8J/Q+iKszEyWrXjv3j5GEy/mBB nP9M/hplko/mGSKPy+IVLK+2I8SbMk/MzWJKWDyYi/XelyrS1SXYADJFLBtarJSOOd27 mj8i4a5MekG/o77CzdaqIRP7gCZl+6Qgnfml+2cck/IPYpLti1dKcIvxVFw13Tov6bUX ANPD6d7yVA6Sd00HDyJiWJlnsMsyhABlm3Qyrcfk2SUYNtva+2cW/z6O61nUUaVweNT7 te/dLVQJxXG/MOfX8cDuT0n6Raa5EiRMoTwAoM9+fvC7kfmZ7/d+iOVGWzTKf/iKdO4t JyyA== 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 20-v6si35586871pfk.287.2018.11.02.16.16.10; Fri, 02 Nov 2018 16:16:24 -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 S1728607AbeKCIYM (ORCPT + 99 others); Sat, 3 Nov 2018 04:24:12 -0400 Received: from mga11.intel.com ([192.55.52.93]:57112 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726877AbeKCIYL (ORCPT ); Sat, 3 Nov 2018 04:24:11 -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 fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Nov 2018 16:15:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,457,1534834800"; d="scan'208";a="270987762" Received: from btyborox-mobl.ger.corp.intel.com (HELO localhost) ([10.249.254.138]) by orsmga005.jf.intel.com with ESMTP; 02 Nov 2018 16:14:55 -0700 From: Jarkko Sakkinen To: x86@kernel.org, platform-driver-x86@vger.kernel.org, linux-sgx@vger.kernel.org Cc: 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, mark.shanahan@intel.com, andriy.shevchenko@linux.intel.com, Dave Hansen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Andy Lutomirski , David Woodhouse , linux-kernel@vger.kernel.org (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)) Subject: [PATCH v15 06/23] x86/mm: x86/sgx: Add new 'PF_SGX' page fault error code bit Date: Sat, 3 Nov 2018 01:11:05 +0200 Message-Id: <20181102231320.29164-7-jarkko.sakkinen@linux.intel.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181102231320.29164-1-jarkko.sakkinen@linux.intel.com> References: <20181102231320.29164-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). Cc: Dave Hansen Signed-off-by: Sean Christopherson --- 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 3de69330e6c5..165c93dd700e 100644 --- a/arch/x86/include/asm/traps.h +++ b/arch/x86/include/asm/traps.h @@ -162,5 +162,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