[PATCH 3/6] PCI/P2PDMA: create VMA without page_mkwrite() operator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The P2PDMA code does not need (or want) a page_mkwrite() operator on its
VMA.

Furthermore, having the page_mkwrite() operator causes
writable_file_mapping_allowed() to fail due to
vma_needs_dirty_tracking() on the gup flow, which is a pre-requisite for
enabling P2PDMA with FOLL_LONGTERM use cases.

Co-developed-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>
Signed-off-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>
Signed-off-by: Martin Oliveira <martin.oliveira@xxxxxxxxxxxxx>
---
 drivers/pci/p2pdma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
index 4f47a13cb500..ac07053abfea 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -171,6 +171,7 @@ static struct bin_attribute p2pmem_alloc_attr = {
 	 * to be very large.
 	 */
 	.size = SZ_1T,
+	.mmap_allocates = true,
 };
 
 static struct attribute *p2pmem_attrs[] = {
-- 
2.34.1





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux