Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp9409564rwd; Wed, 21 Jun 2023 07:09:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4z8MOf2NwOgObzGMaUBQLisSJ/CS5Kn30tjBNysZyiJv+VAm4RjJL12FDQ0BDysVvxjeHs X-Received: by 2002:a05:6a20:3c86:b0:10b:bf2d:71bb with SMTP id b6-20020a056a203c8600b0010bbf2d71bbmr23305379pzj.27.1687356553062; Wed, 21 Jun 2023 07:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687356553; cv=none; d=google.com; s=arc-20160816; b=usj3u4SiZXOFAUOG0dNwfbcIIgMH5iL40XG+Ieq0y/CSu3D5CjaBun5et2EX2k6LyV RWA58et3N+3WhxdQYTtAEnjqZDqrEgfEkfO60w8omKb+nPgi4lfL+S0Qmd0NAjkdHeFh q2aHSOiiBB6zMNE5QV4n6LapGGtJQyrZAuwiJjRgo7kTqYvSdX2yjx1bXicM78TAcT7I DOX5EaQxNymyID6bRVTOdNp/joumS5bPtzutHme1Pgh/8ceU3UKV1KvDG09WcBoewSuv f9zgtxdTsOvfxFOjX6ydgOAMneL1+PceWbYTmwOO2hRgBfJPvK/Ts67cKPBYZFeRwvfK Eq4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=LQOl8EAvZf2t7v8QGzZNCmzghAFI3inwdZcRnjQh6G8=; b=WRotud6YmFgDnOOmxMMjSRFtidO0MG0cDCLxJtb1updNZ4TYuTCzQee1dPLMSsDhcK mYEIzbz1eATgpO5XLcCedFNAKrAcManqZ1mc3z+LgI2nDrcupX+DO2R7c5xJIE8kAUsc +a1ZnaYME182FdCIXf+g+tiM/KdJol24gbL9X3vITQfsNnrzgkmtKwjt0jKDxFMML8yO D01Ro85cy6UQsxY5g5IWqRZGaV0meSTjJqlduGB6e75sUFAejg4FkU6B/y8A/gFpY0DH hUKxZNYB5cS8s+HMbY0Oz0dbiQOE0POotUNt6G92GnnHh9ZKcLLguTBByJUTljHSkW8k /3zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=UE14miEp; dkim=pass header.i=@alien8.de header.s=alien8 header.b=EoYx2Imm; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q21-20020a638c55000000b0054f93b05b51si4171182pgn.96.2023.06.21.07.08.59; Wed, 21 Jun 2023 07:09:13 -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=@alien8.de header.s=dkim header.b=UE14miEp; dkim=pass header.i=@alien8.de header.s=alien8 header.b=EoYx2Imm; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229699AbjFUNrC (ORCPT + 99 others); Wed, 21 Jun 2023 09:47:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231437AbjFUNrA (ORCPT ); Wed, 21 Jun 2023 09:47:00 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A99361981 for ; Wed, 21 Jun 2023 06:46:58 -0700 (PDT) Received: from mail.alien8.de (mail.alien8.de [IPv6:2a01:4f9:3051:3f93::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 2586E1EC0102; Wed, 21 Jun 2023 15:46:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1687355217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=LQOl8EAvZf2t7v8QGzZNCmzghAFI3inwdZcRnjQh6G8=; b=UE14miEpQ4XPeDvm9F39bMveLpk8Klz0wYLtFd6rBHGQdsNpUiRYF/tkXjCunD9AjIPK9w 6OXrsSv5TRB43SEsN/3TSQ6YtLo6q/5J6VVYG1aMIWCaz2Byokhq66MObEZbqMIm0en3B4 9IuHX+TJ3I6Rf/juLEFaU4BV79IW7YY= X-Virus-Scanned: Debian amavisd-new at mail.alien8.de Authentication-Results: mail.alien8.de (amavisd-new); dkim=pass (4096-bit key) header.d=alien8.de Received: from mail.alien8.de ([127.0.0.1]) by localhost (mail.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 4vGi0cOYMiPG; Wed, 21 Jun 2023 13:46:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=alien8; t=1687355214; bh=LQOl8EAvZf2t7v8QGzZNCmzghAFI3inwdZcRnjQh6G8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EoYx2ImmiwReU3QRsZnMaGuXF+JmIOpBZuEZ8X19rp+oaRnifScV7l4abMfyyX9uA qsYUMuvytP7AORy4asJvIqjQhbbKlhVELDYej6dwXDwVwXidYdDCFT4mf4eEwLGqdq 0lAj8YEkWJ09v3jDQNxwB+RrHH5pZyKFr7Awu1+Kfj4Z+x+4elshJMtyEzdEnnngAk yU5iNm7Ozjfee6TWDxruxTGdXsRrTnLFtIALTDIjNVyBzDRR2xetM4UahOBcfZdqeW avMZ+EtXY0Tarsq7f07c+5aBTEJ4y+eI9KJJtvoBS059Nj/75N69B/nG5UNDLRKws7 Pxdk2R6I45PXVl5we62msYWMLfcN1aWTnAqWFus90Q9DlnZ1FFliFKJziUHj5SKv0F 0OotfICxUnJdudwn47wEBXQpA2k3pXj+WlkTKD2T/tZGXvYJ9+MbU9S3FJl6ZgG7dA ZMjKXkQ3e/2katfTb038XT0DQK5cMkB8WwP5TIfVEjc/5pll6sAPUPuOIDhcUliX9+ jXM5/FPpATVMLelgtzBYl9KhfyfX58cwNF6hyopzsz8BfC/IblceiPZuayHhaFrorC RdMRORnV/CiJWmPicQXlwBBmK3QjF7Pc36+eJqOxlcudEHuoCgWsA6cR8xeWCEqli9 Lc7kbhANNS57im3VgwpsjmUQ= Received: from zn.tnic (p200300ea971dc565329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:971d:c565:329c:23ff:fea6:a903]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail.alien8.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 0219040E0145; Wed, 21 Jun 2023 13:46:49 +0000 (UTC) Date: Wed, 21 Jun 2023 15:46:45 +0200 From: Borislav Petkov To: Xi Ruoyao Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Thomas Gleixner Subject: Re: A question about prefetchw detection in "x86/asm: Cleanup prefetch primitives" Message-ID: <20230621134645.GIZJL/Rf1IdeLMQGl2@fat_crate.local> References: <0b663d8f6802e8dbf443397718234bcb6d0811c8.camel@xry111.site> <20230621111346.GFZJLbavDw1JiLi34n@fat_crate.local> <20230621125749.GGZJLzzUw0rA3goV1X@fat_crate.local> <20230621130955.GHZJL2o771lIEPURUl@fat_crate.local> <29beee7faf370ea892cb4e5a85ddd1f7ee132164.camel@xry111.site> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <29beee7faf370ea892cb4e5a85ddd1f7ee132164.camel@xry111.site> 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_NONE,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, Jun 21, 2023 at 09:19:34PM +0800, Xi Ruoyao wrote: > 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). > > > > 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. Err, go back. That code snippet you pasted, did you see where that comes from? A function called init_amd(). Now, is Intel hardware and SDM PREFETCHW text at all relevant here? -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette