All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
To: Eric Auger <eric.auger-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH] iommu/arm-smmu: Fix stream-match conflict with IOMMU_DOMAIN_DMA
Date: Thu, 7 Apr 2016 15:46:02 +0100	[thread overview]
Message-ID: <20160407144601.GJ5657@arm.com> (raw)
In-Reply-To: <5702368D.6060706-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Hi Eric,

On Mon, Apr 04, 2016 at 11:40:29AM +0200, Eric Auger wrote:
> On 04/01/2016 06:19 PM, Will Deacon wrote:
> > Commit cbf8277ef456 ("iommu/arm-smmu: Treat IOMMU_DOMAIN_DMA as bypass
> > for now") ignores requests to attach a device to the default domain
> > since, without IOMMU-basked DMA ops available everywhere, the default
> > domain will just lead to unexpected transaction faults being reported.
> > 
> > Unfortunately, the way this was implemented on SMMUv2 causes a
> > regression with VFIO PCI device passthrough under KVM on AMD Seattle.
> > On this system, the host controller device is associated with both a
> > pci_dev *and* a platform_device, and can therefore end up with duplicate
> > SMR entries, resulting in a stream-match conflict at runtime.
> > 
> > This patch amends the original fix so that attaching to IOMMU_DOMAIN_DMA
> > is rejected even before configuring the SMRs. This restores the old
> > behaviour for now, but we'll need to look at handing host controllers
> > specially when we come to supporting the default domain fully.
> 
> This works fine for me, before and after PCIe assignment. However before
> giving my T-b I would like to investigate another regression I observe
> wrt SRIOV assignment. Assigning the 1st VF works fine. However assigning
> a second VF does not work anymore (it used to in the past). I get
> -ENOSPC from arm_smmu_master_configure_smrs

Did you get anywhere debugging this?

Will

WARNING: multiple messages have this Message-ID (diff)
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] iommu/arm-smmu: Fix stream-match conflict with IOMMU_DOMAIN_DMA
Date: Thu, 7 Apr 2016 15:46:02 +0100	[thread overview]
Message-ID: <20160407144601.GJ5657@arm.com> (raw)
In-Reply-To: <5702368D.6060706@linaro.org>

Hi Eric,

On Mon, Apr 04, 2016 at 11:40:29AM +0200, Eric Auger wrote:
> On 04/01/2016 06:19 PM, Will Deacon wrote:
> > Commit cbf8277ef456 ("iommu/arm-smmu: Treat IOMMU_DOMAIN_DMA as bypass
> > for now") ignores requests to attach a device to the default domain
> > since, without IOMMU-basked DMA ops available everywhere, the default
> > domain will just lead to unexpected transaction faults being reported.
> > 
> > Unfortunately, the way this was implemented on SMMUv2 causes a
> > regression with VFIO PCI device passthrough under KVM on AMD Seattle.
> > On this system, the host controller device is associated with both a
> > pci_dev *and* a platform_device, and can therefore end up with duplicate
> > SMR entries, resulting in a stream-match conflict at runtime.
> > 
> > This patch amends the original fix so that attaching to IOMMU_DOMAIN_DMA
> > is rejected even before configuring the SMRs. This restores the old
> > behaviour for now, but we'll need to look at handing host controllers
> > specially when we come to supporting the default domain fully.
> 
> This works fine for me, before and after PCIe assignment. However before
> giving my T-b I would like to investigate another regression I observe
> wrt SRIOV assignment. Assigning the 1st VF works fine. However assigning
> a second VF does not work anymore (it used to in the past). I get
> -ENOSPC from arm_smmu_master_configure_smrs

Did you get anywhere debugging this?

Will

  parent reply	other threads:[~2016-04-07 14:46 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-01 16:19 [PATCH] iommu/arm-smmu: Fix stream-match conflict with IOMMU_DOMAIN_DMA Will Deacon
2016-04-01 16:19 ` Will Deacon
     [not found] ` <1459527597-10740-1-git-send-email-will.deacon-5wv7dgnIgG8@public.gmane.org>
2016-04-04  9:40   ` Eric Auger
2016-04-04  9:40     ` Eric Auger
     [not found]     ` <5702368D.6060706-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-04-07 14:46       ` Will Deacon [this message]
2016-04-07 14:46         ` Will Deacon
     [not found]         ` <20160407144601.GJ5657-5wv7dgnIgG8@public.gmane.org>
2016-04-07 14:50           ` Eric Auger
2016-04-07 14:50             ` Eric Auger
2016-04-05 10:48   ` Robin Murphy
2016-04-05 10:48     ` Robin Murphy
     [not found]     ` <570397F4.8080504-5wv7dgnIgG8@public.gmane.org>
2016-04-05 11:33       ` Eric Auger
2016-04-05 11:33         ` Eric Auger
     [not found]         ` <5703A289.30308-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-04-13 14:46           ` [PATCH] iommu/arm-smmu: Don't allocate resources for bypass domains Robin Murphy
2016-04-13 14:46             ` Robin Murphy
     [not found]             ` <491c885f61c509d959b04cfb63676bd07e481dea.1460558667.git.robin.murphy-5wv7dgnIgG8@public.gmane.org>
2016-04-15 13:05               ` Will Deacon
2016-04-15 13:05                 ` Will Deacon
     [not found]                 ` <20160415130520.GH22906-5wv7dgnIgG8@public.gmane.org>
2016-04-15 15:11                   ` Eric Auger
2016-04-15 15:11                     ` Eric Auger
2016-04-15 15:09               ` Eric Auger
2016-04-15 15:09                 ` Eric Auger
2016-04-15 15:09   ` [PATCH] iommu/arm-smmu: Fix stream-match conflict with IOMMU_DOMAIN_DMA Eric Auger
2016-04-15 15:09     ` Eric Auger
2016-04-15 17:53     ` Shi, Yang
2016-04-15 17:53       ` Shi, Yang

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=20160407144601.GJ5657@arm.com \
    --to=will.deacon-5wv7dgnigg8@public.gmane.org \
    --cc=eric.auger-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.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.