Message ID | 20210321184529.59006-1-thomas_os@shipmail.org (mailing list archive) |
---|---|
Headers | show
Return-Path: <SRS0=4bbA=IT=kvack.org=owner-linux-mm@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 11233C433E0 for <linux-mm@archiver.kernel.org>; Sun, 21 Mar 2021 18:46:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7BAA061864 for <linux-mm@archiver.kernel.org>; Sun, 21 Mar 2021 18:46:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7BAA061864 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 5CDE16B0071; Sun, 21 Mar 2021 14:46:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 57B066B0073; Sun, 21 Mar 2021 14:46:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 380966B0074; Sun, 21 Mar 2021 14:46:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0199.hostedemail.com [216.40.44.199]) by kanga.kvack.org (Postfix) with ESMTP id E21EF6B0071 for <linux-mm@kvack.org>; Sun, 21 Mar 2021 14:46:15 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 92802180300FD for <linux-mm@kvack.org>; Sun, 21 Mar 2021 18:46:15 +0000 (UTC) X-FDA: 77944761510.15.D6B0B0E Received: from ste-pvt-msa2.bahnhof.se (ste-pvt-msa2.bahnhof.se [213.80.101.71]) by imf20.hostedemail.com (Postfix) with ESMTP id 8D9C5D5 for <linux-mm@kvack.org>; Sun, 21 Mar 2021 18:46:12 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTP id AA3483F63C; Sun, 21 Mar 2021 19:46:10 +0100 (CET) Authentication-Results: ste-pvt-msa2.bahnhof.se; dkim=pass (1024-bit key; unprotected) header.d=shipmail.org header.i=@shipmail.org header.b=RmWTAfau; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at bahnhof.se Authentication-Results: ste-ftg-msa2.bahnhof.se (amavisd-new); dkim=pass (1024-bit key) header.d=shipmail.org Received: from ste-pvt-msa2.bahnhof.se ([127.0.0.1]) by localhost (ste-ftg-msa2.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iRxq6b07VQNg; Sun, 21 Mar 2021 19:46:09 +0100 (CET) Received: by ste-pvt-msa2.bahnhof.se (Postfix) with ESMTPA id 535103FEC9; Sun, 21 Mar 2021 19:46:08 +0100 (CET) Received: from localhost.localdomain (2.70.38.73.mobile.tre.se [2.70.38.73]) by mail1.shipmail.org (Postfix) with ESMTPSA id 60178361E58; Sun, 21 Mar 2021 19:46:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1616352368; bh=tpeEGuLEfQbIt3oYJJ199Odz5KIao0YiVWQXjQK8Lz8=; h=From:To:Cc:Subject:Date:From; b=RmWTAfauY4F3Mp79+y8c8xmdXcwmIyMEawbzs1nWiS50q/d34+9fMyikQDrWwmL7r JQewrmix+tKc9qc01LwSAIazwqYJGlwnJ4hOQ5q5C7AkB9dAJN3Tm4HQ9qyX1TQ6rI +SrDCDkneIo5NT8q+PUBouUIxexKDxTFW7yihLuE= From: =?utf-8?q?Thomas_Hellstr=C3=B6m_=28Intel=29?= <thomas_os@shipmail.org> To: dri-devel@lists.freedesktop.org Cc: =?utf-8?q?Thomas_Hellstr=C3=B6m_=28Intel=29?= <thomas_os@shipmail.org>, Christian Koenig <christian.koenig@amd.com>, David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>, Andrew Morton <akpm@linux-foundation.org>, Jason Gunthorpe <jgg@nvidia.com>, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH 0/2] mm,drm/ttm: Always block GUP to TTM pages Date: Sun, 21 Mar 2021 19:45:27 +0100 Message-Id: <20210321184529.59006-1-thomas_os@shipmail.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Stat-Signature: 1g1mturum8ng8b3rksy8u6rhpcg7twha X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 8D9C5D5 Received-SPF: none (shipmail.org>: No applicable sender policy available) receiver=imf20; identity=mailfrom; envelope-from="<thomas_os@shipmail.org>"; helo=ste-pvt-msa2.bahnhof.se; client-ip=213.80.101.71 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1616352372-704024 Content-Transfer-Encoding: quoted-printable 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: <linux-mm.kvack.org> |
Series |
mm,drm/ttm: Always block GUP to TTM pages
|
expand
|
get_user_pages() to TTM pages is uwanted since TTM assumes it owns the pages exclusively and / or sets up page-table mappings to io memory. The first patch make sures we stop fast gup to huge TTM pages using a trick with pmd_devmap() and pud_devmap() without a backing dev_pagemap. The second patch makes sure we block normal gup by setting VM_PFNMAP Cc: Christian Koenig <christian.koenig@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jason Gunthorpe <jgg@nvidia.com> Cc: linux-mm@kvack.org Cc: dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Thomas Hellström (Intel) <thomas_os@shipmail.org>