Integrated: 8280867: Cpuid1Ecx feature parsing is incorrect for AMD CPUs

Aleksey Shipilev shade at openjdk.java.net
Tue Feb 1 20:58:14 UTC 2022


On Mon, 31 Jan 2022 11:26:29 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> See discussion in the bug. AFAICS, the fix is to "just" shift the flags by one to match both Intel and AMD specs. I believe this is not a serious bug, because adjacent bits in AMD case are set on modern chips, and Intel detection code only uses `lzcnt` and `prefetchw` out of these flags, both with Intel-specific hacks that are dropped now.
> 
> Additional testing:
>  - [x] Linux x86_64 fastdebug on TR 3970X (Zen 2)
>  - [x]  Linux x86_64 fastdebug on i5-11500 (Rocket Lake)
>  - [x] Eyeballing `-Xlog:os+cpu` on TR 3970X (Zen 2) -- no change in detected flags
>  - [x]  Eyeballing `-Xlog:os+cpu` on i5-11500 (Rocket Lake) -- no change in detected flags

This pull request has now been integrated.

Changeset: a18beb47
Author:    Aleksey Shipilev <shade at openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/a18beb4797a1ca6fc6b31e997be48b2bd91c6ac0
Stats:     9 lines in 1 file changed: 0 ins; 1 del; 8 mod

8280867: Cpuid1Ecx feature parsing is incorrect for AMD CPUs

Reviewed-by: kvn, dlong

-------------

PR: https://git.openjdk.java.net/jdk/pull/7287


More information about the hotspot-dev mailing list