Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3001574pxm; Mon, 28 Feb 2022 10:04:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHcBh6JTN8aiMEh60DHGeGzTLMZWMZDKPt8rup3VmREDhGNjmkHnhUdWJTd0DdRJwEafkJ X-Received: by 2002:a63:465b:0:b0:374:642c:ab62 with SMTP id v27-20020a63465b000000b00374642cab62mr18393594pgk.187.1646071458048; Mon, 28 Feb 2022 10:04:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646071458; cv=none; d=google.com; s=arc-20160816; b=Mg945LDVINQKl/5evs+npharo8/43N4K3B6WEYzJduy+Fm65U9Lvkcik1jwnm3mM1C 6jZmO1oWGkHwRb+xbqKkjFvbB1eKRV1QH6hQuALpTIompornwOtfZxotKCHJkqveGmOM L0dZQlTEEHFOu4s1GnHQwF3cB49i/Rwl3OLPlKvr9xuYFBNwFuOCX+QLUupSWSQ/HZ4X BnD4PHZAnusa2WuwhskCJHcaPn68XLLkfmDUZLEin+U/NLA5r8jUNNwooJp7574b4qUu JSTsqtk9aegwpM1BF1kM0qMGkLvpSXV7ixLYcddPXcXozWrkyQP8ED8v8YJKqgzD4BjP zJYg== 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=MxQu5ndnatn2uM+t8HJ/oOmUcqvTm7khssRoYPzzQNE=; b=ddEqYXVx55Q0oZ8XRPc++myrqoz+QudDWZZ8nl+7ODRYdbg5YuvCYCrdYf7Xe+hEFC juZBw4xwC80LQ+mEP4x57bsPjw96u3J3v25l7eTotPk28JlDspCrAHIASYURahj/yVel aKU+CP2Q7MceeKIx1Y1doI1JWJP8NTey0KXpWUSKlkW0Fua1BMVwLaRpUpXL+3gjVRv7 HmvLyZ+9sMvLv+3gQquh5yTgY97mzqiALWwwpyHpRAG1yCc10whMmhsl6TEj/VaqBFio uEXJLckLf0vHLQPCciDvC1o+/Py72NeJEacl2Zudhd2u2INmwPzRfbZijCso9UUz/yrX qDlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=dBkI5icY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z69-20020a633348000000b0036fe3b212cfsi10556605pgz.602.2022.02.28.10.04.01; Mon, 28 Feb 2022 10:04:18 -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=@intel.com header.s=Intel header.b=dBkI5icY; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237876AbiB1QWG (ORCPT + 99 others); Mon, 28 Feb 2022 11:22:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232967AbiB1QWF (ORCPT ); Mon, 28 Feb 2022 11:22:05 -0500 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F308983022 for ; Mon, 28 Feb 2022 08:21:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646065287; x=1677601287; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=fwU+TO/qK+rZqtODMYpxS2Ztzz09O92uLhRMqm2SguI=; b=dBkI5icY9t8YczHOQO2siCx2Akl4zc3/HOLQudZ3S7S6gtcRNO+4yri2 AiwyX2e36F9Io3lVLDpJxSHm23pjanBv+esPVDfk2eKVEusP1T+HJMLsQ +hBFVIsvu7xf56K2pi1pn1ReIQaQzVKghTcgkKnjq3EnbNDSfYksskPLN 7f3HCaC+LLHbXe+OudED1t0Heb/E/3aLuJfEgBNEBy0nMeE2p1z+z9hag rjyIY2VBvWTkFX/sLI+GQHnzszgB0NqFH6Qu/svVm4zGskgsfiHYYYxbh IgE+VsxCYv1TzD1DJHtbvr2qBtnPRr9B5eK2qw38Z8KCLjgbnoEOCpjIo Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10272"; a="250505609" X-IronPort-AV: E=Sophos;i="5.90,142,1643702400"; d="scan'208";a="250505609" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2022 08:20:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,142,1643702400"; d="scan'208";a="708696781" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga005.jf.intel.com with ESMTP; 28 Feb 2022 08:20:39 -0800 Received: by black.fi.intel.com (Postfix, from userid 1000) id 65C03142; Mon, 28 Feb 2022 18:20:56 +0200 (EET) Date: Mon, 28 Feb 2022 19:20:56 +0300 From: "Kirill A. Shutemov" To: Josh Poimboeuf Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@intel.com, luto@kernel.org, peterz@infradead.org, sathyanarayanan.kuppuswamy@linux.intel.com, aarcange@redhat.com, ak@linux.intel.com, dan.j.williams@intel.com, david@redhat.com, hpa@zytor.com, jgross@suse.com, jmattson@google.com, joro@8bytes.org, knsathya@kernel.org, pbonzini@redhat.com, sdeep@vmware.com, seanjc@google.com, tony.luck@intel.com, vkuznets@redhat.com, wanpengli@tencent.com, thomas.lendacky@amd.com, brijesh.singh@amd.com, x86@kernel.org, linux-kernel@vger.kernel.org, David Rientjes Subject: Re: [PATCHv4 01/30] x86/mm: Fix warning on build with X86_MEM_ENCRYPT=y Message-ID: <20220228162056.gul22bjr4w6zjslq@black.fi.intel.com> References: <20220224155630.52734-1-kirill.shutemov@linux.intel.com> <20220224155630.52734-2-kirill.shutemov@linux.intel.com> <20220227220130.23yjme7jucxo266l@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220227220130.23yjme7jucxo266l@treble> X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Sun, Feb 27, 2022 at 02:01:30PM -0800, Josh Poimboeuf wrote: > On Thu, Feb 24, 2022 at 06:56:01PM +0300, Kirill A. Shutemov wrote: > > So far, AMD_MEM_ENCRYPT is the only user of X86_MEM_ENCRYPT. TDX will be > > the second. It will make mem_encrypt.c build without AMD_MEM_ENCRYPT, > > which triggers a warning: > > > > arch/x86/mm/mem_encrypt.c:69:13: warning: no previous prototype for > > function 'mem_encrypt_init' [-Wmissing-prototypes] > > > > Fix it by moving mem_encrypt_init() declaration outside of #ifdef > > CONFIG_AMD_MEM_ENCRYPT. > > > > Signed-off-by: Kirill A. Shutemov > > Fixes: 20f07a044a76 ("x86/sev: Move common memory encryption code to mem_encrypt.c") > > Acked-by: David Rientjes > > The patch title, warning, and "Fixes" tag tend to give the impression > this is fixing a real user-visible bug. But the bug is theoretical, as > it's not possible to enable X86_MEM_ENCRYPT without AMD_MEM_ENCRYPT, > until patch 27. > > IMO it would be preferable to just squash this change with patch 27. > > Having it as a separate patch is also fine, but it shouldn't be > described as a fix or use the Fixes tag. It's more of a preparatory > patch. maintainer-tip.rst seems disagree with you: A Fixes tag should be added even for changes which do not need to be backported to stable kernels, i.e. when addressing a recently introduced issue which only affects tip or the current head of mainline. I will leave it as is. -- Kirill A. Shutemov