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 EDCC7291C for ; Thu, 21 Jul 2022 11:29:14 +0000 (UTC) Received: from zn.tnic (p5de8e862.dip0.t-ipconnect.de [93.232.232.98]) (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 D3DAC1EC0380; Thu, 21 Jul 2022 13:29:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1658402947; 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=Wd2DXG4EY+gV5zYMOQhIEqcD8PQY00hUt7HCgRibjL8=; b=dFXCVt/OHUd/noNwab4aCuTwdHKd3CdavlyVXQUVKSiS1+i6jsnv+RaBor6Eb0ibeEH8Ik ZW7eGQZ5aCAV385nZn2vqMYWTQQUDYh0ZpB0Vhc9p+44UKLkVTNN/r9xFHx2rSqY2Qcdbg csa52vVIX68AZfpxHkRUlE5KlvGx05g= Date: Thu, 21 Jul 2022 13:29:01 +0200 From: Borislav Petkov To: Ashish Kalra 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, thomas.lendacky@amd.com, hpa@zytor.com, ardb@kernel.org, pbonzini@redhat.com, seanjc@google.com, vkuznets@redhat.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, michael.roth@amd.com, 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 04/49] x86/sev: set SYSCFG.MFMD Message-ID: References: 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 Mon, Jun 20, 2022 at 11:02:18PM +0000, Ashish Kalra wrote: > Subject: [PATCH Part2 v6 04/49] x86/sev: set SYSCFG.MFMD That subject title needs to be made human readable. > From: Brijesh Singh > > SEV-SNP FW >= 1.51 requires that SYSCFG.MFMD must be set. Because? Also, commit message needs to be human-readable and not pseudocode. > @@ -2325,6 +2346,9 @@ static __init int __snp_rmptable_init(void) > /* Flush the caches to ensure that data is written before SNP is enabled. */ > wbinvd_on_all_cpus(); > > + /* MFDM must be enabled on all the CPUs prior to enabling SNP. */ > + on_each_cpu(mfdm_enable, NULL, 1); > + > /* Enable SNP on all CPUs. */ > on_each_cpu(snp_enable, NULL, 1); No, not two IPI generating function calls - one and do everything in it. I.e., what Marc said. Thx. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette