From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id 18B803858298 for ; Fri, 10 Mar 2023 07:04:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 18B803858298 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-x534.google.com with SMTP id i34so16564659eda.7 for ; Thu, 09 Mar 2023 23:04:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678431882; 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=u21YYQsU9/yqXManB6CezAdDYumjyRjroifVONRQ7U0=; b=kSxC6xvrnoHWNyWAlWgH8t4LszB+L0ezaPhYx4TKKXoOF8TH5MNljT4zdOYxdbxORJ UZxQbIjWR3MDgUi/rRynBV792LzBZjGzZ5EcUH5AkSxbVcPMArx5VGKgLJDCE31VbwwL 6wYadAJPJRjvU46XBollTcdvLtMjHtJ7TyfWkOORetOL1M2KLsM2ar2Yl6UzuwOIJxlh SluSh1XH5GpFf4r+VJTBB4ZBK6RJhHSBOK8kN6hq4MLvXSw+FyWk2M+4uGliNavzwtdS bJqhT8789zSkVRhCGihJk6UJpcG8PFWM/QAYLKTpxn2pUXeTVifGJ52cjj6WGIzt9Pe+ 1XGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678431882; 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=u21YYQsU9/yqXManB6CezAdDYumjyRjroifVONRQ7U0=; b=QB4N6cT2M3PI8FYHxx1WuyayBBp+6221vui7KWr3dfG/I9i/zww9T5+TwaukvpXIiG ySpsAgm60tpsbwrZEsVRm4Y/Y+vo0pzsk2ebJGVZi/OvEMy2xJAqrwzro8hrP1vYNord 5AfQXe31chRqrLPYvvEBLIpqVPBhAhwJ1MOUek+o6olKwzY2qHBWBL3UDi7PYrU0khxU WkToMWenoT1ZScCzpO2jNnNAHP4rb6cUjU5+m07PpANXgItP0zN2pnLZBJeKHlFXyS3R n5xPxvtgnnZnOP/V2FDnLD/CsLTvATtlFUXuDPDLKJikY6CUtzi5bGcG8UHkb/K89Wgt ZBLQ== X-Gm-Message-State: AO0yUKXXglxlb0D1ZnzgJqmp5VfRRQpJsNGTmq9D2MII2PUNM7i8uLST pKG1CXLAu6mxChg3I3bcQ1SyPhbyINgMyVYwXtN9Qa0o X-Google-Smtp-Source: AK7set9qMoQkVOuDG+mv2TFChY0QENsyrVaZ95iE2/E1d/ibdtmwENqqgy2/73IqxE4iYLpoLg+SxZmBxsK+zQLYBws= X-Received: by 2002:a17:906:6a93:b0:8b1:7ac6:318a with SMTP id p19-20020a1709066a9300b008b17ac6318amr11667963ejr.4.1678431881617; Thu, 09 Mar 2023 23:04:41 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Noah Goldstein Date: Fri, 10 Mar 2023 01:04:30 -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.4 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) > > #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); > LGTM.