From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.alien8.de (mail.alien8.de [65.109.113.108]) (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 B83B01F4C9F for ; Fri, 28 Feb 2025 18:47:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=65.109.113.108 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740768436; cv=none; b=VCiSjM2JlXMJn4wXa8NDC7MzCg9wTZ3BzHDNECpKdukLnWvQrAf+9bqNL29grAxNwyxdY/SvCHDi2/iln0SSANfGLfEL0z8mp+UngOO805YwXFmEFQ9L+qwqevslL0eJ6heORD42vHwTPYHA/FnCbJZ1+YHryLbmKKLfSQz+PoY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740768436; c=relaxed/simple; bh=tVm2j/jfiLcb+mdlQwrmiGkinV/JZdzzn2d04yuTpxI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=f3cyASKacbiRJLizH+erPIPknNrYjZekp5e+4JxthhEOmCqjFlUd0RRAvpiIndAWbkdR+vraJ3iOyv06HgEsVqqIv+qPdExNMu7sozmb0b9g6LEjLuAM6P/GScnXCoeu6O67cUAq7ey5zWtZdmelWTW4TeJfvaCrx1l0lOA+tj0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de; spf=pass smtp.mailfrom=alien8.de; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b=DNfHxAvr; arc=none smtp.client-ip=65.109.113.108 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=alien8.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alien8.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (4096-bit key) header.d=alien8.de header.i=@alien8.de header.b="DNfHxAvr" Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTP id F0A4E40E01AE; Fri, 28 Feb 2025 18:47:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id bToSY47InZRh; Fri, 28 Feb 2025 18:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1740768425; bh=1KiKu6KpywPSyZTKP4+7kFo3bBQmsCg/DkCOyPCqlcQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DNfHxAvrlVsW+K4gF137B+Ffa4GP9EXu9UbkpFiXRVppvIV35iIWGQ79RLNPrT/PG ma1dhphFB9eAczcfn3ryQmL3Gtbb77yKjS8Np0WXbUDlfzygi6Bo+KelEUFQLs/RSe Rz75yHlIISOCFO/UjRXRuRzy2H5srszsJROqNO39kppH4iMqHHwQ/GZ7SpOolFTGyo E0uJKkd518aNcO4e796FVJy/Ev0Dz9AJf7ElHsKIcO+XplXnh77jNrNenrlF9i6gOF BQE4vVrxBFVt5ny1hcOoXARJv/KDvOt9l9GJVADdEuRG8LNfIwIMUZ+zeuTQ5+RDpK P/ox3qx8ELpI5svPxejXOqIZdnSQFFxCtyMO2I+kW0geZjp9cha3f8+INMawjtIta6 LxnEo2cE/0bhBc+3Gw642nC8HBCntsbeqnofmxDDxxlcA4IHsrqpvTCrqi+BOhnOCp P6ndAQP9teJa/+UmLI0tmhbI2yIwUDSNZ6mRqQ0y24MnjQPW5vr/qa5K5zs38IN7Pn q9TvQwknjJXWnuLWLCEiCepZFF1ArgKkqo8RKrJXY9xpVJfKKTaSJ0t4kHhmN6/TRb 45pytiSLQvqK2YFfP/Ya0qtQLc/0xVg6kCRfAFgZMaHeFnRpDtmpWtk9K2GLVaIfRt e0PIP0il59k3HzhQx//2pk6o= Received: from zn.tnic (pd95303ce.dip0.t-ipconnect.de [217.83.3.206]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 06B5340E0173; Fri, 28 Feb 2025 18:46:46 +0000 (UTC) Date: Fri, 28 Feb 2025 19:46:40 +0100 From: Borislav Petkov To: Rik van Riel Cc: x86@kernel.org, linux-kernel@vger.kernel.org, peterz@infradead.org, dave.hansen@linux.intel.com, zhengqi.arch@bytedance.com, nadav.amit@gmail.com, thomas.lendacky@amd.com, kernel-team@meta.com, linux-mm@kvack.org, akpm@linux-foundation.org, jackmanb@google.com, jannh@google.com, mhklinux@outlook.com, andrew.cooper3@citrix.com, Manali.Shukla@amd.com, mingo@kernel.org, Dave Hansen Subject: Re: [PATCH v14 03/13] x86/mm: add INVLPGB support code Message-ID: <20250228184640.GEZ8IEkBFDZhOpyK4e@fat_crate.local> References: <20250226030129.530345-1-riel@surriel.com> <20250226030129.530345-4-riel@surriel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20250226030129.530345-4-riel@surriel.com> On Tue, Feb 25, 2025 at 10:00:38PM -0500, Rik van Riel wrote: > Add helper functions and definitions needed to use broadcast TLB > invalidation on AMD EPYC 3 and newer CPUs. > > All the functions defined in invlpgb.h are used later in the series. Uff, that's tlb.h now. As already said. :-\ Btw, this is why there's no point to write *what* the patch does - that is visible from the diff itself. This sentence is simply not needed. > Compile time disabling X86_FEATURE_INVLPGB when the config > option is not set allows the compiler to omit unnecessary code. > > Signed-off-by: Rik van Riel > Tested-by: Manali Shukla > Tested-by: Brendan Jackman > Tested-by: Michael Kelley > Acked-by: Dave Hansen And I asked you already but still crickets: What do those Tested-by tags mean if you keep changing the patches?! https://lore.kernel.org/r/20250224123142.GFZ7xmruuyrc2Wy0r7@fat_crate.local ... IOW, you need to drop those tags. > +/* Flush all mappings for all PCIDs except globals. */ This comment should state that addr=0 means both rax[1] (valid PCID) and rax[2] (valid ASID) are clear and this means: flush *any* PCID and ASID. So that it is clear. > +static inline void invlpgb_flush_all_nonglobals(void) > +{ > + __invlpgb(0, 0, 0, 1, 0, 0); > + __tlbsync(); > +} > + > #endif /* _ASM_X86_TLB_H */ > -- -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette