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 8D3DB72 for ; Tue, 31 Aug 2021 10:25:57 +0000 (UTC) Received: from zn.tnic (p200300ec2f0f2f00d101edea3987ba94.dip0.t-ipconnect.de [IPv6:2003:ec:2f0f:2f00:d101:edea:3987:ba94]) (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 C81011EC0301; Tue, 31 Aug 2021 12:25:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1630405551; 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=9au5Ib2D8iCGnkGnB5h3PrkkAHJSnmZMrsYQr2spPug=; b=C9MEtadGhn2B1d01Tkv0ATDV6t7XjHM984fM/2q3kBGB3rhHjyytvPa9psO9uFnqXWeish +TKIdvhUUZ8sWo9tk4LpibCf75wr3uxvGVDzgQcndXxIDGBH48JMykQ9sbPNT9Fo37TZYs sj4C/m3u/3wFVYeQJYytDYtNRle0188= Date: Tue, 31 Aug 2021 12:26:28 +0200 From: Borislav Petkov To: Michael Roth Cc: Brijesh Singh , 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 , Wanpeng Li , Jim Mattson , Andy Lutomirski , Dave Hansen , Sergio Lopez , Peter Gonda , Peter Zijlstra , Srinivas Pandruvada , David Rientjes , Dov Murik , Tobin Feldman-Fitzthum , Vlastimil Babka , "Kirill A . Shutemov" , Andi Kleen , tony.luck@intel.com, marcorr@google.com, sathyanarayanan.kuppuswamy@linux.intel.com Subject: Re: [PATCH Part1 v5 30/38] x86/compressed/64: store Confidential Computing blob address in bootparams Message-ID: References: <20210820151933.22401-1-brijesh.singh@amd.com> <20210820151933.22401-31-brijesh.singh@amd.com> <20210827190955.fc5eyvk2mmtuawwz@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: <20210827190955.fc5eyvk2mmtuawwz@amd.com> On Fri, Aug 27, 2021 at 02:09:55PM -0500, Michael Roth wrote: > Most of the #ifdef'ery is due to the EFI scan, so I moved that part out > to a separate helper, snp_probe_cc_blob_efi(), that lives in > boot/compressed.sev.c. Still not pretty, but would this be acceptable? It is still ugly... :) I guess you should simply do two separate functions - one doing the compressed dance and the other the later parsing and keep 'em separate. It's not like you're duplicating a ton of code so... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette