From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no 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 D5D8CC432C0 for ; Tue, 3 Dec 2019 10:49:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AD1D7206DF for ; Tue, 3 Dec 2019 10:49:15 +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="YDgmWrLH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726074AbfLCKtO (ORCPT ); Tue, 3 Dec 2019 05:49:14 -0500 Received: from pio-pvt-msa1.bahnhof.se ([79.136.2.40]:41522 "EHLO pio-pvt-msa1.bahnhof.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725957AbfLCKtM (ORCPT ); Tue, 3 Dec 2019 05:49:12 -0500 Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTP id 6BD9B3F54F; Tue, 3 Dec 2019 11:49:10 +0100 (CET) Authentication-Results: pio-pvt-msa1.bahnhof.se; dkim=pass (1024-bit key; unprotected) header.d=shipmail.org header.i=@shipmail.org header.b="YDgmWrLH"; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at bahnhof.se Received: from pio-pvt-msa1.bahnhof.se ([127.0.0.1]) by localhost (pio-pvt-msa1.bahnhof.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OjqnXakQPOto; Tue, 3 Dec 2019 11:49:09 +0100 (CET) Received: from mail1.shipmail.org (h-205-35.A357.priv.bahnhof.se [155.4.205.35]) (Authenticated sender: mb878879) by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTPA id D6A713F522; Tue, 3 Dec 2019 11:49:05 +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 264A1360305; Tue, 3 Dec 2019 11:49:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1575370145; bh=gEAWX3bxsQ+0DHZpNEnqkkzzmaYw0NCL+IkRobqSyPI=; h=From:To:Cc:Subject:Date:From; b=YDgmWrLHazoWCTxOBvFDT6YYiOt3VqND08Ox4WddOwx8Zs1Hm+7/ziYe9GwwG2Kks PYN3/eYXPiW2jeRKgEBgtcErKrMUiGw07ZmWnz6q289jJ862I863onkb6m/31nuKi6 V7eo6l9g14JJKrszmFt4WXw3FbA9NYdJCZRSHldw= From: =?UTF-8?q?Thomas=20Hellstr=C3=B6m=20=28VMware=29?= To: linux-mm@kvack.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Cc: pv-drivers@vmware.com, linux-graphics-maintainer@vmware.com, Thomas Hellstrom , Andrew Morton , Michal Hocko , "Matthew Wilcox (Oracle)" , "Kirill A. Shutemov" , Ralph Campbell , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , =?UTF-8?q?Christian=20K=C3=B6nig?= Subject: [PATCH v2 0/2] mm, drm/ttm: Fix pte insertion with customized protection Date: Tue, 3 Dec 2019 11:48:51 +0100 Message-Id: <20191203104853.4378-1-thomas_os@shipmail.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. I'd like to merge this through a drm tree. Changes since v1: *) Formatting fixes in patch 1 *) Updated commit message of patch 2. Thomas Hellstrom (2): mm: Add and export vmf_insert_mixed_prot() drm/ttm: Fix vm page protection handling drivers/gpu/drm/ttm/ttm_bo_vm.c | 14 +++++++------- include/linux/mm.h | 2 ++ mm/memory.c | 15 +++++++++++---- 3 files changed, 20 insertions(+), 11 deletions(-) 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" -- 2.21.0