From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AEB637C for ; Tue, 5 Jul 2022 14:34:02 +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> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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