c2879fd933
* Thu Jan 13 2022 Florian Weimer <fweimer@redhat.com> - 2.34-18 - Backport optimized ELF dependency sorting algorithm (#2032647) * Thu Jan 13 2022 Florian Weimer <fweimer@redhat.com> - 2.34-17 - Sync with upstream branch release/2.34/master, commit 2fe2af88abd13ae5636881da2e26f461ecb7dfb5 - i386: Remove broken CAN_USE_REGISTER_ASM_EBP (bug 28771) - Update syscall lists for Linux 5.15 - powerpc: Fix unrecognized instruction errors with recent GCC - timezone: test-case for BZ #28707 - timezone: handle truncated timezones from tzcode-2021d and later (BZ #28707) - Fix subscript error with odd TZif file [BZ #28338] - AArch64: Check for SVE in ifuncs [BZ #28744] - intl/plural.y: Avoid conflicting declarations of yyerror and yylex - Linux: Fix 32-bit vDSO for clock_gettime on powerpc32 - linux: Add sparck brk implementation - Update sparc libm-test-ulps - Update hppa libm-test-ulps - riscv: align stack before calling _dl_init [BZ #28703] - riscv: align stack in clone [BZ #28702] - powerpc64[le]: Allocate extra stack frame on syscall.S - elf: Fix tst-cpu-features-cpuinfo for KVM guests on some AMD systems [BZ #28704] - nss: Use "files dns" as the default for the hosts database (bug 28700) - arm: Guard ucontext _rtld_global_ro access by SHARED, not PIC macro - mips: increase stack alignment in clone to match the ABI - mips: align stack in clone [BZ #28223] Resolves: #2032647 Resolves: #2033649
36 lines
1.4 KiB
Diff
36 lines
1.4 KiB
Diff
commit 03de6917bd11c0591867607ce74ef658f76eabb9
|
|
Author: Aurelien Jarno <aurelien@aurel32.net>
|
|
Date: Wed Dec 15 23:46:19 2021 +0100
|
|
|
|
elf: Fix tst-cpu-features-cpuinfo for KVM guests on some AMD systems [BZ #28704]
|
|
|
|
On KVM guests running on some AMD systems, the IBRS feature is reported
|
|
as a synthetic feature using the Intel feature, while the cpuinfo entry
|
|
keeps the same. Handle that by first checking the presence of the Intel
|
|
feature on AMD systems.
|
|
|
|
Fixes bug 28704.
|
|
|
|
(cherry picked from commit 94058f6cde8b887178885954740ac6c866d25eab)
|
|
|
|
diff --git a/sysdeps/x86/tst-cpu-features-cpuinfo.c b/sysdeps/x86/tst-cpu-features-cpuinfo.c
|
|
index 2d4927f5e52dc260..830aaca2ecae971b 100644
|
|
--- a/sysdeps/x86/tst-cpu-features-cpuinfo.c
|
|
+++ b/sysdeps/x86/tst-cpu-features-cpuinfo.c
|
|
@@ -169,7 +169,14 @@ do_test (int argc, char **argv)
|
|
else if (cpu_features->basic.kind == arch_kind_amd)
|
|
{
|
|
fails += CHECK_PROC (ibpb, AMD_IBPB);
|
|
- fails += CHECK_PROC (ibrs, AMD_IBRS);
|
|
+
|
|
+ /* The IBRS feature on AMD processors is reported using the Intel feature
|
|
+ * on KVM guests (synthetic bit). In both cases the cpuinfo entry is the
|
|
+ * same. */
|
|
+ if (HAS_CPU_FEATURE (IBRS_IBPB))
|
|
+ fails += CHECK_PROC (ibrs, IBRS_IBPB);
|
|
+ else
|
|
+ fails += CHECK_PROC (ibrs, AMD_IBRS);
|
|
fails += CHECK_PROC (stibp, AMD_STIBP);
|
|
}
|
|
fails += CHECK_PROC (ibt, IBT);
|