[PATCH v2] x86: Fix for cache computation on AMD legacy cpus.

Florian Weimer fweimer@redhat.com
Wed Aug 2 06:43:29 GMT 2023


* sajan karumanchi:

> From: Sajan Karumanchi <sajan.karumanchi@amd.com>
>
> 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
> fail-safe option to handle these exceptions.
> Fixed 'level4_cache_size' value through handle_amd().
>
> Reviewed-by: Premachandra Mallappa <premachandra.mallappa@amd.com>

I checked that the reported cache sizes are now back to what they were
before on a few older systems.  I think this should go in.

Tested-by: Florian Weimer <fweimer@redhat.com>

Sajan, do you want to backport this immediately to 2.38, or wait a bit?

Thanks,
Florian



More information about the Libc-alpha mailing list