Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp367969rdh; Thu, 23 Nov 2023 06:12:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHo6yQznaxry9QggsYBRcfzY/BrQc4TU2a5v1+AqCIRsq08jha3/Uc2xWPK6u7n47COhP0S X-Received: by 2002:a92:ce0e:0:b0:35b:874b:35d5 with SMTP id b14-20020a92ce0e000000b0035b874b35d5mr5626819ilo.11.1700748739800; Thu, 23 Nov 2023 06:12:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700748739; cv=none; d=google.com; s=arc-20160816; b=nEN7pg/DZhc2vkI4RBoRvmBLn1KiRvhV8nxlxVgSoUWvcKxlQEbfffxE1dM+F8zxw+ zXUGwMesL405XARAfH5o3YFCL4XtQ4ZK3Sd344qwnb6N/LP2kJ5WTIpJTod3J1U8ysZU p4zNfdRN2h1qPTKYKiK/cIRDubqEofQ3iVOpwL4zOEyTmhiCuxgi3IZlXEmYtoFERBQC Nr+V4ZwrsJxI2tNGF+8crw4o1erGsbAfDG6eIMeQz551OBaT2Sjvs+CkwkMgdar8iunH bsFXvJguyYeZD3dT1GneBtXUhipibHkGFrvfmAmhb3J1Et4OG1bkjbxvjpd/Mh7iDxcU /jYw== 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=P6xiuMY5tThE0wmKc+xC2fEsrTorR7ya2Lw5NS691mA=; fh=1Ie+ok9DLok8LLm5qlbSZiXR/51z9U8R9sgEH7smzlc=; b=QdE3THOHvc1QMiGQxuvOr8yp2oQsAz3FrYm94lXBumu+7vFXTrcwdrQvXBDGvBENby +/Em3tIjlzysc5ETwqnyyygTFebJxwUgIeyHvssGofh7VkZiH+qm3eLAwJrJ76W2rvN2 +nf6f1FSblCtf6ZIuI05THc15fcplR9psWKosONWZaxY3jkV1w2HafGTUEq7kt4xYooQ C+X683knh4JRCKeFmz25PGi8c+V5onS8xi+EiqIRiOOOKDWu/CcLhMAlLtKCdxOed5VY 1IqtvthLqH2r0iphsh8dVb/YUpSCA5glesKNb/B0CtXm1mCt7xR1zmhT0G3tVr8sutxB 2scg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VIMNKYce; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id e29-20020a631e1d000000b0059f0cebd046si1325229pge.729.2023.11.23.06.12.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 06:12:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VIMNKYce; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id A0694803A534; Thu, 23 Nov 2023 06:11:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345684AbjKWOLR (ORCPT + 99 others); Thu, 23 Nov 2023 09:11:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345696AbjKWOLP (ORCPT ); Thu, 23 Nov 2023 09:11:15 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C4C6D47; Thu, 23 Nov 2023 06:11:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700748682; x=1732284682; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=T+S1rlzshvZ8ftnOlxHsPUzLeZYI4iqYxRU8oFrLAWM=; b=VIMNKYcezkSS2StDkb+38iNhfWuVPHBmKtd2W+OfhhNbKJ901fEyuh+A 1iUXvrW4N/zvTp/o13Uiu9GMIATtsVOXBNwEcNhk9iImSEm1fuCP8Xsxt aZT5YZFZXm8Y1kbSxDVLvtfqChU74iRuKqqn0xNwWJo08wLfsRoPsCnbh gvkZ8b4f6gvYvS+oMyz+JxuWqb6K6GTNKam+FRbRFr7lGI0rdnRt2OIHO euFG0kI+r/RwEQco4XKAuNCbgEoLV/B/QM4AIxW14szEUh0PzRs6TspIu cVEzT3nVSNPA9IUcm0e3iy4FjGpPfn8YiVqfSpOJ+aHpzpEH85s5vmFGg Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="423404280" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="423404280" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 06:11:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="760670680" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="760670680" Received: from ckochhof-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.252.58.117]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 06:11:16 -0800 Received: by box.shutemov.name (Postfix, from userid 1000) id 8D51C10A38A; Thu, 23 Nov 2023 17:11:13 +0300 (+03) Date: Thu, 23 Nov 2023 17:11:13 +0300 From: "Kirill A. Shutemov" To: Jeremi Piotrowski Cc: linux-kernel@vger.kernel.org, Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Ingo Molnar , Michael Kelley , Nikolay Borisov , Peter Zijlstra , Thomas Gleixner , Tom Lendacky , x86@kernel.org, Dexuan Cui , linux-hyperv@vger.kernel.org, stefan.bader@canonical.com, tim.gardner@canonical.com, roxana.nicolescu@canonical.com, cascardo@canonical.com, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, sashal@kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v1 3/3] x86/tdx: Provide stub tdx_accept_memory() for non-TDX configs Message-ID: <20231123141113.l3kwputphhj3hxub@box.shutemov.name> References: <20231122170106.270266-1-jpiotrowski@linux.microsoft.com> <20231122170106.270266-3-jpiotrowski@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231122170106.270266-3-jpiotrowski@linux.microsoft.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 23 Nov 2023 06:11:36 -0800 (PST) On Wed, Nov 22, 2023 at 06:01:06PM +0100, Jeremi Piotrowski wrote: > When CONFIG_INTEL_TDX_GUEST is not defined but CONFIG_UNACCEPTED_MEMORY=y is, > the kernel fails to link with an undefined reference to tdx_accept_memory from > arch_accept_memory. Provide a stub for tdx_accept_memory to fix the build for > that configuration. > > CONFIG_UNACCEPTED_MEMORY is also selected by CONFIG_AMD_MEM_ENCRYPT, and there > are stubs for snp_accept_memory for when it is not defined. Previously this did > not result in an error when CONFIG_INTEL_TDX_GUEST was not defined because the > branch that references tdx_accept_memory() was being discarded due to > DISABLE_TDX_GUEST being set. And who unsets it now? -- Kiryl Shutsemau / Kirill A. Shutemov