Archive-only list for patches
 help / color / mirror / Atom feed
From: Jacob Pan <jacob.pan@linux.microsoft.com>
To: Jean-Philippe Brucker <jean-philippe@linaro.org>
Cc: Jason Gunthorpe <jgg@nvidia.com>,
	iommu@lists.linux.dev, Joerg Roedel <joro@8bytes.org>,
	Robin Murphy <robin.murphy@arm.com>,
	virtualization@lists.linux.dev, Will Deacon <will@kernel.org>,
	Eric Auger <eric.auger@redhat.com>,
	patches@lists.linux.dev, jacob.pan@linux.microsoft.com
Subject: Re: [PATCH 0/5] Convert virtio-iommu to domain_alloc_paging()
Date: Wed, 12 Feb 2025 09:05:35 -0800	[thread overview]
Message-ID: <20250212090535.4973dbaf@DESKTOP-0403QTC.> (raw)
In-Reply-To: <20250212115845.GA1627174@myrica>

Hi Jean-Philippe,

On Wed, 12 Feb 2025 11:58:45 +0000
Jean-Philippe Brucker <jean-philippe@linaro.org> wrote:

> Hi Jacob,
> 
> On Tue, Feb 11, 2025 at 04:41:51PM -0800, Jacob Pan wrote:
> > > However, there seem to be some unrelated qemu bugs. 7.0.0 does not
> > > have working VIRTIO_IOMMU_F_BYPASS_CONFIG and neither qemu works
> > > with an IDENTITY domain using !VIRTIO_IOMMU_F_BYPASS_CONFIG. It
> > > prints:
> > > 
> > >  qemu-system-x86_64: iommu has granularity incompatible with
> > > target AS qemu-system-x86_64: iommu map to non memory area
> > > 80000000 qemu-system-x86_64: iommu map to non memory area c0000000
> > >  qemu-system-x86_64: iommu map to non memory area e0000000
> > >  qemu-system-x86_64: iommu map to non memory area f0000000
> > >  qemu-system-x86_64: iommu map to non memory area f8000000
> > >  qemu-system-x86_64: iommu map to non memory area fc000000
> > >  qemu-system-x86_64: iommu map to non memory area fe000000
> > >  qemu-system-x86_64: iommu map to non memory area fe800000
> > >  qemu-system-x86_64: iommu map to non memory area 0
> > >  qemu-system-x86_64: iommu map to non memory area fef00000
> > >  qemu-system-x86_64: iommu map to non memory area ff000000
> > >  qemu-system-x86_64: iommu has granularity incompatible with
> > > target AS qemu-system-x86_64: iommu map to non memory area
> > > 200000000 qemu-system-x86_64: iommu map to non memory area
> > > 400000000 qemu-system-x86_64: iommu map to non memory area
> > > 800000000 qemu-system-x86_64: iommu map to non memory area
> > > 1000000000 qemu-system-x86_64: iommu map to non memory area
> > > 2000000000 qemu-system-x86_64: iommu map to non memory area
> > > 4000000000  
> > 
> > I see the same on arm64 with v9.0, assigned an ixgbe nic via VFIO.
> > 
> > qemu-system-aarch64: iommu map to non memory area 0
> > qemu-system-aarch64: iommu map to non memory area 8100000
> > qemu-system-aarch64: iommu map to non memory area 8200000
> > qemu-system-aarch64: iommu map to non memory area 8400000
> > qemu-system-aarch64: iommu map to non memory area 8800000
> > qemu-system-aarch64: iommu map to non memory area 0
> > qemu-system-aarch64: iommu map to non memory area 0
> > qemu-system-aarch64: iommu map to non memory area c000000
> > qemu-system-aarch64: iommu map to non memory area 10000000
> > qemu-system-aarch64: iommu map to non memory area 20000000
> > qemu-system-aarch64: iommu has granularity incompatible with target
> > AS qemu-system-aarch64: iommu map to non memory area 200000000
> > qemu-system-aarch64: iommu map to non memory area 400000000
> > qemu-system-aarch64: iommu map to non memory area 800000000
> > qemu-system-aarch64: iommu map to non memory area 1000000000
> > qemu-system-aarch64: iommu map to non memory area 2000000000
> > qemu-system-aarch64: iommu map to non memory area 4000000000
> > qemu-system-aarch64: iommu map to non memory area 8000000000
> > qemu-system-aarch64: iommu map to non memory area 10000000000
> > qemu-system-aarch64: iommu map to non memory area 20000000000
> > qemu-system-aarch64: iommu map to non memory area 40000000000
> > qemu-system-aarch64: iommu map to non memory area 80000000000
> > qemu-system-aarch64: iommu map to non memory area 100000000000
> > qemu-system-aarch64: iommu map to non memory area 200000000000
> > qemu-system-aarch64: iommu map to non memory area 400000000000
> > qemu-system-aarch64: iommu map to non memory area 800000000000     
> 
> QEMU v9.0 and v9.1 have reached end of life. Do you also get this
> error with QEMU v9.2.x?
have not tried. will do.

