Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 390840 Details for
Bug 531528
sys-libs/glibc-2.20 trap invalid opcode libpthread-2.20.so TSX Haswell Bug
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
glibc-2.20-blacklist_HLERTM_Haswell.patch
glibc-2.20-blacklist_HLERTM_Haswell.patch (text/plain), 2.42 KB, created by
Joerg Neikes
on 2014-12-03 12:36:52 UTC
(
hide
)
Description:
glibc-2.20-blacklist_HLERTM_Haswell.patch
Filename:
MIME Type:
Creator:
Joerg Neikes
Created:
2014-12-03 12:36:52 UTC
Size:
2.42 KB
patch
obsolete
>diff -Nur a/sysdeps/x86_64/multiarch/init-arch.c b/sysdeps/x86_64/multiarch/init-arch.c >--- a/sysdeps/x86_64/multiarch/init-arch.c 2014-09-07 10:09:09.000000000 +0200 >+++ b/sysdeps/x86_64/multiarch/init-arch.c 2014-12-03 13:00:41.073574561 +0100 >@@ -26,7 +26,7 @@ > > > static void >-get_common_indeces (unsigned int *family, unsigned int *model) >+get_common_indeces (unsigned int *family, unsigned int *model, unsigned int *stepping) > { > __cpuid (1, __cpu_features.cpuid[COMMON_CPUID_INDEX_1].eax, > __cpu_features.cpuid[COMMON_CPUID_INDEX_1].ebx, >@@ -36,6 +36,7 @@ > unsigned int eax = __cpu_features.cpuid[COMMON_CPUID_INDEX_1].eax; > *family = (eax >> 8) & 0x0f; > *model = (eax >> 4) & 0x0f; >+ *stepping = eax & 0x0f; > } > > >@@ -47,6 +48,7 @@ > unsigned int edx; > unsigned int family = 0; > unsigned int model = 0; >+ unsigned int stepping = 0; > enum cpu_features_kind kind; > > __cpuid (0, __cpu_features.max_cpuid, ebx, ecx, edx); >@@ -56,7 +58,7 @@ > { > kind = arch_kind_intel; > >- get_common_indeces (&family, &model); >+ get_common_indeces (&family, &model, &stepping); > > unsigned int eax = __cpu_features.cpuid[COMMON_CPUID_INDEX_1].eax; > unsigned int extended_family = (eax >> 20) & 0xff; >@@ -131,7 +133,7 @@ > { > kind = arch_kind_amd; > >- get_common_indeces (&family, &model); >+ get_common_indeces (&family, &model, &stepping); > > ecx = __cpu_features.cpuid[COMMON_CPUID_INDEX_1].ecx; > >@@ -179,6 +181,14 @@ > } > } > >+ /* Disable Intel TSX (HLE and RTM) due to erratum HSD136/HSW136 >+ on Haswell processors, to work around outdated microcode that >+ doesn't disable the broken feature by default */ >+ if (kind == arch_kind_intel && family == 6 && >+ ((model == 63 && stepping <= 2) || (model == 60 && stepping <= 3) || >+ (model == 69 && stepping <= 1) || (model == 70 && stepping <= 1))) >+ __cpu_features.cpuid[COMMON_CPUID_INDEX_7].ebx &= ~(bit_RTM | bit_HLE); >+ > __cpu_features.family = family; > __cpu_features.model = model; > atomic_write_barrier (); >diff -Nur a/sysdeps/x86_64/multiarch/init-arch.h b/sysdeps/x86_64/multiarch/init-arch.h >--- a/sysdeps/x86_64/multiarch/init-arch.h 2014-09-07 10:09:09.000000000 +0200 >+++ /bsysdeps/x86_64/multiarch/init-arch.h 2014-12-03 13:01:27.103574530 +0100 >@@ -41,6 +41,7 @@ > > /* COMMON_CPUID_INDEX_7. */ > #define bit_RTM (1 << 11) >+#define bit_HLE (1 << 4) > #define bit_AVX2 (1 << 5) > > /* XCR0 Feature flags. */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 531528
:
390832
|
390834
|
390836
|
390838
| 390840