Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp4366480pxb; Tue, 31 Aug 2021 03:29:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy49Gkocee7Mk34wpp+HNQ6d5r/fr/9gfsNx7yajuw3GUDOlY/0DF4boOvbou5KXBH33cRq X-Received: by 2002:a05:6e02:805:: with SMTP id u5mr19049224ilm.223.1630405761607; Tue, 31 Aug 2021 03:29:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630405761; cv=none; d=google.com; s=arc-20160816; b=Twp1/zpDUeD2dDzx0/tcVYvpo7QUsVT8DNl41vPLm/J//ZyI9xdMz/UivUUBo1qB0w vp95S21d5Hhc/v/784/xE4cT3/eJaKA2BkB1SYmuiqWszOeHZfeTaCKIGZweuiQ+KhmZ 1n3PfI9+Y6GvQp7v2qWOSqTDmHaenkghyOnRiv1uYmA1gCXe/b+hoN0+3lAkZpK5ppaa bKmri1ky02VhDnhjSOG2YNXrqqDpVnA9TH05CIVMwJn2Gmw8nbV2nHWLg8SjQZVvoFG7 8JQtcKpHJBDCP97DM7FbvFQbQ76wGqaP8U9Tjrcwhzfo3b/On1Bq7X+0zdiHNj8ZIGN9 5Cqg== 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=9au5Ib2D8iCGnkGnB5h3PrkkAHJSnmZMrsYQr2spPug=; b=LEg1ghNPEfe39NP0w0QG65Vbn9QCKq1UqDAUfESGvCdCfZuySlQgBKUezHvk163t04 dwKrW9d21p4KFYCtqRsx9Ml/DQm8stdeXe5y5ylGL7JBsU2FAlgE+1Tr3KK+Wtb5k4Qw RNanq70Wm7zkFqjzJadtKMK+MIW4iu/7oV6cDTDxK5S0XDToJoUl7zBzdPteNfeKyAeP qiaQUypFHF9X5qEgoqn8/wotY929V+4BUqMWvzEQ39TlHy/t7+6m67qyImrUX14y+2dJ bqwFot7Nx94HR3Iizo/iunEaGkskDCGj1fV1OS94fVfVXs2sznTwEiMQdtSkyFv7JQv2 tp7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=C9MEtadG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e28si16601831iov.1.2021.08.31.03.29.09; Tue, 31 Aug 2021 03:29:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=C9MEtadG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241004AbhHaK0x (ORCPT + 99 others); Tue, 31 Aug 2021 06:26:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240996AbhHaK0w (ORCPT ); Tue, 31 Aug 2021 06:26:52 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 59191C061575; Tue, 31 Aug 2021 03:25:57 -0700 (PDT) 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210827190955.fc5eyvk2mmtuawwz@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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