linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Robert Stonehouse <rstonehouse@solarflare.com>
Subject: Re: [PATCH] pci: quirks: Add ACS quirk for Solarflare SFC9120 & SFC9140
Date: Mon, 22 Sep 2014 15:05:47 -0600	[thread overview]
Message-ID: <20140922210547.GK1880@google.com> (raw)
In-Reply-To: <20140917145838.19243.14630.stgit@gimli.home>

On Wed, Sep 17, 2014 at 08:59:36AM -0600, Alex Williamson wrote:
> Solarflare confirms that these devices do not allow peer-to-peer
> between functions.  Quirk them to allow IOMMU grouping to expose this
> isolation.
> 
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> Cc: Robert Stonehouse <rstonehouse@solarflare.com>

Applied with Robert's ack to pci/virtualization for v3.18, thanks!

> ---
> 
>  drivers/pci/quirks.c |   17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index 80c2d01..78cc83f 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -3664,6 +3664,21 @@ static int pci_quirk_intel_pch_acs(struct pci_dev *dev, u16 acs_flags)
>  	return acs_flags & ~flags ? 0 : 1;
>  }
>  
> +static int pci_quirk_solarflare_acs(struct pci_dev *dev, u16 acs_flags)
> +{
> +	/*
> +	 * SV, TB, and UF are not relevant to multifunction endpoints.
> +	 *
> +	 * Solarflare indicates that peer-to-peer between functions is not
> +	 * possible, therefore RR, CR, and DT are not implemented.  Mask
> +	 * these out as if they were clear in the ACS capabilities register.
> +	 */
> +	acs_flags &= ~(PCI_ACS_SV | PCI_ACS_TB | PCI_ACS_RR |
> +		       PCI_ACS_CR | PCI_ACS_UF | PCI_ACS_DT);
> +
> +	return acs_flags ? 0 : 1;
> +}
> +
>  static const struct pci_dev_acs_enabled {
>  	u16 vendor;
>  	u16 device;
> @@ -3675,6 +3690,8 @@ static const struct pci_dev_acs_enabled {
>  	{ PCI_VENDOR_ID_ATI, 0x439d, pci_quirk_amd_sb_acs },
>  	{ PCI_VENDOR_ID_ATI, 0x4384, pci_quirk_amd_sb_acs },
>  	{ PCI_VENDOR_ID_ATI, 0x4399, pci_quirk_amd_sb_acs },
> +	{ PCI_VENDOR_ID_SOLARFLARE, 0x0903, pci_quirk_solarflare_acs },
> +	{ PCI_VENDOR_ID_SOLARFLARE, 0x0923, pci_quirk_solarflare_acs },
>  	{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs },
>  	{ 0 }
>  };
> 

      parent reply	other threads:[~2014-09-22 21:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-17 14:59 [PATCH] pci: quirks: Add ACS quirk for Solarflare SFC9120 & SFC9140 Alex Williamson
2014-09-17 15:53 ` Robert Stonehouse
2014-09-22 21:05 ` Bjorn Helgaas [this message]

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=20140922210547.GK1880@google.com \
    --to=bhelgaas@google.com \
    --cc=alex.williamson@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rstonehouse@solarflare.com \
    /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;
as well as URLs for NNTP newsgroup(s).