Bug 2203186 - glibc: Fix cache size detection for hypervisors or older AMD hardware
Summary: glibc: Fix cache size detection for hypervisors or older AMD hardware
Keywords:
Status: MODIFIED
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: glibc
Version: 9.3
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: rc
: ---
Assignee: Florian Weimer
QA Contact: Sergey Kolosov
URL:
Whiteboard:
Depends On:
Blocks: 2166709 2166710
TreeView+ depends on / blocked
 
Reported: 2023-05-11 13:10 UTC by Carlos O'Donell
Modified: 2023-08-14 15:38 UTC (History)
7 users (show)

Fixed In Version: glibc-2.34-80.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-156960 0 None None None 2023-05-11 13:13:31 UTC

Description Carlos O'Donell 2023-05-11 13:10:10 UTC
The current -67 glibc build uses the upstream cache size detection code which is incorrect under certain hypervisors and older AMD hardware.

We need to do one of two things:
- Revert the current cache size detection code.
- Backport an upstream correction that supports the old cpuid mechanism and the new cpuid mechanism.

Comment 5 Carlos O'Donell 2023-07-14 21:26:05 UTC
We will be reverting the current AMD cacheline changes until we have a solution that works for old and new CPUs.

Comment 10 Carlos O'Donell 2023-08-14 14:28:26 UTC
Upstream commit:

commit dcad5c8578130dec7f35fd5b0885304b59f9f543
Author: Sajan Karumanchi <sajan.karumanchi>
Date:   Tue Aug 1 15:20:55 2023 +0000

    x86: Fix for cache computation on AMD legacy cpus.
    
    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>
    Tested-by: Florian Weimer <fweimer>

Committed to c9s:

commit 3a04eb2e1826da207b64a254af3d17e30a27db11
Author: Florian Weimer <fweimer>
Date:   Fri Aug 11 17:54:52 2023 +0200

    Fix AMD cache size computation for hypervisors, old CPUs (#2166710)
    
    Missing spec file update.
    
    Related: #2166710


Note You need to log in before you can comment on or make changes to this bug.