All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
To: valmiki <valmikibow@gmail.com>,
	Alex Williamson <alex.williamson@redhat.com>
Cc: iommu@lists.linux-foundation.org, kvm@vger.kernel.org,
	linux-pci@vger.kernel.org, tianyu.lan@intel.com,
	kevin.tian@intel.com, jacob.jun.pan@intel.com
Subject: Re: Support SVM without PASID
Date: Tue, 11 Jul 2017 11:56:16 +0100	[thread overview]
Message-ID: <eb132dfa-6708-5898-c2ce-ce7ab08809b1@arm.com> (raw)
In-Reply-To: <73619426-6fcc-21ce-cfd4-8c66bde63f9a@gmail.com>

Hi Valmiki,

On 09/07/17 04:15, valmiki wrote:
>>> Hi,
>>>
>>> In SMMUv3 architecture document i see "PASIDs are optional,
>>> configurable, and of a size determined by the minimum
>>> of the endpoint".
>>>
>>> So if PASID's are optional and not supported by PCIe end point, how SVM
>>> can be achieved ?
>>
>> It cannot be inferred from that statement that PASID support is not
>> required for SVM.  AIUI, SVM is a software feature enabled by numerous
>> "optional" hardware features, including PASID.  Features that are
>> optional per the hardware specification may be required for specific
>> software features.  Thanks,
>>
> Thanks for the information Alex. Suppose if an End point doesn't support
> PASID, is it still possible to achieve SVM ?
> Are there any such features in SMMUv3 with which we can achieve it ?

Not really, we don't plan to share the non-PASID context with a process.

In theory you could achieve something resembling SVM by assigning the
entire endpoint to userspace using VFIO, then use ATS+PRI capabilities
with a bind ioctl. If your device can do SR-IOV, then you can bind one
process per virtual function.

Unless we end up seeing lots of endpoints that implement PRI but not
PASID, I don't plan to add this to VFIO or SMMUv3.

For a PCIe endpoint, the requirements for SVM are ATS, PRI and PASID
enabled. In addition, the SMMU should support DVM (broadcast TLB
maintenance) and must be compatible with the MMU (page sizes, output
address size, ASID bits...)

Thanks,
Jean

WARNING: multiple messages have this Message-ID (diff)
From: Jean-Philippe Brucker <jean-philippe.brucker-5wv7dgnIgG8@public.gmane.org>
To: valmiki <valmikibow-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Alex Williamson
	<alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: tianyu.lan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	kevin.tian-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	jacob.jun.pan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Subject: Re: Support SVM without PASID
Date: Tue, 11 Jul 2017 11:56:16 +0100	[thread overview]
Message-ID: <eb132dfa-6708-5898-c2ce-ce7ab08809b1@arm.com> (raw)
In-Reply-To: <73619426-6fcc-21ce-cfd4-8c66bde63f9a-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

Hi Valmiki,

On 09/07/17 04:15, valmiki wrote:
>>> Hi,
>>>
>>> In SMMUv3 architecture document i see "PASIDs are optional,
>>> configurable, and of a size determined by the minimum
>>> of the endpoint".
>>>
>>> So if PASID's are optional and not supported by PCIe end point, how SVM
>>> can be achieved ?
>>
>> It cannot be inferred from that statement that PASID support is not
>> required for SVM.  AIUI, SVM is a software feature enabled by numerous
>> "optional" hardware features, including PASID.  Features that are
>> optional per the hardware specification may be required for specific
>> software features.  Thanks,
>>
> Thanks for the information Alex. Suppose if an End point doesn't support
> PASID, is it still possible to achieve SVM ?
> Are there any such features in SMMUv3 with which we can achieve it ?

Not really, we don't plan to share the non-PASID context with a process.

In theory you could achieve something resembling SVM by assigning the
entire endpoint to userspace using VFIO, then use ATS+PRI capabilities
with a bind ioctl. If your device can do SR-IOV, then you can bind one
process per virtual function.

Unless we end up seeing lots of endpoints that implement PRI but not
PASID, I don't plan to add this to VFIO or SMMUv3.

For a PCIe endpoint, the requirements for SVM are ATS, PRI and PASID
enabled. In addition, the SMMU should support DVM (broadcast TLB
maintenance) and must be compatible with the MMU (page sizes, output
address size, ASID bits...)

Thanks,
Jean

  parent reply	other threads:[~2017-07-11 10:53 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-08 17:03 Support SVM without PASID valmiki
2017-07-08 17:03 ` valmiki
2017-07-08 20:02 ` Alex Williamson
2017-07-08 20:02   ` Alex Williamson
2017-07-09  3:15   ` valmiki
2017-07-09  9:29     ` Liu, Yi L
2017-07-10  0:14     ` Bob Liu
2017-07-10  0:14       ` Bob Liu
2017-07-10 19:31     ` Jerome Glisse
2017-07-12 16:23       ` valmiki
2017-07-12 16:23         ` valmiki
2017-07-11 10:56     ` Jean-Philippe Brucker [this message]
2017-07-11 10:56       ` Jean-Philippe Brucker
2017-07-12 16:27       ` valmiki
2017-07-12 16:27         ` valmiki
2017-07-12 16:48         ` Jean-Philippe Brucker
2017-07-22  2:05           ` valmiki
2017-08-01  8:26             ` Jean-Philippe Brucker
2017-08-01  8:26               ` Jean-Philippe Brucker
2017-08-01 17:38               ` valmiki
2017-08-01 17:38                 ` valmiki
2017-08-01 18:40                 ` Jean-Philippe Brucker
2017-08-05  5:14                   ` valmiki
2017-08-07 10:31                     ` Jean-Philippe Brucker
2017-08-07 12:18                       ` Bob Liu
2017-08-07 12:18                         ` Bob Liu
2017-08-07 12:52                         ` Jean-Philippe Brucker
2017-08-08  0:51                           ` Bob Liu
2017-08-08  0:51                             ` Bob Liu
2017-08-09 15:01                             ` Jean-Philippe Brucker
2017-08-11  6:41                           ` Tian, Kevin
2017-08-11  9:25                             ` Jean-Philippe Brucker
2017-08-11  9:25                               ` Jean-Philippe Brucker
2017-08-11  9:36                             ` Bob Liu
2017-08-12 12:10                       ` valmiki
2017-08-14  7:49                         ` Tian, Kevin
2017-08-28 13:10                           ` Bharat Kumar Gogada
2017-08-28 13:10                             ` Bharat Kumar Gogada
2017-08-29  1:32                             ` Tian, Kevin
2017-08-04  1:49               ` Tian, Kevin
2017-08-04  1:49                 ` Tian, Kevin
2017-08-04  9:42                 ` Jean-Philippe Brucker
2017-08-11  6:29                   ` Tian, Kevin
2017-08-11  6:29                     ` Tian, Kevin
2017-08-11 16:25                   ` Raj, Ashok
2017-08-14  8:00                     ` Tian, Kevin
2017-08-14  8:00                       ` Tian, Kevin
2017-08-14  9:07                       ` 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=eb132dfa-6708-5898-c2ce-ce7ab08809b1@arm.com \
    --to=jean-philippe.brucker@arm.com \
    --cc=alex.williamson@redhat.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=jacob.jun.pan@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=tianyu.lan@intel.com \
    --cc=valmikibow@gmail.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 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.