Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: Lorenzo Stoakes <ljs@kernel.org>
Cc: Matthew Wilcox <willy@infradead.org>,
	Peter Xu <peterx@redhat.com>, Alex Williamson <alex@shazbot.org>,
	Anthony Pighin <anthony.pighin@nokia.com>,
	linux-kernel@vger.kernel.org,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	kvm@vger.kernel.org, linux-mm@kvack.org,
	"Liam R. Howlett" <liam@infradead.org>,
	Ryan Roberts <ryan.roberts@arm.com>
Subject: Re: [PATCH] vfio: Request THP-aligned mmap for device fds
Date: Fri, 19 Jun 2026 10:16:58 -0300	[thread overview]
Message-ID: <20260619131658.GA1068655@ziepe.ca> (raw)
In-Reply-To: <ajQRY7tHShCEz8vg@lucifer>

On Thu, Jun 18, 2026 at 04:56:06PM +0100, Lorenzo Stoakes wrote:
> > > What you're saying is that offset 0 of the opened file might correspond
> > > to a PFN that is not aligned in any way?  I had assumed that when trying
> > > to do the mapping of (2MB+4KiB to 64MB), that the offset specified to
> > > mmap was 2MB+4KiB.  But you seem to be saying that the offset in that
> > > case would be 0 and someone needs to know that it corresponds to a PFN
> > > that is misaligned?
> >
> > I do expect that the pgoff space is usually aligned to the pfn space,
> > most drivers do that or could be improved to do that. There will be
> > some off cases, but maybe we don't care, and VFIO should be fine.
> 
> Some stuff has weird assumptions about pfn=0 at start of the range (DMA for
> instance).

Do you have a pointer? I'm drawing a blank what "dma" is?

Jason


  reply	other threads:[~2026-06-19 13:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260616180129.160016-1-anthony.pighin@nokia.com>
     [not found] ` <20260616163054.77fdb61a@shazbot.org>
     [not found]   ` <ajKtdCN0AlbmBnAj@x1.local>
2026-06-17 18:34     ` [PATCH] vfio: Request THP-aligned mmap for device fds Matthew Wilcox
2026-06-17 19:29       ` Jason Gunthorpe
2026-06-18 14:55         ` Lorenzo Stoakes
2026-06-18 15:04           ` Matthew Wilcox
2026-06-18 15:30             ` Jason Gunthorpe
2026-06-18 15:56               ` Lorenzo Stoakes
2026-06-19 13:16                 ` Jason Gunthorpe [this message]
2026-06-18 15:28           ` Jason Gunthorpe
2026-06-19 16:11             ` Matthew Wilcox
2026-06-19 17:07               ` Jason Gunthorpe
2026-06-19 15:04           ` Ryan Roberts

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=20260619131658.GA1068655@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=alex@shazbot.org \
    --cc=anthony.pighin@nokia.com \
    --cc=kvm@vger.kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=peterx@redhat.com \
    --cc=ryan.roberts@arm.com \
    --cc=wangkefeng.wang@huawei.com \
    --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