Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp559502ybl; Thu, 12 Dec 2019 00:49:39 -0800 (PST) X-Google-Smtp-Source: APXvYqxQVG3DNr9zMUTWKnMdvF+GKq3CD9W25pHmMYYtzZY5tiJ//vdLL9pnotV38MygOHa9KShy X-Received: by 2002:a05:6830:603:: with SMTP id w3mr6878885oti.217.1576140579805; Thu, 12 Dec 2019 00:49:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576140579; cv=none; d=google.com; s=arc-20160816; b=PwH7m+shRUBujQovyaqA6pCPfw9SqE/9dme2UGKpii1rcVHzrxpIqhmKpKCFghOzjK Bzm9LTzUdJEkTER4XL6iURFhE9jUBJtojQGVTtAryCfwahiNYkVngvsuViXqbut68tlo y/ukcdWlsqxuWKXYAG60x1bfhrOHPXxKAAq09QW2K9CA7Ry1I3zhm4VPTL6juvV/auPS EtD1oHHysygLbaSJFUOQh8k68qtE58fOmZ9atlSsstvlbd4hHMgjrE034bBbscqfqlHd voaL2iHl9TdZ17YNoDRtOjuF+EknkSjng25+9OGUKXQSnIBnjzelqbmM1ohknp1EDIZr U9LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=0I/9MqFt8D/t9ONXDlT+kno6cnX3QUDEWgT5uL53Hw0=; b=IkHsqUacxm5k/ozxY6sSSPCENxkow03EFYP2CVFHzLmFOQT2zd6eLBhaLshDkQIIQB X5KDhUo3V3hQcShLhbOfy8LRB8oA8sXglKAIn1b6s30QmtPYQCQuEqT0MJsskTr/mA6m UJKzaNKboDIXPKK+7ljrou032/TkPlBHVnKM0rM+R0SsonzZQcluUMvQ26n7l86m3EM2 kFbwMR9ptdAdy7U4Lm92FAzS2CLIkc4KqEDQrZiQdlYYGW+Vwagl44cCGVlhbVPfi7z+ QEXYi6SXsLov8y9CDg1nqxcrh/JzbY0pc7yXcu1jcgS4mID++zcE48FmMk0k4j3DKPlz qfRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@shipmail.org header.s=mail header.b=Mc3PJome; 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 f7si2615322otp.6.2019.12.12.00.49.24; Thu, 12 Dec 2019 00:49:39 -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 (test mode) header.i=@shipmail.org header.s=mail header.b=Mc3PJome; 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 S1728272AbfLLIr6 (ORCPT + 99 others); Thu, 12 Dec 2019 03:47:58 -0500 Received: from pio-pvt-msa1.bahnhof.se ([79.136.2.40]:35924 "EHLO pio-pvt-msa1.bahnhof.se" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728211AbfLLIr6 (ORCPT ); Thu, 12 Dec 2019 03:47:58 -0500 Received: from localhost (localhost [127.0.0.1]) by pio-pvt-msa1.bahnhof.se (Postfix) with ESMTP id C884A3F6CD; Thu, 12 Dec 2019 09:47:55 +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="Mc3PJome"; 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-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 aCEnIeV4ScUj; Thu, 12 Dec 2019 09:47:54 +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 4C2F03F6B7; Thu, 12 Dec 2019 09:47:51 +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 58B18360058; Thu, 12 Dec 2019 09:47:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=shipmail.org; s=mail; t=1576140471; bh=WCmaxQxE246ATYHNdSLCAZVTtLU+QzBOONzmhrSKgp0=; h=From:To:Cc:Subject:Date:From; b=Mc3PJomeKXRmiQW2ddGpYTi4r2bfKnJZSb0lSqs86LaVAhtgwqyw5BzrMf24Zjx0/ zQxrf9pKLMxenmVrFb80rXG2yDDfbEab4Mkkk7Afubluix7y+yewt0D1IhZZu4l8rR 1Ur3y9pp02CROTOoc2iOk0Yb3Eu+JsbjPVvkaODQ= 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 v4 0/2] mm, drm/ttm: Fix pte insertion with customized protection Date: Thu, 12 Dec 2019 09:47:39 +0100 Message-Id: <20191212084741.9251-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. 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) 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