All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keith Busch <kbusch@kernel.org>
To: Eric Auger <eauger@redhat.com>
Cc: Keith Busch <kbusch@meta.com>,
	hch@lst.de, linux-nvme@lists.infradead.org,
	linux-block@vger.kernel.org, axboe@kernel.dk,
	Jeff Moyer <jmoyer@redhat.com>,
	Jerry Snitselaar <jsnitsel@redhat.com>
Subject: Re: [PATCHv5 1/2] block: accumulate memory segment gaps per bio
Date: Mon, 17 Aug 2026 09:04:11 -0600	[thread overview]
Message-ID: <aoMi6y2qsnRVembg@kbusch-mbp> (raw)
In-Reply-To: <1805eed3-90ec-4f62-9d71-e3f898a464ad@redhat.com>

On Mon, Aug 17, 2026 at 03:23:14PM +0200, Eric Auger wrote:
> >  
> > diff --git a/block/blk-mq-dma.c b/block/blk-mq-dma.c
> > index 449950029872a..94d3461b5bc8e 100644
> > --- a/block/blk-mq-dma.c
> > +++ b/block/blk-mq-dma.c
> > @@ -79,8 +79,7 @@ static bool blk_map_iter_next(struct request *req, struct blk_map_iter *iter,
> >  static inline bool blk_can_dma_map_iova(struct request *req,
> >  		struct device *dma_dev)
> >  {
> > -	return !((queue_virt_boundary(req->q) + 1) &
> > -		dma_get_merge_boundary(dma_dev));
> > +	return !(req_phys_gap_mask(req) & dma_get_merge_boundary(dma_dev));
> 
> I observe a regression on RHEL due to that change in
> blk_can_dma_map_iova() with a 64kB host. This also occurs with upstream
> (7.2-rc7).
> 
> For an NVME device blk_can_dma_map_iova() now returns trues while it did
> not before. And it seems it shouldn't because it then causes some errors
> on the dma_iova_link() path due to unaligned iova:
> 
> [ 4486.655564] iommu: unaligned: iova 0x14c34000 pa 0x000010764d790000
> size 0x1d0000 min_pagesz 0x10000
> 
> It occurs when launching a 4kB guest with virtio-blk.
> 
> I traced:
> nvme 0015:01:00.0: req_phys_gap_mask=0xffffffffffff0000,
> queue_virt_boundary+1=0x1, get_merge_boundary=0xffff

The first thing that looks odd to me here is the page offset in the iova
isn't reflected in the pa, so I think something in the construction
isn't setting it up the first vector correctly.

Thanks for the notice, I'm looking into it.


  reply	other threads:[~2026-08-17 15:04 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-14 15:04 [PATCHv5 0/2] block, nvme: removing virtual boundary mask reliance Keith Busch
2025-10-14 15:04 ` [PATCHv5 1/2] block: accumulate memory segment gaps per bio Keith Busch
2025-10-14 21:18   ` Martin K. Petersen
2025-10-15  4:08   ` Christoph Hellwig
2025-11-11  4:26   ` Matthew Wilcox
2025-11-11  4:50     ` Keith Busch
2025-11-11  7:14       ` Christoph Hellwig
2025-11-11  9:36         ` Yu Kuai
2025-11-11  9:39           ` Christoph Hellwig
2025-11-11 10:14             ` Yu Kuai
2025-11-11 13:25               ` Keith Busch
2025-11-11 13:40                 ` Christoph Hellwig
2025-11-11 13:54                   ` Keith Busch
2025-11-11 13:58                     ` Christoph Hellwig
2025-11-11 14:03                     ` Yu Kuai
2026-08-17 13:23   ` Eric Auger
2026-08-17 15:04     ` Keith Busch [this message]
2026-08-17 15:12       ` Eric Auger
2026-08-17 16:05         ` Keith Busch
2026-08-17 16:37           ` Eric Auger
2025-10-14 15:04 ` [PATCHv5 2/2] nvme: remove virtual boundary for sgl capable devices Keith Busch
2025-10-14 21:19   ` Martin K. Petersen
2025-11-07  1:03 ` [PATCHv5 0/2] block, nvme: removing virtual boundary mask reliance Keith Busch
2025-11-07  1:12   ` Jens Axboe
2025-11-07  1:12 ` Jens Axboe

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=aoMi6y2qsnRVembg@kbusch-mbp \
    --to=kbusch@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=eauger@redhat.com \
    --cc=hch@lst.de \
    --cc=jmoyer@redhat.com \
    --cc=jsnitsel@redhat.com \
    --cc=kbusch@meta.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-nvme@lists.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.