Received: by 2002:a4a:301c:0:0:0:0:0 with SMTP id q28-v6csp907733oof; Tue, 25 Sep 2018 06:15:50 -0700 (PDT) X-Google-Smtp-Source: ACcGV61gBxc76G6o+DeO3ydNkUv2lQa+TI04Fsebp8T871F/cFhyMQnmj6DUomJ8VusjsktIFfje X-Received: by 2002:a63:2106:: with SMTP id h6-v6mr1046562pgh.161.1537881350073; Tue, 25 Sep 2018 06:15:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537881350; cv=none; d=google.com; s=arc-20160816; b=Xa09TjFc24blIS29EHu3pR0nEXyQdHPLn1Txk7GOigK35yctXDSfkAiR6d1n+hS0Ih MG/ZgU/g9IleIPKa6YQ+WM7f49kQgJq8NzD77E7j8JRkz6ScWfpxFBZVYj9YikEnpH6l t5v1VlB8lmJTJMD5se/+Kc7BYJgMAZyov+g2TIOw1iGiX22Z9r2HYv5pjglqPoOz8o+L RBTC9KGRT6atktxUDzY9AqtYeUYE5BBPSAQzumZoDLnnDCkeHBdZLEjDNlNrOgCMqIv8 IzvKtBrTBqTqOk84R7MvLsvEhXqVyYXOFNxJ4lNta2TbPIVdQKqT8Yuqxj0WGD7Hysyu lv4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=ynhZWprT+LBVmA5Y/Zzj9N0TFU9bQCf5nNeiETzln8Q=; b=FrgXb9GdNesYNQuuiJp/z7UD9S48pu7lWGzAimr/Ee+XFrS7rYmgsQTslvnop/Z4oC BlxeIhRIDoK1oFf3GLTr5ic/j3YL++yeNdqyu103hIL5OX2Wvx0zfq9aFw5vtjnwYKf3 1deASXNn6n0ZObJoZ6AffSqlIWggYndWvZ7w8NVd8NsA3ZiLOo7Q4i7BrSHuBQCd6Kau VbvnAgAPBoCFhfxHAL3gNMBdBVL69wZQRw0qfkBf0puukJ5GAkNkKb5R5isDmurys/GJ 0Bjo8or9MGO6Xu3DkOcTVVXdw8su6sC2F5acX1EtO9yttfJDlKgjvA3fXFob4KYwyftL RUCA== 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 p14-v6si2197967pfk.275.2018.09.25.06.15.31; Tue, 25 Sep 2018 06:15:50 -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 S1729259AbeIYTUV (ORCPT + 99 others); Tue, 25 Sep 2018 15:20:21 -0400 Received: from mga02.intel.com ([134.134.136.20]:39126 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727341AbeIYTUV (ORCPT ); Tue, 25 Sep 2018 15:20:21 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Sep 2018 06:12:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,302,1534834800"; d="scan'208";a="93546707" Received: from thomasvo-mobl2.ger.corp.intel.com (HELO localhost) ([10.252.53.212]) by orsmga001.jf.intel.com with ESMTP; 25 Sep 2018 06:10:22 -0700 From: Jarkko Sakkinen To: x86@kernel.org, platform-driver-x86@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, linux-sgx@vger.kernel.org, andriy.shevchenko@linux.intel.com, Dave Hansen , Jarkko Sakkinen , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , Andy Lutomirski , Greg Kroah-Hartman , Ricardo Neri , Juergen Gross , linux-kernel@vger.kernel.org (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)) Subject: [PATCH v14 06/19] x86/mm: x86/sgx: Add new 'PF_SGX' page fault error code bit Date: Tue, 25 Sep 2018 16:06:43 +0300 Message-Id: <20180925130845.9962-7-jarkko.sakkinen@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180925130845.9962-1-jarkko.sakkinen@linux.intel.com> References: <20180925130845.9962-1-jarkko.sakkinen@linux.intel.com> 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). Signed-off-by: Sean Christopherson Cc: Dave Hansen 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 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.17.1