linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: "Thomas Hellström (VMware)" <thomas_os@shipmail.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	dri-devel@vmware.com, pv-drivers@vmware.com,
	linux-graphics-maintainer@vmware.com,
	"Thomas Hellstrom" <thellstrom@vmware.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Michal Hocko" <mhocko@suse.com>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>,
	"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	"Ralph Campbell" <rcampbell@nvidia.com>,
	"Jérôme Glisse" <jglisse@redhat.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: Re: [PATCH 2/2] drm/ttm: Fix vm page protection handling
Date: Tue, 3 Dec 2019 12:55:02 +0300	[thread overview]
Message-ID: <20191203095502.hw3r33ioax2x4kvt@box> (raw)
In-Reply-To: <20191203075446.60197-3-thomas_os@shipmail.org>

On Tue, Dec 03, 2019 at 08:54:46AM +0100, Thomas Hellström (VMware) wrote:
> From: Thomas Hellstrom <thellstrom@vmware.com>
> 
> We were using an ugly hack to set the page protection correctly.
> Fix that and instead use vmf_insert_mixed_prot() and / or
> vmf_insert_pfn_prot().
> Also get the default page protection from
> struct vm_area_struct::vm_page_prot rather than using vm_get_page_prot().
> This way we catch modifications done by the vm system for drivers that
> want write-notification.

Hm. Why doesn't your VMA have the right prot flags in the first place? Why
do you need to override them? More context, please.

-- 
 Kirill A. Shutemov


  reply	other threads:[~2019-12-03  9:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03  7:54 [PATCH 0/2] mm, drm/ttm: Fix pte insertion with customized protection Thomas Hellström (VMware)
2019-12-03  7:54 ` [PATCH 1/2] mm: Add and export vmf_insert_mixed_prot() Thomas Hellström (VMware)
2019-12-03  7:54 ` [PATCH 2/2] drm/ttm: Fix vm page protection handling Thomas Hellström (VMware)
2019-12-03  9:55   ` Kirill A. Shutemov [this message]
2019-12-03  9:58     ` Christian König
2019-12-03 10:19       ` Thomas Hellström (VMware)
  -- strict thread matches above, loose matches on Subject: below --
2019-11-26 20:27 [PATCH 1/2] mm: Add and export vmf_insert_mixed_prot() Thomas Hellström (VMware)
2019-11-26 20:27 ` [PATCH 2/2] drm/ttm: Fix vm page protection handling Thomas Hellström (VMware)
2019-11-27  8:43   ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191203095502.hw3r33ioax2x4kvt@box \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@vmware.com \
    --cc=jglisse@redhat.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=pv-drivers@vmware.com \
    --cc=rcampbell@nvidia.com \
    --cc=thellstrom@vmware.com \
    --cc=thomas_os@shipmail.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).