From patchwork Fri Aug 21 08:50:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 11728641 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E4A9C722 for ; Fri, 21 Aug 2020 08:50:41 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id BC1CE208DB for ; Fri, 21 Aug 2020 08:50:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BC1CE208DB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=chris-wilson.co.uk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0EC3D8D000D; Fri, 21 Aug 2020 04:50:41 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 09D7D8D0005; Fri, 21 Aug 2020 04:50:41 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id EAB7A8D000D; Fri, 21 Aug 2020 04:50:40 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0196.hostedemail.com [216.40.44.196]) by kanga.kvack.org (Postfix) with ESMTP id CFA708D0005 for ; Fri, 21 Aug 2020 04:50:40 -0400 (EDT) Received: from smtpin24.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 9C1F0181AEF10 for ; Fri, 21 Aug 2020 08:50:40 +0000 (UTC) X-FDA: 77173955040.24.lamp24_500e25d27037 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin24.hostedemail.com (Postfix) with ESMTP id 747671A4A5 for ; Fri, 21 Aug 2020 08:50:40 +0000 (UTC) X-Spam-Summary: 1,0,0,201340800c9eeddd,d41d8cd98f00b204,chris@chris-wilson.co.uk,,RULES_HIT:41:355:379:541:800:960:966:973:988:989:1260:1311:1314:1345:1359:1431:1437:1515:1534:1541:1711:1730:1747:1777:1792:2196:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3867:3871:4250:4321:4385:5007:6261:7901:10004:11026:11657:11658:11914:12043:12297:12555:12679:12895:13069:13221:13229:13311:13357:13894:14096:14181:14384:14394:14571:14721:21080:21451:21627:30054:30064:30070,0,RBL:77.68.26.236:@chris-wilson.co.uk:.lbl8.mailshell.net-62.8.15.100 64.201.201.201;04ygc64xpf6atx5hq8jhozij3t4odypbx4jp7hubrddguy6igc1fbmkeafq6myr.8p4ff6zwti5j3fayhkk6htytuskw8wgdjdssobq8co7yithh3ghehngk5b4tr1i.q-lbl8.mailshell.net-223.238.255.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:24,LUA_SUMMARY:none X-HE-Tag: lamp24_500e25d27037 X-Filterd-Recvd-Size: 2654 Received: from fireflyinternet.com (unknown [77.68.26.236]) by imf01.hostedemail.com (Postfix) with ESMTP for ; Fri, 21 Aug 2020 08:50:39 +0000 (UTC) X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Received: from build.alporthouse.com (unverified [78.156.65.138]) by fireflyinternet.com (Firefly Internet (M1)) with ESMTP id 22195098-1500050 for multiple; Fri, 21 Aug 2020 09:50:15 +0100 From: Chris Wilson To: linux-kernel@vger.kernel.org, intel-gfx@lists.freedesktop.org Cc: linux-mm@kvack.org, Chris Wilson , Pavel Machek , Andrew Morton , Joerg Roedel , Linus Torvalds , Dave Airlie , Joonas Lahtinen , Rodrigo Vivi , stable@vger.kernel.org Subject: [PATCH 2/4] drm/i915/gem: Sync the vmap PTEs upon construction Date: Fri, 21 Aug 2020 09:50:09 +0100 Message-Id: <20200821085011.28878-2-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200821085011.28878-1-chris@chris-wilson.co.uk> References: <20200821085011.28878-1-chris@chris-wilson.co.uk> MIME-Version: 1.0 X-Rspamd-Queue-Id: 747671A4A5 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam05 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Since synchronising the PTE after assignment is a manual step, use the newly exported interface to flush the PTE after assigning via alloc_vm_area(). Reported-by: Pavel Machek References: 2ba3e6947aed ("mm/vmalloc: track which page-table levels were modified") Signed-off-by: Chris Wilson Cc: Andrew Morton Cc: Joerg Roedel Cc: Linus Torvalds Cc: Dave Airlie Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Pavel Machek Cc: # v5.8+ --- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_pages.c b/drivers/gpu/drm/i915/gem/i915_gem_pages.c index 7050519c87a4..0fee67f34d74 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_pages.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_pages.c @@ -304,6 +304,7 @@ static void *i915_gem_object_map(struct drm_i915_gem_object *obj, for_each_sgt_daddr(addr, iter, sgt) **ptes++ = iomap_pte(iomap, addr, pgprot); } + flush_vm_area(area); if (mem != stack) kvfree(mem);