Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp188490pxb; Thu, 2 Sep 2021 23:15:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/m5lIhF94uTVqU/1XzYgetHK4lUCJceCeJF+5ZJARIytVBet3mt55cQNsxv0yvLKFlLF0 X-Received: by 2002:a6b:3b8c:: with SMTP id i134mr1745242ioa.29.1630649727953; Thu, 02 Sep 2021 23:15:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630649727; cv=none; d=google.com; s=arc-20160816; b=OBWoeMyw003kXle+Egxd/JmA0f476eoGKtEZvl2fp1tkAppS7MWzxsQBgVqagmYAJg dRebQD0lENLDtvGnPJAnoSTKQ1AjGI82kEMvPPorOXbLxwi7f4pxdd3cS+jdXOcH1pDz 65ZBhppeVhCrP7sXD3vpTcxZK9xXKVq5GDBmLaQbD8mqajKscjKXf2Zwz121ZXWQmzUI O4vie2+FdbMxyUD6NGjsgSV0U+chRRTTXozpGSz3Wj+q+4hyKDvjDGBhsDBEEon35PYE D8k205QtmaQaWcBuNFuXlAUj45Y/pAro8/Zy6fqggiBrJ9rC6DXoqjKXGtcaWddXV0F3 J6HQ== 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=4iD2kVrpeTo41fzMlOPE9QazDxreSPFT5zIjvb0nhDg=; b=ewecata4woDggM18vi3omwvC66HqSRm5SGxJ3m0hW5IPdTOOn6puvuHPWT4w2lDRAO hRmJMkVdwMllGSxWoseYL9nfDyEpMiqQdipwKzM4cAEI/gLQnzskAZXA2L+E6AIhh2PY rOltZofPGYjJHCbwbLjBOe1LvgqCJgyfhcB7nAPev1kmYtwQ1f7YaCNosEzeq1+ENF6X Mt3eD3/q2kDE4Hazw4I2IvsVz4gidBgURRLccaOGBwXRF8IC4he6JZcVGXEaEmCzaG6n ifeczVcHLELFvgxaj3SIWv3j8+a8xUpxZPZkkP9RSRf4dOKWUW3ECc8v3WSTs0A1n641 w3KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Q8qa3mC5; 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 a2si3823951ilf.15.2021.09.02.23.15.15; Thu, 02 Sep 2021 23:15:27 -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=Q8qa3mC5; 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 S242759AbhICGOB (ORCPT + 99 others); Fri, 3 Sep 2021 02:14:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:56884 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236242AbhICGOA (ORCPT ); Fri, 3 Sep 2021 02:14:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 7E1826102A; Fri, 3 Sep 2021 06:13:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630649581; bh=L1P9QokrorTJ7b4vh+JmxBeBnSGGbsF7TDkZtkCRRB4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Q8qa3mC52Ezw8CMP1IfGrIyXjQ/3gROhCN2r3ZP/J7cAutPfncsNz1AtLbzTrSfJJ hKHb2mLsHTgUIWJ1RQTBWh6KKSlg0w57mT4YBHejjhZ8/nYZkZiQTdQZcUgkrS9kTz U5CoapkxayhRarcDjAvaY4g5iK0Q7Wq/mQxxwkjv9MsXxtBrf7Qk0q5rh3cLP92Pjl kuDGjJv5sQza/c0BkAkjEmplmEM8MyoeFmfxKxvy5EQr3aMJ2Zz7TfMoMbZTjZloC/ 8qkecNbuo6sWBGV2afqVjacB8NQ+kkW/WSophw/Q3HvXmGMV1oGdyS0Cq0pG+yEHYW +r8QA/QG84Caw== Message-ID: <49fccddbbf92279f575409851a9c682495146ad8.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:12:58 +0300 In-Reply-To: <20210827195543.1667168-6-tony.luck@intel.com> References: <20210728204653.1509010-1-tony.luck@intel.com> <20210827195543.1667168-1-tony.luck@intel.com> <20210827195543.1667168-6-tony.luck@intel.com> 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-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 These decl's should be in arch/x86/include/asm/sgx.h, and as part of patch that contains the implementations. /Jarkko