Linux-mm Archive on lore.kernel.org
 help / color / Atom feed
From: "Christian König" <christian.koenig@amd.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>,
	"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>
Subject: Re: [PATCH 2/2] drm/ttm: Fix vm page protection handling
Date: Tue, 3 Dec 2019 10:58:09 +0100
Message-ID: <c1f35529-6e3c-2ba5-bd86-e7cc04cbc1b1@amd.com> (raw)
In-Reply-To: <20191203095502.hw3r33ioax2x4kvt@box>

Am 03.12.19 um 10:55 schrieb Kirill A. Shutemov:
> 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.

TTM allows for graphics buffer to move between system and IO memory. So 
the prot flags can change on the fly for a VMA.

Regards,
Christian.


  reply index

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
2019-12-03  9:58     ` Christian König [this message]
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 publically 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=c1f35529-6e3c-2ba5-bd86-e7cc04cbc1b1@amd.com \
    --to=christian.koenig@amd.com \
    --cc=akpm@linux-foundation.org \
    --cc=dri-devel@vmware.com \
    --cc=jglisse@redhat.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=kirill@shutemov.name \
    --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

Linux-mm Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-mm/0 linux-mm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-mm linux-mm/ https://lore.kernel.org/linux-mm \
		linux-mm@kvack.org
	public-inbox-index linux-mm

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kvack.linux-mm


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git