Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9360254rwd; Wed, 21 Jun 2023 06:33:35 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6uQJcf1xtTHJ0Jat//tQZRBpUDCSfmgpLyi8h/yxKg8165AJLzNAbnariXRvgcIVvDy8gG X-Received: by 2002:a05:6a20:4325:b0:122:a0fe:10ef with SMTP id h37-20020a056a20432500b00122a0fe10efmr5176115pzk.2.1687354415200; Wed, 21 Jun 2023 06:33:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687354415; cv=none; d=google.com; s=arc-20160816; b=FO5Us8YcxYwG2SFJ4E9Hzk75cWgROJOCkuI5Y9ULXKY+MqpDoCMkEmvvMzhLYCY/D+ N2+/cT3UCKuG25ytTCECFMLvQu1IkMjRlJf9MBgkUSijQUuEFfzF/drzWx1/jeDunZia 5PstN4DfMCrOLTKGl0b/1I+6X33G/FF6fN43Ux/6RoZSeUkp1YMqEYtuNrt87Brs26jk twrh9aAOBuU+WQ4rA986EFKu+vPmU1MZ3XLsl27JR1d4gcY1G4H1YmXzLtgh0AxFGvkX ZoQYvAtAN/d4Az7RMssp2yUGFbgQbANm0/b5Tt7qMUvkJfz8zRm+SFn9AlBIV+iJN3H/ /AAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=h6D1oWxliIEGx0hamqvBgdIL8Yifhe5fhqBA/YQTfnQ=; b=Rkm73XoIAbuvkVPFPVqQ+RcQOC4mzFUytJsmhDIS7ynl0WNJpCKZSZIME2WEpP/bFi Z8aalP/rGLH1EeJQUMz9UaFX4HLe2uj7s66Slw++CV3hodx7iXBSJ/kRNEqlJsLj8Eqi 038U1APYlAM/3vhZNOdR/IKuczHIIXdw8gon/grZZbRhi1hhgEPpfJIVPHfxUUZoFxeH aWeaJQjaYbFT4NJ7lvaR+1Eh4gio9D8iadktk+0/BShpaaN/R0Pcyu+KRFyCc7GLLOLe j/0i+cXv5cKNCzWSS8IGKeyv4+KlcEjeKM9CX2PINOJ7DyaDjyN2Zq/5adrguZcnMiWD Wj5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b="Q/EOGTLF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t67-20020a625f46000000b0065824ae5092si3888793pfb.151.2023.06.21.06.33.10; Wed, 21 Jun 2023 06:33:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b="Q/EOGTLF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232455AbjFUNTj (ORCPT + 99 others); Wed, 21 Jun 2023 09:19:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231134AbjFUNTh (ORCPT ); Wed, 21 Jun 2023 09:19:37 -0400 Received: from xry111.site (xry111.site [89.208.246.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E5E3E72 for ; Wed, 21 Jun 2023 06:19:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1687353576; bh=h6D1oWxliIEGx0hamqvBgdIL8Yifhe5fhqBA/YQTfnQ=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=Q/EOGTLF0eEnQ6UK8N15G7+DEJu8umFvvRckgLxBsVu3L+sFQtrhyrIypRBTuWWBF xDyCbWFk9yW+4jjCvWD+SfTGRyGvPIKSCZm0pf/y909N9BS0i8+YfBq9/cOkfQ8wW+ x2wWYHEKEDXmf0viJdQZ4vmQcEFOrPgm8dVNSySA= Received: from localhost.localdomain (xry111.site [IPv6:2001:470:683e::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id ED09065EBF; Wed, 21 Jun 2023 09:19:35 -0400 (EDT) Message-ID: <29beee7faf370ea892cb4e5a85ddd1f7ee132164.camel@xry111.site> Subject: Re: A question about prefetchw detection in "x86/asm: Cleanup prefetch primitives" From: Xi Ruoyao To: Borislav Petkov Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner Date: Wed, 21 Jun 2023 21:19:34 +0800 In-Reply-To: <20230621130955.GHZJL2o771lIEPURUl@fat_crate.local> References: <0b663d8f6802e8dbf443397718234bcb6d0811c8.camel@xry111.site> <20230621111346.GFZJLbavDw1JiLi34n@fat_crate.local> <20230621125749.GGZJLzzUw0rA3goV1X@fat_crate.local> <20230621130955.GHZJL2o771lIEPURUl@fat_crate.local> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.48.3 MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2023-06-21 at 15:09 +0200, Borislav Petkov wrote: > On Wed, Jun 21, 2023 at 09:06:51PM +0800, Xi Ruoyao wrote: > > I think it's not an issue in the kernel itself, but announcing > > 3dnowprefetch in /proc/cpuinfo for an old Intel CPU w/o real prefetchw > > implementation seems problematic (to me). >=20 > And this is a problem because? If a code generator parses /proc/cpuinfo for CPU capabilities, it may generates a no-op prefetchw instead of prefetcht0 as a fallback. >=20 > Think practically. >=20 --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University