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 AFF08C43334 for ; Tue, 5 Jul 2022 14:41:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1C8E56B0071; Tue, 5 Jul 2022 10:41:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 152CB6B0073; Tue, 5 Jul 2022 10:41:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F0E7C6B0074; Tue, 5 Jul 2022 10:41:07 -0400 (EDT) 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 DD7C26B0071 for ; Tue, 5 Jul 2022 10:41:07 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 911ED60847 for ; Tue, 5 Jul 2022 14:41:07 +0000 (UTC) X-FDA: 79653308574.29.A8E8AA4 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by imf09.hostedemail.com (Postfix) with ESMTP id A0D15140058 for ; Tue, 5 Jul 2022 14:41:05 +0000 (UTC) Received: from zn.tnic (p200300ea970ff682329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:970f:f682:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id C09931EC0445; Tue, 5 Jul 2022 16:33:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1657031629; 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: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=Bcm1kwuF5rplXwfBxNBb+WfZHo2BiShJJUDVm2VGqVY=; b=rlB3osgY1N5VaH4VJs1WQc2d6N5Hs1DIMhBFixnhxT7se+LuHYH5lyxdcvpA+TL/Gl8zYz Abv4QCAs1HDcGLdS09m6Zbnhc7J77LsPyY/XkcbJujK/nzgLvtdYN/N8JKAsnAvVBCC6tE WjOrzWubFVRgAEPZynFs8+XFT8qCcnA= Date: Tue, 5 Jul 2022 16:33:46 +0200 From: Borislav Petkov To: "Kalra, Ashish" Cc: "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "kvm@vger.kernel.org" , "linux-coco@lists.linux.dev" , "linux-mm@kvack.org" , "linux-crypto@vger.kernel.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "jroedel@suse.de" , "Lendacky, Thomas" , "hpa@zytor.com" , "ardb@kernel.org" , "pbonzini@redhat.com" , "seanjc@google.com" , "vkuznets@redhat.com" , "wanpengli@tencent.com" , "jmattson@google.com" , "luto@kernel.org" , "dave.hansen@linux.intel.com" , "slp@redhat.com" , "pgonda@google.com" , "peterz@infradead.org" , "srinivas.pandruvada@linux.intel.com" , "rientjes@google.com" , "dovmurik@linux.ibm.com" , "tobin@ibm.com" , "Roth, Michael" , "vbabka@suse.cz" , "kirill@shutemov.name" , "ak@linux.intel.com" , "tony.luck@intel.com" , "marcorr@google.com" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "alpergun@google.com" , "dgilbert@redhat.com" , "jarkko@kernel.org" Subject: Re: [PATCH Part2 v6 02/49] iommu/amd: Introduce function to check SEV-SNP support Message-ID: References: <12df64394b1788156c8a3c2ee8dfd62b51ab3a81.1655761627.git.ashish.kalra@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657032066; 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=Bcm1kwuF5rplXwfBxNBb+WfZHo2BiShJJUDVm2VGqVY=; b=Z+3qU0/gysoX4yKSi72adRrH3EAcDAuclWPv7kisAlPJ3HWSeILsS27G9mbqQdwFsQWs6e iOuSPRiqoilqnZtH5ocsUM3PlixrQ4UzVphYMLTYVcvfKIwUZO5dP7rUsdcUbrnjAbppnd m1kyZ0ixi0oLwvH6Cnwzh3TH4pLD0tU= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=alien8.de header.s=dkim header.b=rlB3osgY; dmarc=pass (policy=none) header.from=alien8.de; spf=pass (imf09.hostedemail.com: domain of bp@alien8.de designates 5.9.137.197 as permitted sender) smtp.mailfrom=bp@alien8.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657032066; a=rsa-sha256; cv=none; b=PFd08QDqzb65XXQ1vYpDlK0eyS3P9ylNKW6SXYJdOygGgTxITxp+SExBw0rLuXfwFwMEOa ALVRm8RZ4LTEW5TUoQ+zf/L4IV/a4ZquBAr97SdMDJ/aVQXU5rf0MhZGbFJHCZsHA+Ug/U 6uZSHg+ktuTs4Afcen2Frk1a92jAn30= Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=alien8.de header.s=dkim header.b=rlB3osgY; dmarc=pass (policy=none) header.from=alien8.de; spf=pass (imf09.hostedemail.com: domain of bp@alien8.de designates 5.9.137.197 as permitted sender) smtp.mailfrom=bp@alien8.de X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: A0D15140058 X-Stat-Signature: n3sd1e4da17u77u7dm5rg5zdn6nmn3u1 X-Rspam-User: X-HE-Tag: 1657032065-249845 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Jul 05, 2022 at 01:56:00PM +0000, Kalra, Ashish wrote: > This function is required to ensure that IOMMU supports the SEV-SNP > feature before enabling the SNP feature and calling SNP_INIT. > This IOMMU support check is done in the AMD IOMMU driver with the > iommu_sev_snp_supported() function so it is exported by the IOMMU > driver and called by sev module What sev module? The call to iommu_sev_snp_supported() is done by snp_rmptable_init() which is in arch/x86/kernel/sev.c. AFAICT. And that is not a module. But function exports are done for modules. So that export looks superfluous. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette