From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id C2077385771B for ; Fri, 2 Jun 2023 16:51:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C2077385771B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=deneb.enyo.de Received: from [172.17.203.2] (port=43095 helo=deneb.enyo.de) by albireo.enyo.de ([172.17.140.2]) with esmtps (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) id 1q57zf-003MSU-EO; Fri, 02 Jun 2023 16:51:16 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.96) (envelope-from ) id 1q57zg-000JW3-2I; Fri, 02 Jun 2023 18:51:16 +0200 From: Florian Weimer To: "sajan.karumanchi--- via Libc-alpha" Cc: carlos@redhat.com, fweimer@redhat.com, sajan.karumanchi@gmail.com, Sajan Karumanchi , premachandra.mallappa@amd.com Subject: Re: [PATCH] x86: Fix for cache computation on AMD legacy cpus. References: <20230602131907.1375745-1-sajan.karumanchi@amd.com> Date: Fri, 02 Jun 2023 18:51:16 +0200 In-Reply-To: <20230602131907.1375745-1-sajan.karumanchi@amd.com> (sajan karumanchi's message of "Fri, 2 Jun 2023 13:19:07 +0000") Message-ID: <87a5xhq03f.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.7 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: * sajan karumanchi: > From: Sajan Karumanchi > > Some legacy AMD CPUs and hypervisors have the _cpuid_ '0x8000_001D' > set to Zero, thus resulting in zeroed-out computed cache values. > This patch reintroduces the old way of cache computation as a > failsafe option to handle these exceptions. > > Reviewed-by: Premachandra Mallappa Thanks. On =E2=80=9CAMD Turion(tm) II Neo N40L Dual-Core Processor=E2=80= =9D, this fixes the regression. The reported cache sizes are identical. There's still one remaining issue (not a regression): x86.cpu_features.level4_cache_size=3D0xffffffffffffffff I think this should be zero if there is no L4 cache. I'm going to test more machines early next week.