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 543E82C9C for ; Sun, 6 Feb 2022 19:38:32 +0000 (UTC) Received: from zn.tnic (dslb-088-067-221-104.088.067.pools.vodafone-ip.de [88.67.221.104]) (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 5EF7C1EC0441; Sun, 6 Feb 2022 20:38:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1644176306; 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=yqxAcVL2KhjtUMBgRcGSnSmTPEJZ8FGNmpnojkiTRCc=; b=hTLAhm5sRpP6cMHx6Osdw5gRZVFbU7CyVkzvUO2cThEfKjf1AQ5WoB1+arpGTp+Rc+9Bib F46MGq7zWRBNJRVdrkbA+OD8AH9AOfP005ga1hzVtV0WQLcD+GO89b8VD2Rt6cawg6LVKu 6N25KaDnJeYOGaYMj2+67lvoyxUEPoo= Date: Sun, 6 Feb 2022 20:38:19 +0100 From: Borislav Petkov To: Brijesh Singh Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-efi@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-coco@lists.linux.dev, linux-mm@kvack.org, Thomas Gleixner , Ingo Molnar , Joerg Roedel , Tom Lendacky , "H. Peter Anvin" , Ard Biesheuvel , Paolo Bonzini , Sean Christopherson , Vitaly Kuznetsov , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Michael Roth , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , "Dr . David Alan Gilbert" , brijesh.ksingh@gmail.com, tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH v9 37/43] x86/sev: Add SEV-SNP feature detection/setup Message-ID: References: <20220128171804.569796-1-brijesh.singh@amd.com> <20220128171804.569796-38-brijesh.singh@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: <20220128171804.569796-38-brijesh.singh@amd.com> On Fri, Jan 28, 2022 at 11:17:58AM -0600, Brijesh Singh wrote: > +static __init struct cc_blob_sev_info *snp_find_cc_blob(struct boot_params *bp) > +{ > + struct cc_blob_sev_info *cc_info; > + > + /* Boot kernel would have passed the CC blob via boot_params. */ > + if (bp->cc_blob_address) { > + cc_info = (struct cc_blob_sev_info *)(unsigned long)bp->cc_blob_address; > + goto found_cc_info; > + } What is the difference here, why aren't you looking for the blob in an EFI table? Even if you're booted directly by firmware, there should still be EFI there or? And if so, then I think you should share some of the code through sev-shared.c so that there's not so much duplication... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette