Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp974830rdg; Fri, 13 Oct 2023 06:53:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBN6J6AREBVu/oPuc2sqjg64mzWSSbbf/sfRIqNjPBffsHmkooO/I2kNQeWez46BLm0g1W X-Received: by 2002:a17:90a:1196:b0:262:f449:4497 with SMTP id e22-20020a17090a119600b00262f4494497mr25728978pja.2.1697205224067; Fri, 13 Oct 2023 06:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697205224; cv=none; d=google.com; s=arc-20160816; b=p4sQtjDPueabiXgmkkU6b/vlBnKTntXLdINtw3Ry6hKfGs77WOtRvkKLuCIncVHsqz 0SFO1k4dokrKcd5cPJODJwQZDAaglhRf1As6Ey9MLL7UjiROkUO/LWJvXuJgBHsWNNao ugz0w3SEmJLoW3EdVox4nLmbDBjrWv22M8mvk014UIYBshEdjzw3mfTrBr1AKGJfSatD x/n3ailqLn23hZfdJeRf9M/bZ66z1MFvY2YfaGWjDKnPMHfeNhf2HVbh3LpfDEYnZBrq e4R788PdIIxGYHmK/tFsr8p754a9QahOxnzLoKMJew7frIaQGY8QM9EbGXqNAIoeTsLP 4sDw== 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:autocrypt:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=zLiVhUWkbt1ilUeTlDVchpw3bzizg8H91xvg/AI9Lqs=; fh=D6fQlISpfmXbTy7HXJFRYXkNw9DL3oF8KoP+AKmc9iA=; b=Y3zwXmbsA+k593Bec7tOzDZTiSDZR1JKdYjocZ6qFMoE4NuZeW2P0x4dVEuUEGgt0L yUbwdhd54vuQeyl7mxBDn3Qu9maVxtEOm0YA7Swiix+APm1axnAOIKAvpZyVHoj9CsDQ pfouzAWs+8/hD9FcNv6/8ggxyUXYDnrXJ6Ueq+V4R0evSbNl5I/5FKhRTPojwRF96FrD mVfjZUYjrV4cK36oMbGFeL4U8HcTlisONDGozNNyfRbX5Y0r4crqfz9dwrmsAxEquewA 9lxK2Iyv0VfhP+jPwHSP5TPiUvDef2MRQt9793Jb7p7t50gqS3pBVo3F2Zohs1xlXLVn 58oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=FSXItkua; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id s23-20020a632c17000000b005adec857fd3si554982pgs.523.2023.10.13.06.53.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 Oct 2023 06:53:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@xry111.site header.s=default header.b=FSXItkua; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=xry111.site Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 1259581A7D21; Fri, 13 Oct 2023 06:53:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231986AbjJMNxc (ORCPT + 99 others); Fri, 13 Oct 2023 09:53:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231963AbjJMNxb (ORCPT ); Fri, 13 Oct 2023 09:53:31 -0400 Received: from xry111.site (xry111.site [89.208.246.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB004BE for ; Fri, 13 Oct 2023 06:53:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1697205206; bh=3qcLRTnBJA6r9AgprapzBnGL8upTT05UMS6QH3ySA9A=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=FSXItkuadwHJ6d78M3BciIszukol1681GVS95q+cv/EV3dPOS0UKKpc/1+PpoZxl+ 8UDZUzsipey7Y+GcWgJZg75CgtWFPgxRt7gePhr7KgstPOftDX/jH91O76av5e2gBv vgDip6zG+VrhdePUuspXQhR+gO/EAwnmNR5cVBK4= Received: from [127.0.0.1] (unknown [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 D675766935; Fri, 13 Oct 2023 09:53:22 -0400 (EDT) Message-ID: <00d5150cadcb8b60004284ad43810adef52aab37.camel@xry111.site> Subject: Re: [PATCH v2] loongarch/mm: disable WUC for pgprot_writecombine as same as ioremap_wc From: Xi Ruoyao To: Sui Jingfeng , WANG Xuerui , Icenowy Zheng , Huacai Chen Cc: Andrew Morton , Weihao Li , "Mike Rapoport (IBM)" , Jun Yi , Baoquan He , "Matthew Wilcox (Oracle)" , David Hildenbrand , Hongchen Zhang , Binbin Zhou , Zhen Lei , Tiezhu Yang , Thomas Gleixner , Zhihong Dong , loongarch@lists.linux.dev, linux-kernel@vger.kernel.org Date: Fri, 13 Oct 2023 21:53:21 +0800 In-Reply-To: <049fbd3906b60f75be3900f20f6974967da374f3.camel@xry111.site> References: <20231009042841.635366-1-uwu@icenowy.me> <4f1af31b-15be-cb47-6b34-45de1b5696be@loongson.cn> <42b0e6f6-c2b5-49c6-b1f2-0200bef913da@xen0n.name> <3641d3fe-c2e7-868f-ab0d-3951c9a78b6d@loongson.cn> <8373ccfd93b0402caf9f5c06a2d9b93b3c0d0b49.camel@xry111.site> <73ddfc81-3f94-4403-8bb2-d537742a7042@loongson.cn> <049fbd3906b60f75be3900f20f6974967da374f3.camel@xry111.site> Autocrypt: addr=xry111@xry111.site; prefer-encrypt=mutual; keydata=mDMEYnkdPhYJKwYBBAHaRw8BAQdAsY+HvJs3EVKpwIu2gN89cQT/pnrbQtlvd6Yfq7egugi0HlhpIFJ1b3lhbyA8eHJ5MTExQHhyeTExMS5zaXRlPoiTBBMWCgA7FiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwMFCwkIBwICIgIGFQoJCAsCBBYCAwECHgcCF4AACgkQrKrSDhnnEOPHFgD8D9vUToTd1MF5bng9uPJq5y3DfpcxDp+LD3joA3U2TmwA/jZtN9xLH7CGDHeClKZK/ZYELotWfJsqRcthOIGjsdAPuDgEYnkdPhIKKwYBBAGXVQEFAQEHQG+HnNiPZseiBkzYBHwq/nN638o0NPwgYwH70wlKMZhRAwEIB4h4BBgWCgAgFiEEkdD1djAfkk197dzorKrSDhnnEOMFAmJ5HT4CGwwACgkQrKrSDhnnEOPjXgD/euD64cxwqDIqckUaisT3VCst11RcnO5iRHm6meNIwj0BALLmWplyi7beKrOlqKfuZtCLbiAPywGfCNg8LOTt4iMD Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.0 MIME-Version: 1.0 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 13 Oct 2023 06:53:41 -0700 (PDT) On Fri, 2023-10-13 at 21:15 +0800, Xi Ruoyao wrote: > Again, why this is only an issue with AMD or ATI GPUs? >=20 > Can you provide some detailed documentations about this hardware issue > so the community can help to figure out a solution? 3 years ago we had=C2=A0https://lkml.org/lkml/2020/8/10/255: In this case the patch is a clear NAK since you haven't root caused the issue and are just working around it in a very questionable manner. and But when the hardware doesn't correctly implement WC for PCIe BARs, then= =20 this is a violation of the PCIe spec and a bit more serious issue for= =20 the whole platform. So do we know the root cause now? Or in all the 3 years we just keep carrying a problematic workaround downstream, burying the head into the sand like an ostrich, and self comforting with "oh they don't understand our hardware"?! Even if the problem is really "they don't understand our hardware" you need to provide some materials to help people understanding the hardware better. If we cannot figure out the root cause or a proper fix is too difficult, we should *at least* have a cmdline option and/or a configuration option to allow the user to decide, like how we treat these spectre-like bugs. "Should the option be enabled or disabled by default" can be debated later. And please try to fix the hardware, to me it will be a compelling reason to pay some money for an upgrade :). --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University