From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0839EC4332F for ; Tue, 22 Nov 2022 09:06:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A02276B0071; Tue, 22 Nov 2022 04:06:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9B2236B0073; Tue, 22 Nov 2022 04:06:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 87A738E0001; Tue, 22 Nov 2022 04:06:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 78A516B0071 for ; Tue, 22 Nov 2022 04:06:48 -0500 (EST) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 499F0A0CE8 for ; Tue, 22 Nov 2022 09:06:48 +0000 (UTC) X-FDA: 80160498096.29.F8CE927 Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) by imf01.hostedemail.com (Postfix) with ESMTP id D21234000A for ; Tue, 22 Nov 2022 09:06:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=2R+QsgzdMLtZtdX7MDPOAzWGhgj7w7mqaDolO9dSzoU=; b=aKCtwOeT6UMICBexRtp8Be3vZI +1181th7fR+Pp3NBDz92zNdTkJaL19MYJ6Ka9hMxCEOxQyQJplbKjPotYw3mYoix/DoXNWWBRuHtd 9xkbSYZBSeAqJMjE6dzaceWm7QxruU3sN3CqSWrdjWhPrt/7xSf2X09DcgtiMKrwnBfEa+IJ6biuR tHtIMF5oQ4wJqSXwDxXAHdvoC6X8dm/QQQrMhyAeMpe7AE8Q1bwVK4a3aFWyu8CF/Mxz7d09yokUs y7nJWINpw3ig/hWJIknyk2WyzfPxqor+5mic142cNfKnAkFWxK1iFlskUeWDaMIne7PEADeZVLLFz 9MvFxhDg==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oxPEl-003O0D-LH; Tue, 22 Nov 2022 09:06:39 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 26D7A3001D7; Tue, 22 Nov 2022 10:06:38 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 0BB832D669366; Tue, 22 Nov 2022 10:06:38 +0100 (CET) Date: Tue, 22 Nov 2022 10:06:37 +0100 From: Peter Zijlstra To: Kai Huang Cc: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-mm@kvack.org, seanjc@google.com, pbonzini@redhat.com, dave.hansen@intel.com, dan.j.williams@intel.com, rafael.j.wysocki@intel.com, kirill.shutemov@linux.intel.com, ying.huang@intel.com, reinette.chatre@intel.com, len.brown@intel.com, tony.luck@intel.com, ak@linux.intel.com, isaku.yamahata@intel.com, chao.gao@intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, bagasdotme@gmail.com, sagis@google.com, imammedo@redhat.com Subject: Re: [PATCH v7 05/20] x86/virt/tdx: Implement functions to make SEAMCALL Message-ID: References: <5977ec3c2e682e6927ce1c33e7fcac7fcfe2d346.1668988357.git.kai.huang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5977ec3c2e682e6927ce1c33e7fcac7fcfe2d346.1668988357.git.kai.huang@intel.com> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1669108006; a=rsa-sha256; cv=none; b=Mx5FdGkXI6gedErBwPT3xHf+Oz852g6GwYR5SYorMY49og2uTNPqHxzNVNRy+D2Ohi3kI9 68zcAehHCsD7xPH6lW+GKmGqhgmTdka4J2/HmAn9HaWDUjoSePaKJikI8+iMA+ZxyTpPPq 0p6AWDE8v/x6G41zjmKRDGAHIfvGUoA= ARC-Authentication-Results: i=1; imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=aKCtwOeT; spf=none (imf01.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.92.199) smtp.mailfrom=peterz@infradead.org; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1669108006; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=2R+QsgzdMLtZtdX7MDPOAzWGhgj7w7mqaDolO9dSzoU=; b=kUCSyZhEqosQoKFQXgARWg8kV5f4+m7vWK5tSpZc4nd8+ON8oCKwbImdyUGo/Pt45JDIjy xhemU7w4Knu9vbBCEq1XS47t8NVL022TdH2RZZC921cYWHQjh1VOUKNDiG59Jjwv3su/5Q GQWUcYd9PclXij9k1rTRCHrF3WMX+/s= X-Stat-Signature: gjsic459a5h67qnfgqrbbd5qr7b7q1n3 X-Rspamd-Queue-Id: D21234000A X-Rspam-User: Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=desiato.20200630 header.b=aKCtwOeT; spf=none (imf01.hostedemail.com: domain of peterz@infradead.org has no SPF policy when checking 90.155.92.199) smtp.mailfrom=peterz@infradead.org; dmarc=none X-Rspamd-Server: rspam02 X-HE-Tag: 1669108005-55578 X-Bogosity: Ham, tests=bogofilter, spamicity=0.001694, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, Nov 21, 2022 at 01:26:27PM +1300, Kai Huang wrote: > +/* > + * Wrapper of __seamcall() to convert SEAMCALL leaf function error code > + * to kernel error code. @seamcall_ret and @out contain the SEAMCALL > + * leaf function return code and the additional output respectively if > + * not NULL. > + */ > +static int __always_unused seamcall(u64 fn, u64 rcx, u64 rdx, u64 r8, u64 r9, > + u64 *seamcall_ret, > + struct tdx_module_output *out) > +{ What's the point of a 'static __always_unused' function again? Other than to test the DCE pass of a linker, that is?