linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pci: Add ACS quirk for Emulex NICs
@ 2015-01-13  6:22 Sathya Perla
  2015-01-13 15:28 ` Alex Williamson
  2015-01-16  0:11 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Sathya Perla @ 2015-01-13  6:22 UTC (permalink / raw)
  To: linux-pci

From: Vasundhara Volam <vasundhara.volam@emulex.com>

As Skyhawk and BE3-R (both multi-function devices) don't advertise the
PCI-ACS capability, the vfio driver places all the functions of these
devices in a single IOMMU group. Attaching (via PCI-passthru)two different
Skyhawk/BE3-R partitions (nPAR, Flex etc PFs) using vfio, to different
guests doesn't work as vfio only allows functions in *different* IOMMU
groups to be assigned to different guests.

As peer-to-peer access between PFs in Skyhawk/BE3-R is not possible,
we can treat them as "fully isolated" even though the device doesn't
advertise ACS. So, this patch adds a PCI quirk for Skyhawk and BE3-R
chips to fix this problem.

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
---
 drivers/pci/quirks.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index ed6f89b..3d24629 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -3713,6 +3713,8 @@ static const struct pci_dev_acs_enabled {
 	{ PCI_VENDOR_ID_INTEL, 0x1551, pci_quirk_mf_endpoint_acs },
 	{ PCI_VENDOR_ID_INTEL, 0x1558, pci_quirk_mf_endpoint_acs },
 	{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs },
+	{ 0x19a2, 0x710, pci_quirk_mf_endpoint_acs }, /* Emulex BE3-R */
+	{ 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R */
 	{ 0 }
 };
 
-- 
2.2.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] pci: Add ACS quirk for Emulex NICs
  2015-01-13  6:22 [PATCH] pci: Add ACS quirk for Emulex NICs Sathya Perla
@ 2015-01-13 15:28 ` Alex Williamson
  2015-01-16  0:11 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Alex Williamson @ 2015-01-13 15:28 UTC (permalink / raw)
  To: Sathya Perla; +Cc: linux-pci

On Tue, 2015-01-13 at 01:22 -0500, Sathya Perla wrote:
> From: Vasundhara Volam <vasundhara.volam@emulex.com>
> 
> As Skyhawk and BE3-R (both multi-function devices) don't advertise the
> PCI-ACS capability, the vfio driver places all the functions of these
> devices in a single IOMMU group. Attaching (via PCI-passthru)two different
> Skyhawk/BE3-R partitions (nPAR, Flex etc PFs) using vfio, to different
> guests doesn't work as vfio only allows functions in *different* IOMMU
> groups to be assigned to different guests.
> 
> As peer-to-peer access between PFs in Skyhawk/BE3-R is not possible,
> we can treat them as "fully isolated" even though the device doesn't
> advertise ACS. So, this patch adds a PCI quirk for Skyhawk and BE3-R
> chips to fix this problem.
> 
> Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
> ---
>  drivers/pci/quirks.c | 2 ++
>  1 file changed, 2 insertions(+)

Acked-by: Alex Williamson <alex.williamson@redhat.com>

> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index ed6f89b..3d24629 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -3713,6 +3713,8 @@ static const struct pci_dev_acs_enabled {
>  	{ PCI_VENDOR_ID_INTEL, 0x1551, pci_quirk_mf_endpoint_acs },
>  	{ PCI_VENDOR_ID_INTEL, 0x1558, pci_quirk_mf_endpoint_acs },
>  	{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs },
> +	{ 0x19a2, 0x710, pci_quirk_mf_endpoint_acs }, /* Emulex BE3-R */
> +	{ 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R */
>  	{ 0 }
>  };
>  




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pci: Add ACS quirk for Emulex NICs
  2015-01-13  6:22 [PATCH] pci: Add ACS quirk for Emulex NICs Sathya Perla
  2015-01-13 15:28 ` Alex Williamson
@ 2015-01-16  0:11 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2015-01-16  0:11 UTC (permalink / raw)
  To: Sathya Perla; +Cc: linux-pci, Alex Williamson

[+cc Alex]

On Tue, Jan 13, 2015 at 01:22:23AM -0500, Sathya Perla wrote:
> From: Vasundhara Volam <vasundhara.volam@emulex.com>
> 
> As Skyhawk and BE3-R (both multi-function devices) don't advertise the
> PCI-ACS capability, the vfio driver places all the functions of these
> devices in a single IOMMU group. Attaching (via PCI-passthru)two different
> Skyhawk/BE3-R partitions (nPAR, Flex etc PFs) using vfio, to different
> guests doesn't work as vfio only allows functions in *different* IOMMU
> groups to be assigned to different guests.
> 
> As peer-to-peer access between PFs in Skyhawk/BE3-R is not possible,
> we can treat them as "fully isolated" even though the device doesn't
> advertise ACS. So, this patch adds a PCI quirk for Skyhawk and BE3-R
> chips to fix this problem.
> 
> Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
> Signed-off-by: Sathya Perla <sathya.perla@emulex.com>

Applied with Alex's ack to pci/virtualization for v3.20, thanks!

> ---
>  drivers/pci/quirks.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index ed6f89b..3d24629 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -3713,6 +3713,8 @@ static const struct pci_dev_acs_enabled {
>  	{ PCI_VENDOR_ID_INTEL, 0x1551, pci_quirk_mf_endpoint_acs },
>  	{ PCI_VENDOR_ID_INTEL, 0x1558, pci_quirk_mf_endpoint_acs },
>  	{ PCI_VENDOR_ID_INTEL, PCI_ANY_ID, pci_quirk_intel_pch_acs },
> +	{ 0x19a2, 0x710, pci_quirk_mf_endpoint_acs }, /* Emulex BE3-R */
> +	{ 0x10df, 0x720, pci_quirk_mf_endpoint_acs }, /* Emulex Skyhawk-R */
>  	{ 0 }
>  };
>  
> -- 
> 2.2.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-16  0:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-13  6:22 [PATCH] pci: Add ACS quirk for Emulex NICs Sathya Perla
2015-01-13 15:28 ` Alex Williamson
2015-01-16  0:11 ` Bjorn Helgaas

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).