Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp243201pxb; Fri, 3 Sep 2021 00:51:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9MQ4hoacXdUA3OC+UsSfvtTMepe8GAw5EujkjdJYdYBTY4lGNFQx6aNr1rbi626gZBP6n X-Received: by 2002:a05:6638:2641:: with SMTP id n1mr1575255jat.117.1630655468802; Fri, 03 Sep 2021 00:51:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630655468; cv=none; d=google.com; s=arc-20160816; b=PVRVNARaRj0dAS79Nz3x0GVIngFJsodEZFeMqAWUuS+XoGNIL22hvZ04G1OpAYk1Kf A9NRcYgQFMNFWy2rRK1dzBvSQPIiGaxeLU7nIZkpvl8QU4mZtb8jd8imafSJ/FBAiFix K98hyHvD47oe2Z1uLuSd7FSCf7Y5sYeiYmxhcwcp4LG2W8cYUsr8k5JeuQb0mkpVWEZt UIYB1aUpomirjcw9znlWiDqYYKVW+YIaAJGh+1b8gxpv9QPw8uGrSFcpgnWZ149K3qwW AXo9TF80ZTENDqKwFchDu2m0POVg8ioHBON94SR+IgzkajTsjYFDw7C7tVbb+YButZta 5Mmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=sjG4pf+P3oUwMlKjxWXAIs6Sgcpxjg8wqcvIJcS5oZI=; b=Cepz935vi71DD00Gu81vsKBYuK6B1Nu5B8TxDqNuBgEiV543YVz0feOlK76cOY8shW 78jpEp4Y2YRB+BJwYNU2SjnmGavIhs01SAsl5wBPHRRtU6By/s6bL+GOiSLzWzFMc1Ke sEU+eYqBbr17mVxHG6Wysv0n+vCD3/H2xEXG5D1YwXsCVIKKt0nLRdZSrjR3lHGF3nNp /HDTpQS4UtnOvqxU1f3YApBaq+ZRWtXwJa9nA7U0q28G54y0pfKvmS8FyFVOIPw0BCir wtisfhjnOR9Lw75o5v50N5y0MQQzcMFIjXZBIxyR+ZNeZt2/pNAJ9MHqpPTOIq8m7EKa pT7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=udwLZJqA; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n45si4081982jac.76.2021.09.03.00.50.53; Fri, 03 Sep 2021 00:51:08 -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=@kernel.org header.s=k20201202 header.b=udwLZJqA; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234758AbhICG5F (ORCPT + 99 others); Fri, 3 Sep 2021 02:57:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:59096 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347087AbhICG5C (ORCPT ); Fri, 3 Sep 2021 02:57:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7787B60231; Fri, 3 Sep 2021 06:56:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630652163; bh=AKJqf4REVrL60CH7L/7m+mBMFtIF9TJI0PvNB5nOnxU=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=udwLZJqAwtTGg66C/uvVMkj3CvvTzWTQK8+Hq27xDSvE/DbGznpB04yGh8xboiN5T FhixZhGGE1JtTSYdTlvpPze1pMZevX81oNMg0oJtHEh2ihC07s0lNMbSPjFXkGRYsc eiz5V8+QTguo2EuEzFvg+Thy/0T7DvuYyLm1dx35kSGpat+O1r1K29KivMc3s+0K6U apjBVtfLgjzWex2Rt5P/990rHNyRp4s9rG7Hma14YzfrROYsc6FRqWOPmEdSm6LRbr 3UDDDM4n6V4oTcyKjnsVSSqxKjpBBgq1S4QC9kGBorNxlgP8L4FsBWd2DGDA/h2PMI OpirGoMkz3F6A== Message-ID: <681d530d72de842c8bf43733c11f3c3f2ebf8c6e.camel@kernel.org> Subject: Re: [PATCH v4 5/6] x86/sgx: Hook sgx_memory_failure() into mainline code From: Jarkko Sakkinen To: Tony Luck , Sean Christopherson , Dave Hansen Cc: Cathy Zhang , x86@kernel.org, linux-kernel@vger.kernel.org Date: Fri, 03 Sep 2021 09:56:00 +0300 In-Reply-To: <49fccddbbf92279f575409851a9c682495146ad8.camel@kernel.org> References: <20210728204653.1509010-1-tony.luck@intel.com> <20210827195543.1667168-1-tony.luck@intel.com> <20210827195543.1667168-6-tony.luck@intel.com> <49fccddbbf92279f575409851a9c682495146ad8.camel@kernel.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.36.5-0ubuntu1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2021-09-03 at 09:12 +0300, Jarkko Sakkinen wrote: > On Fri, 2021-08-27 at 12:55 -0700, Tony Luck wrote: > > +#ifdef CONFIG_X86_SGX > > +int sgx_memory_failure(unsigned long pfn, int flags); > > +bool sgx_is_epc_page(u64 paddr); > > +#else > > +static inline int sgx_memory_failure(unsigned long pfn, int flags) > > +{ > > + return -ENXIO; > > +} > > + > > +static inline bool sgx_is_epc_page(u64 paddr) > > +{ > > + return false; > > +} > > +#endif >=20 > These decl's should be in arch/x86/include/asm/sgx.h, and as part of > patch that contains the implementations. To align with this, I wrote a small patch: https://lore.kernel.org/linux-sgx/20210903064156.387979-1-jarkko@kernel.org= /T/#u /Jarkko