Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3788138imu; Fri, 30 Nov 2018 06:07:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/U/O7pCaY/WkPZxJpCo/ccC/2PMDLt7SfPYjanx780yM4mp51PSE4wcnN8BllxgtH8+0MPK X-Received: by 2002:a17:902:aa8c:: with SMTP id d12mr5907339plr.25.1543586861000; Fri, 30 Nov 2018 06:07:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543586860; cv=none; d=google.com; s=arc-20160816; b=kaOX7M9gAJLgBC6IadKPnGam2X7t2UGNzKgqs6YlPAXPsu21HyxumATgBFYnc23OGi u6frZtgZjPhTdTuT3AZsQOl8u0Q4ZHpDoxcDsc+O+1pJgV2TQWUD5ni3ETxBpdXVgcI1 YUAPmK5ip2GCcWajoGSMYNkoqtRGD1fc0MLqJXZvpE89WTD5H3QCuQ7Q10zc1xht4A0u D0wKwcYPEKAgdbxe20SndGmXA+glrDZhOFQIlinnzS9nj7qxCjfWcRIsVUVvCXrtYU2B KhCMO4zc4YSuddRcj42TC32hldy1+jYzE8DIOvv8e6TvqVxSceOqvDc/CLxNg1mlYa6m Xr9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:cc:to:from:date:user-agent :message-id:dkim-signature; bh=2+/eZdjUG8kcHi3yO+CnTE1ws8GVzsX1ltlfZu+KFSo=; b=Y1uIQ93cNnCjJXtJM89Ondd2cEb9DEYhGYq/S2p5E8G/pJ+EIPXGyGFeLTxZ8uYht4 THlZMBvpYeONHw3KZARN0Ad0QtrPDTElT+x56kacIOzXthLJm6iVVEXLkr2bDsTb65kF 3XryWqqTbw0YEsV0k2NXsZE6vTPHxLYEjkY1/FJ2oKt99nIbvUiHO/kLhj96jPi9VYEV Lyf5c2DHrr0hfihh7HkpsBK8BPakfQ6Y/5vGbDWhOAkBYnqkrGo4NWJT7qtKlEvEZgp1 i9ApKuBzT2YP8P7r2ZRI3re6aFxdpSIPyNM0QQhJ2KAX75alPoXCi/h2XKyN6R4wZaDX 8fQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="A/KwvVM+"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ce19si6115866plb.13.2018.11.30.06.07.23; Fri, 30 Nov 2018 06:07:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="A/KwvVM+"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727047AbeLABP4 (ORCPT + 99 others); Fri, 30 Nov 2018 20:15:56 -0500 Received: from merlin.infradead.org ([205.233.59.134]:34874 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726987AbeLABPx (ORCPT ); Fri, 30 Nov 2018 20:15:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Subject:Cc:To:From:Date:Message-Id: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=2+/eZdjUG8kcHi3yO+CnTE1ws8GVzsX1ltlfZu+KFSo=; b=A/KwvVM+MNJ7bqvpERetsjHpb 07FBu8n79QFYS0mM6rwQGnsfOSucxr80U0B8RjWZC789rktgh+uExFYHoZP23qP0jBtYmmYyodw/c 9J74Oo1cctkHlT11R2bPnyFo+DZa+Dd3Pxwa3xOHJp0u2Lj7tjJvLjJFysme18uFbip/GJgw2UYph c8JkzjhBMDdn5okn8FTIp/K2+fki6q/98IrANfPswiBhW0Fc9YVnYlBZ79RkBy3a4xuzesb2VmotT N1MZ4fdmZ+NcpnApn6r/pfjOtgFTNPUqSm8rCKYuFS9WxBMf2jhI4w98L9BEFrcuPYVR6Wkj5r4zw qOgRIaDLA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gSjQv-0003vB-Tr; Fri, 30 Nov 2018 14:06:18 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 0) id 5DA052029FD58; Fri, 30 Nov 2018 15:06:14 +0100 (CET) Message-Id: <20181130134455.490139778@infradead.org> User-Agent: quilt/0.65 Date: Fri, 30 Nov 2018 14:44:55 +0100 From: Peter Zijlstra To: dave.hansen@intel.com, luto@kernel.org, peterz@infradead.org Cc: x86@kernel.org, Tom.StDenis@amd.com, linux-kernel@vger.kernel.org Subject: [PATCH 0/4] x86/mm/cpa: Fix cpa-array TLB invalidation Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Yesterday Tom reported a CPA bug triggered by the AMDGPU team. It turns out that with commit: a7295fd53c39 ("x86/mm/cpa: Use flush_tlb_kernel_range()") I misread the cpa array code and messed up the TLB invalidations for it. These patches (hopefully) fix the issue while also shrinking the CPA code again. Tom, would you be so kind as to test again? These patches are significantly different from what I send you yesterday. --- arch/x86/mm/mm_internal.h | 2 + arch/x86/mm/pageattr.c | 167 ++++++++++++++++++++-------------------------- arch/x86/mm/tlb.c | 4 +- 3 files changed, 79 insertions(+), 94 deletions(-)