> Are you running an arm64 guest on an x86 host with TCG, or arm64
> guest on arm64 host with KVM?
This is arm64 guest and host.

>  Does reproducing this require
> modifying QEMU or Linux to disable support for F_BYPASS_CONFIG, or
> just passing QEMU/kernel parameters?
I only modified guest code to pretend F_BYPASS_CONFIG is not supported,
 a couple of places like:

-       if (virtio_has_feature(viommu->vdev,
  VIRTIO_IOMMU_F_BYPASS_CONFIG)) {
+       if (!virtio_has_feature(viommu->vdev,
  VIRTIO_IOMMU_F_BYPASS_CONFIG)) {

Is there a QEMU command line option to disable
VIRTIO_IOMMU_F_BYPASS_CONFIG?



  reply	other threads:[~2025-02-12 17:05 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 14:46 [PATCH 0/5] Convert virtio-iommu to domain_alloc_paging() Jason Gunthorpe
2025-02-07 14:46 ` [PATCH 1/5] iommu/virtio: Break out bypass identity support into a global static Jason Gunthorpe
2025-02-12  0:43   ` Jacob Pan
2025-02-18 18:21     ` Jason Gunthorpe
2025-02-21 11:35   ` Jean-Philippe Brucker
2025-02-24 19:37     ` Jason Gunthorpe
2025-02-07 14:46 ` [PATCH 2/5] iommu: Add domain_alloc_identity() Jason Gunthorpe
2025-02-12 13:56   ` Robin Murphy
2025-02-12 14:03     ` Jason Gunthorpe
2025-02-12 14:16       ` Robin Murphy
2025-02-12 14:45         ` Jason Gunthorpe
2025-02-07 14:46 ` [PATCH 3/5] iommu/virtio: Move to domain_alloc_paging() Jason Gunthorpe
2025-02-12 19:22   ` Jacob Pan
2025-02-12 23:30     ` Jason Gunthorpe
2025-02-13  5:47       ` Jacob Pan
2025-02-18 20:01         ` Jason Gunthorpe
     [not found]       ` <67ad876d.170a0220.3c21dc.85ceSMTPIN_ADDED_BROKEN@mx.google.com>
2025-02-13  9:46         ` Jean-Philippe Brucker
2025-02-13 17:03           ` Yu Zhang
2025-02-13 18:09             ` Jean-Philippe Brucker
2025-02-19  9:39               ` Yu Zhang
2025-02-19 10:35                 ` Jean-Philippe Brucker
2025-02-19 11:11                   ` Yu Zhang
2025-02-19 11:57                     ` Jean-Philippe Brucker
2025-02-19 13:10                   ` Yi Liu
2025-02-20  2:58                   ` Baolu Lu
2025-02-20  3:44                     ` Yu Zhang
2025-02-07 14:46 ` [PATCH 4/5] iommu: Do not call domain_alloc() in iommu_sva_domain_alloc() Jason Gunthorpe
2025-02-07 14:46 ` [PATCH 5/5] iommu: Hide ops.domain_alloc behind CONFIG_FSL_PAMU Jason Gunthorpe
2025-02-12  0:41 ` [PATCH 0/5] Convert virtio-iommu to domain_alloc_paging() Jacob Pan
2025-02-12 12:50   ` Jason Gunthorpe
2025-02-12 18:50     ` Jacob Pan
2025-02-12 20:10       ` Robin Murphy
2025-02-21 11:42     ` Jean-Philippe Brucker
2025-02-24 19:39       ` Jason Gunthorpe
     [not found] ` <67abee53.170a0220.154671.ae28SMTPIN_ADDED_BROKEN@mx.google.com>
2025-02-12 11:58   ` Jean-Philippe Brucker
2025-02-12 17:05     ` Jacob Pan [this message]
     [not found]     ` <67acd4e2.630a0220.365aab.e098SMTPIN_ADDED_BROKEN@mx.google.com>
2025-02-12 19:16       ` Jean-Philippe Brucker

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=20250212090535.4973dbaf@DESKTOP-0403QTC. \
    --to=jacob.pan@linux.microsoft.com \
    --cc=eric.auger@redhat.com \
    --cc=iommu@lists.linux.dev \
    --cc=jean-philippe@linaro.org \
    --cc=jgg@nvidia.com \
    --cc=joro@8bytes.org \
    --cc=patches@lists.linux.dev \
    --cc=robin.murphy@arm.com \
    --cc=virtualization@lists.linux.dev \
    --cc=will@kernel.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