From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x535.google.com (mail-ed1-x535.google.com [IPv6:2a00:1450:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id 565C03858C74 for ; Fri, 10 Mar 2023 05:01:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 565C03858C74 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x535.google.com with SMTP id cw28so15823709edb.5 for ; Thu, 09 Mar 2023 21:01:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678424510; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=WEapT/2p9yO74UYkyAwTjN5rHloyIQ8pIfkMTwKVf2s=; b=Pq3E5L7hp9MSTB7z6haNVFByqndy3BCINrUnROIs55Iimvn1mFo1xNfmh1M8lW/I8O XCu4Xi4XL6LLlBrCQippjEekmWFZxW6tZIVIGQVpBm35a5n/v84pNBxGQGqQgTYdnIX9 GZmhDTUVPByimbeJmofzNwqLN3RLciPaVHGik35nUOvJQBGUprKIP14BLr6IeQVwDqvC JVH3c2bbxqd2DDoa7gwyuIVLlSUreD4WKqPSxzJAL6Z/bSyLD1oTohf9VMqnfd/bFc0o fZggzfdlCfSbICE9g/IJQPhdENf/i3ARFEsMYpOkzMwtIPf1WXqvSAhxtuxPHIn7AElG NkgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678424510; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WEapT/2p9yO74UYkyAwTjN5rHloyIQ8pIfkMTwKVf2s=; b=d2lcghmV/ciGAtrKz/q6/TRzhWUHE7Zn/RXy+z775Dz6+Zh+JtqsSBLJuWctUNhReh RYryzfisvVePv5NPzI1xXfC7Hz59eOrPLAOR24xm++8uxjn0YyoQl93z+x96x0P7swgi 0HC6TMmADXnWlZJCI7W2RHx1j1E7tSpZoNuJSK+sqOnE/Tt59c3E8ziQh4loHSiPkx2B +pldqUEY308YmRndWYJZjW5ddkwv/ItXt7g+0vKlbUHAKNqYgxgVaGtOYnf9V9xEoID8 4+onB5ZUNakDx1Mtj2o+AuubYmPJK+df0AVBQfoCnPRGkgQFJllYNoUtoIHGgAtl+Sf0 AwFg== X-Gm-Message-State: AO0yUKXXMZt7wLs+wW5g9YCuM2aAl+Rkj7Ni77KTKaz6+d0UNe9Aaahl vS3O2xyZEjlWa2UIzM7cwMiI0NF/0kZMZrMmB0k= X-Google-Smtp-Source: AK7set+jYJGp0AA7UiTzp8WHeo8XCY2ChJqEGXemD2Qxk3+aIKjXbWKLH1ikHs3bx0G+FfUKmWHMDiRwV/fcWUWyucI= X-Received: by 2002:a17:906:a1c5:b0:8f0:147b:be2 with SMTP id bx5-20020a170906a1c500b008f0147b0be2mr11542342ejb.4.1678424509994; Thu, 09 Mar 2023 21:01:49 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Noah Goldstein Date: Thu, 9 Mar 2023 23:01:37 -0600 Message-ID: Subject: Re: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c To: DJ Delorie Cc: libc-alpha@sourceware.org, hjl.tools@gmail.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, Mar 9, 2023 at 9:43=E2=80=AFPM DJ Delorie via Libc-alpha wrote: > > > As not noted in the kernel sources: > > > /* Intel-defined CPU features, CPUID level 0x00000007:0 (ECX), word 16 = */ > > #define X86_FEATURE_AVX512VBMI (16*32+ 1) /* AVX512 Vector Bit= Manipulation instructions*/ > > #define X86_FEATURE_UMIP (16*32+ 2) /* User Mode Instruc= tion Protection */ > > vs glibc: > > > /* ECX. */ > > #define bit_cpu_PREFETCHWT1 (1u << 0) Does platform/x86.h need to be updated as well? Although that might be hard= er to change as its user facing. > > #define bit_cpu_AVX512_VBMI (1u << 1) > > #define bit_cpu_UMIP (1u << 2) > > Tested on the one machine I could find in our inventory that set that fla= g: > > - FAIL: elf/tst-cpu-features-cpuinfo > - FAIL: elf/tst-cpu-features-cpuinfo-static > - 27 FAIL > + 23 FAIL > > (there were two unrelated timeouts in the "before" results) > > From c4a62abbeac4ced531ced3999a2cd2d4fab6bdc6 Mon Sep 17 00:00:00 2001 > From: DJ Delorie > Date: Thu, 9 Mar 2023 22:32:54 -0500 > Subject: x86: Don't check PREFETCHWT1 in tst-cpu-features-cpuinfo.c > > Don't check PREFETCHWT1 against /proc/cpuinfo since kernel doesn't report > PREFETCHWT1 in /proc/cpuinfo. > > diff --git a/sysdeps/x86/tst-cpu-features-cpuinfo.c b/sysdeps/x86/tst-cpu= -features-cpuinfo.c > index c25240774e..e963592c4b 100644 > --- a/sysdeps/x86/tst-cpu-features-cpuinfo.c > +++ b/sysdeps/x86/tst-cpu-features-cpuinfo.c > @@ -217,7 +217,10 @@ do_test (int argc, char **argv) > fails +=3D CHECK_PROC (pku, PKU); > fails +=3D CHECK_PROC (popcnt, POPCNT); > fails +=3D CHECK_PROC (3dnowprefetch, PREFETCHW); > +#if 0 > + /* NB: /proc/cpuinfo doesn't report this feature. */ > fails +=3D CHECK_PROC (prefetchwt1, PREFETCHWT1); > +#endif > #if 0 > /* NB: /proc/cpuinfo doesn't report this feature. */ > fails +=3D CHECK_PROC (ptwrite, PTWRITE); >