All of lore.kernel.org
 help / color / mirror / Atom feed
From: Will Deacon <will.deacon-5wv7dgnIgG8@public.gmane.org>
To: Sinan Kaya <okaya-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: Vikram Sethi <vikrams-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Linux PCI <linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Subject: Re: RFC on No ACS Support and SMMUv3 Support
Date: Tue, 14 Feb 2017 12:36:05 +0000	[thread overview]
Message-ID: <20170214123605.GA25144@arm.com> (raw)
In-Reply-To: <546869d0-d05c-9550-86d5-276bc7a3c284-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>

On Mon, Feb 13, 2017 at 08:54:04PM -0500, Sinan Kaya wrote:
> On 2/13/2017 8:46 PM, Alex Williamson wrote:
> >> My first goal is to support virtual function passthrough for device's that are directly
> >> connected. This will be possible with the quirk I proposed and it will be the most
> >> secure solution. It can certainly be generalized for other systems.
> > Why is this anything more than a quirk for the affected PCIe root port
> > vendor:device IDs and use of pci_device_group() to evaluate the rest of
> > the topology, as appears is already done?  Clearly a blanket exception
> > for the platform wouldn't necessarily be correct if a user could plugin
> > a device that adds a PCIe switch.
> 
> I was going to go this direction first. I wanted to check with everybody to see
> if there are other/better alternatives possible via either changing 
> pci_device_group or changing the smmuv3 driver.

Just to echo what Alex has been saying, I really don't think we should
support this type of system by quirking the topology code in the SMMU
driver. The SMMU isn't at fault here; the problems are all upstream of that.
Legitimising non-ACS machines in the SMMU driver gives little incentive for
people to build systems correctly and undermines the security guarantees
that the SMMU (and VFIO) are trying to provide.

I appreciate that I/O virtualisation on arm64 has been a learning curve for
everybody involved, but that's not an excuse for moving the goalposts when
it comes to device isolation.

Will

WARNING: multiple messages have this Message-ID (diff)
From: Will Deacon <will.deacon@arm.com>
To: Sinan Kaya <okaya@codeaurora.org>
Cc: Alex Williamson <alex.williamson@redhat.com>,
	Linux PCI <linux-pci@vger.kernel.org>,
	Nate Watterson <nwatters@codeaurora.org>,
	Lorenzo Pieralisi <Lorenzo.Pieralisi@arm.com>,
	iommu@lists.linux-foundation.org,
	Vikram Sethi <vikrams@codeaurora.org>,
	Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: RFC on No ACS Support and SMMUv3 Support
Date: Tue, 14 Feb 2017 12:36:05 +0000	[thread overview]
Message-ID: <20170214123605.GA25144@arm.com> (raw)
In-Reply-To: <546869d0-d05c-9550-86d5-276bc7a3c284@codeaurora.org>

On Mon, Feb 13, 2017 at 08:54:04PM -0500, Sinan Kaya wrote:
> On 2/13/2017 8:46 PM, Alex Williamson wrote:
> >> My first goal is to support virtual function passthrough for device's that are directly
> >> connected. This will be possible with the quirk I proposed and it will be the most
> >> secure solution. It can certainly be generalized for other systems.
> > Why is this anything more than a quirk for the affected PCIe root port
> > vendor:device IDs and use of pci_device_group() to evaluate the rest of
> > the topology, as appears is already done?  Clearly a blanket exception
> > for the platform wouldn't necessarily be correct if a user could plugin
> > a device that adds a PCIe switch.
> 
> I was going to go this direction first. I wanted to check with everybody to see
> if there are other/better alternatives possible via either changing 
> pci_device_group or changing the smmuv3 driver.

Just to echo what Alex has been saying, I really don't think we should
support this type of system by quirking the topology code in the SMMU
driver. The SMMU isn't at fault here; the problems are all upstream of that.
Legitimising non-ACS machines in the SMMU driver gives little incentive for
people to build systems correctly and undermines the security guarantees
that the SMMU (and VFIO) are trying to provide.

I appreciate that I/O virtualisation on arm64 has been a learning curve for
everybody involved, but that's not an excuse for moving the goalposts when
it comes to device isolation.

Will

  parent reply	other threads:[~2017-02-14 12:36 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13 22:24 RFC on No ACS Support and SMMUv3 Support Sinan Kaya
2017-02-13 22:24 ` Sinan Kaya
2017-02-13 23:06 ` Alex Williamson
     [not found]   ` <20170213160652.7c141eb1-1yVPhWWZRC1BDLzU/O5InQ@public.gmane.org>
2017-02-14  0:14     ` Sinan Kaya
2017-02-14  0:14       ` Sinan Kaya
2017-02-14  1:46       ` Alex Williamson
     [not found]         ` <20170213184643.2d2bdce7-1yVPhWWZRC1BDLzU/O5InQ@public.gmane.org>
2017-02-14  1:54           ` Sinan Kaya
2017-02-14  1:54             ` Sinan Kaya
2017-02-14  9:45             ` Will Deacon
     [not found]             ` <546869d0-d05c-9550-86d5-276bc7a3c284-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-02-14 12:10               ` Robin Murphy
2017-02-14 12:10                 ` Robin Murphy
2017-02-14 12:36               ` Will Deacon [this message]
2017-02-14 12:36                 ` Will Deacon
     [not found]                 ` <20170214123605.GA25144-5wv7dgnIgG8@public.gmane.org>
2017-02-14 13:53                   ` Sinan Kaya
2017-02-14 13:53                     ` Sinan Kaya

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=20170214123605.GA25144@arm.com \
    --to=will.deacon-5wv7dgnigg8@public.gmane.org \
    --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
    --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
    --cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=okaya-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=vikrams-sgV2jX0FEOL9JmXXK+q4OQ@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.