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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E51C9C433EF for ; Sun, 27 Feb 2022 22:01:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232016AbiB0WCR (ORCPT ); Sun, 27 Feb 2022 17:02:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230458AbiB0WCQ (ORCPT ); Sun, 27 Feb 2022 17:02:16 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1B1916C1E7 for ; Sun, 27 Feb 2022 14:01:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645999298; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=cu46C1+p5Z2okY9b0dKEBxEay9/qjlT1Qhpw4rLUHes=; b=b5tEwhdbYcALCcJ4RuKAbxaz3FVW/1cKHfsxq+eKmHehFAoRhSWTIwA17atjhz9F6BqK5r Kj2n8qzn0QcdQo1dlObMdUWfydOH7X+mXV43/RiYNNBMvOJ/vw18QjhUWe+6I5a5SI5Hbh TwSyi4+UzBEq0LKAWDUs5qAAFVKNnxk= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-459-T_j8bzwtNp2TEmXVO7LLOw-1; Sun, 27 Feb 2022 17:01:36 -0500 X-MC-Unique: T_j8bzwtNp2TEmXVO7LLOw-1 Received: by mail-qv1-f69.google.com with SMTP id q14-20020a0cf5ce000000b004326eec23acso10561325qvm.20 for ; Sun, 27 Feb 2022 14:01:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=cu46C1+p5Z2okY9b0dKEBxEay9/qjlT1Qhpw4rLUHes=; b=RMUCnZN/E8BTFNMZrvwkFGmSGX0EMwInZK74kGHupiKXjPXgeuRwIlYQS2L7jKWn4o OhetwSTp6BZkx3VfkAbddJy+8K3H/xao3HnPia7yuyQroK10kdVKSd13MM2ad5viMPQF PGPlr6290BXRMy4w5i4B9wEST4V36J3hIneJUegyk1PuJ2Xcx7spPKvHGg9auOepBrv8 QoEwW8GlfJ5nAA/NoXPxjLUATavyWZu5mzSu7s0+etdjDWXJHNmu5h8vDalRs2U5QPib D5wB/x/uJ3q+kp2kXYqpD43lAOoqwNdDIHynqa6VN7d7HgUS82LEBNnwFD6YNrTXiT1g 2B0Q== X-Gm-Message-State: AOAM533TPSpuDWz3VwEl7MoaL7gafU7GhXNfTMIWD5Kw9YyqkPTGmiZj TVanUQQvT71Ubevd2ppYH2jYt8ifnAHhXxqiPAJnWUckJoqSiLX9AS0qUhMNDgE5zMnhC8kigd2 zMmQPOR4B/b0ms2hU5eR/uEVG X-Received: by 2002:a0c:c784:0:b0:432:304c:a383 with SMTP id k4-20020a0cc784000000b00432304ca383mr12049590qvj.100.1645999296296; Sun, 27 Feb 2022 14:01:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJjmQIkWrwxek7pSlDac4e+FnTb1QHQ+fKpFNR9do+JasixFssPsd0lPHDPtuZuyEI2vnRlw== X-Received: by 2002:a0c:c784:0:b0:432:304c:a383 with SMTP id k4-20020a0cc784000000b00432304ca383mr12049562qvj.100.1645999295943; Sun, 27 Feb 2022 14:01:35 -0800 (PST) Received: from treble ([2600:1700:6e32:6c00::d]) by smtp.gmail.com with ESMTPSA id p25-20020a05620a057900b005f1928e8cd0sm4107044qkp.134.2022.02.27.14.01.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Feb 2022 14:01:35 -0800 (PST) Date: Sun, 27 Feb 2022 14:01:30 -0800 From: Josh Poimboeuf To: "Kirill A. Shutemov" 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: <20220227220130.23yjme7jucxo266l@treble> References: <20220224155630.52734-1-kirill.shutemov@linux.intel.com> <20220224155630.52734-2-kirill.shutemov@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220224155630.52734-2-kirill.shutemov@linux.intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -- Josh