Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5600798rwb; Tue, 22 Nov 2022 02:13:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf6fyf6+F+WqL/DbI//QM3Q7uk3HXoVFlf7bLG3/FPnfvCGaYb2jL8JMuwDomrlMgD+mtG8r X-Received: by 2002:a17:907:9c0a:b0:7ae:1e53:8dd4 with SMTP id ld10-20020a1709079c0a00b007ae1e538dd4mr18712524ejc.42.1669111996717; Tue, 22 Nov 2022 02:13:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669111996; cv=none; d=google.com; s=arc-20160816; b=DyDxzM788SwggVifvflgi95vxZvCtFT/AdBmuSVt1ZdrVufB1rGNZ7OGGUv5cIeQ6E E1z1MCsKQE9uSbNR6GQhUm+ljdYWc39ONabiMXRwssqahqf1t/SNGGZsEFey2rCTBdxo yQfieb8qRuIqOPUwu9nn4BLlF/BJVVTM9dcLgcIs6HA4uZqgjqIvfguEpC/r5AmdKnHo 6/mTvMSV6/WU5QpwDW81VMhCyyJS77vdbvIGLaU2uNrA/vDezHPuifBdEq1sqn0FuDfw zBNCRSLFKUzBykPJhEQV8BdR8qcTwHCGABhiNCt3AQRdb9B4Zg3Rllp6skGx5xzETZFo lgsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2R+QsgzdMLtZtdX7MDPOAzWGhgj7w7mqaDolO9dSzoU=; b=OFEgP7v3TmuMv22R6Tj7kQfEDGjpdxF6d/wKhMQH18pQwKJU78s+ZjAA6Drivay49S i7CcuoKVxSs1kuFdyYpSlt24EdaLVm/6RcxV+zSLou1C+Vi4AjBIFDHOPOIPKbQn/txU QAdfe2C3jiblxL3UUGKO2lkFOSZ4RIXwQntDgxJzDwE1gmhDixRWpm74vj4ROm4LFv0e SvAt8Y7WMZApsJnRTZVklMKiztanDe9F7NGuH0psv6SC01KnVyjurfm5K7/phNsmNXg5 Z1TgIIFqGs0EQm0WAxF+wh/CCNI9orlDfYisgwO9G56f/68Sq/WxFmliDqD1JZW4yMpO hAWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=aKCtwOeT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nb22-20020a1709071c9600b0073daf6b44a5si12833804ejc.775.2022.11.22.02.12.54; Tue, 22 Nov 2022 02:13:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=aKCtwOeT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233106AbiKVJHA (ORCPT + 91 others); Tue, 22 Nov 2022 04:07:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38786 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233151AbiKVJG5 (ORCPT ); Tue, 22 Nov 2022 04:06:57 -0500 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 19607E0B9; Tue, 22 Nov 2022 01:06:55 -0800 (PST) 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> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?