From patchwork Wed Jan 15 12:41:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_Hellstr=C3=B6m_=28Intel=29?= X-Patchwork-Id: 11334205 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 7916513B4 for ; Wed, 15 Jan 2020 12:41:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 45CDD22522 for ; Wed, 15 Jan 2020 12:41:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=shipmail.org header.i=@shipmail.org header.b="KXnyIQFV" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45CDD22522 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=shipmail.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7197D8E0009; Wed, 15 Jan 2020 07:41:26 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6A3CC8E0003; Wed, 15 Jan 2020 07:41:26 -0500 (EST) 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 572D38E0009; Wed, 15 Jan 2020 07:41:26 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0033.hostedemail.com [216.40.44.33]) by kanga.kvack.org (Postfix) with ESMTP id 383978E0003 for ; Wed, 15 Jan 2020 07:41:26 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id F11C38248047 for ; Wed, 15 Jan 2020 12:41:25 +0000 (UTC) X-FDA: 76379829330.20.glass84_c3c573c0dd5a X-Spam-Summary: 2,0,0,63322ab43e7eeee7,d41d8cd98f00b204,thomas_os@shipmail.org,::linux-kernel@vger.kernel.org:dri-devel@lists.freedesktop.org:linux-graphics-maintainer@vmware.com:thellstrom@vmware.com:akpm@linux-foundation.org:mhocko@suse.com:willy@infradead.org:kirill.shutemov@linux.intel.com:rcampbell@nvidia.com:jglisse@redhat.com:christian.koenig@amd.com,RULES_HIT:41:152:355:379:541:800:960:973:988:989:1260:1261:1277:1311:1313:1314:1345:1431:1437:1515:1516:1518:1534:1541:1593:1594:1676:1711:1730:1747:1777:1792:2194:2199:2393:2559:2562:2895:2897:3138:3139:3140:3141:3142:3352:3865:3866:3867:3870:3871:3872:3874:5007:6119:6261:6653:7576:7903:10004:10400:11026:11658:11914:12043:12297:12438:12517:12519:12679:12895:13069:13095:13161:13229:13311:13357:13894:14181:14394:14659:14721:21080:21433:21451:21627:30054:30064:30079,0,RBL:79.136.2.42:@shipmail.org:.lbl8.mailshell.net-62.14.203.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:f p,MSBL:0 X-HE-Tag: glass84_c3c573c0dd5a X-Filterd-Recvd-Size: 4072 Received: from pio-pvt-msa3.bahnhof.se (pio-pvt-msa3.bahnhof.se [79.136.2.42]) by imf47.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Jan 2020 12:41:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa3.bahnhof.se (Postfix) with ESMTP id 80C953F580; Wed, 15 Jan 2020 13:41:22 +0100 (CET) Authentication-Results: pio-pvt-msa3.bahnhof.se; dkim=pass (1024-bit key; unprotected) header.d=shipmail.org header.i=@shipmail.org header.b=KXnyIQFV; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at bahnhof.se X-Spam-Flag: NO X-Spam-Score: -2.099 X-Spam-Level: X-Spam-Status: No, score=-2.099 tagged_above=-999 required=6.31 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no Received: from pio-pvt-msa3.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa3.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FkalIzvwkN6R; Wed, 15 Jan 2020 13:41:19 +0100 (CET) Received: from mail1.shipmail.org (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) (Authenticated sender: mb878879) by pio-pvt-msa3.bahnhof.se (Postfix) with ESMTPA id EE0D23F57C; Wed, 15 Jan 2020 13:41:17 +0100 (CET) Received: from localhost.localdomain.localdomain (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) by mail1.shipmail.org (Postfix) with ESMTPSA id 26BC8360315; Wed, 15 Jan 2020 13:41:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1579092077; bh=GiTFW6X2twKG29NhsaA6D/1fvW6BZJTV6SkcljMbP24=; h=From:To:Cc:Subject:Date:From; b=KXnyIQFV7pe+g2TkxE9Lz4eksNtJkSUKeRGH4zMQ9ALfzGJCbUS24TlxP0e4aHh2G RVOsfCJjpDSh0+OBthv2E+hGrt5UuJGXvifbtpxH6QGr/9Up3cJ+4w9S7Vi+SbK+oy /yT1Fl77gDFqahmWtnfwCxwaYVphQEvc9b40bLlU= From: =?utf-8?q?Thomas_Hellstr=C3=B6m_=28VMware=29?= To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: linux-graphics-maintainer@vmware.com, Thomas Hellstrom , Andrew Morton , Michal Hocko , "Matthew Wilcox (Oracle)" , "Kirill A. Shutemov" , Ralph Campbell , =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= , =?utf-8?q?Christian_?= =?utf-8?q?K=C3=B6nig?= Subject: [PATCH v5 0/2] mm, drm/ttm: Fix pte insertion with customized protection Date: Wed, 15 Jan 2020 13:41:05 +0100 Message-Id: <20200115124107.3845-1-thomas_os@shipmail.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 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: From: Thomas Hellstrom The drm/ttm module is using a modified on-stack copy of the struct vm_area_struct to be able to set a page protection with customized caching. Fix that by adding a vmf_insert_mixed_prot() function similar to the existing vmf_insert_pfn_prot() for use with drm/ttm. Patches are acked to be merged through a drm tree. Changes since v1: *) Formatting fixes in patch 1 *) Updated commit message of patch 2. Changes since v2: *) Moved vmf_insert_mixed_prot() export to patch 2 (Michal Hocko) *) Documented under which conditions it's safe to use a page protection different from struct vm_area_struct::vm_page_prot. (Michal Hocko) Changes since v3: *) More documentation regarding under which conditions it's safe to use a page protection different from struct vm_area_struct::vm_page_prot. This time also in core vm. (Michal Hocko) Changes since v4: *) Fixed a typo *) Added acks. Cc: Andrew Morton Cc: Michal Hocko Cc: "Matthew Wilcox (Oracle)" Cc: "Kirill A. Shutemov" Cc: Ralph Campbell Cc: "Jérôme Glisse" Cc: "Christian König"