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

Sergio Durigan Junior sergiodj@sergiodj.net
Wed Aug 2 01:36:56 GMT 2023


On Tuesday, August 01 2023, sajan karumanchi wrote:

> 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>

Hi,

As previously discussed at
https://www.mail-archive.com/qemu-devel@nongnu.org/msg973967.html, this
is affecting QEMU.  More specifically, we're seeing QEMU segfault in
Ubuntu's autopkgtest infrastructure whenever it's used in a nested VM
environment, which is causing some headaches.

I backported the proposed patch to glibc 2.37 (the version currently
shipped in Ubuntu's development version) and verified that it seems to
fix the problem, so I thought it'd be worth mentioning it here.

Cheers,

-- 
Sergio
GPG key ID: 237A 54B1 0287 28BF 00EF  31F4 D0EB 7628 65FC 5E36
Please send encrypted e-mail if possible
https://sergiodj.net/


More information about the Libc-alpha mailing list