From: "Lu, Baolu" <baolu.lu@intel.com>
To: "Prakhya, Sai Praneeth" <sai.praneeth.prakhya@intel.com>,
"iommu@lists.linux-foundation.org"
<iommu@lists.linux-foundation.org>
Cc: "Shankar, Ravi V" <ravi.v.shankar@intel.com>,
"Tian, Kevin" <kevin.tian@intel.com>,
"jroedel@suse.de" <jroedel@suse.de>,
"Raj, Ashok" <ashok.raj@intel.com>,
Will Deacon <will.deacon@arm.com>,
"Pan, Jacob jun" <jacob.jun.pan@intel.com>,
"robin.murphy@arm.com" <robin.murphy@arm.com>,
"hch@lst.de" <hch@lst.de>
Subject: Re: Device specific pass through in host systems - discuss user interface
Date: Sun, 9 Jun 2019 11:20:34 +0800 [thread overview]
Message-ID: <b7a71b22-aa3b-5ac3-7285-5231f84ee979@intel.com> (raw)
In-Reply-To: <FFF73D592F13FD46B8700F0A279B802F48DA796E@ORSMSX114.amr.corp.intel.com>
Hi Sai,
On 6/7/19 10:24 AM, Prakhya, Sai Praneeth wrote:
> Hi All,
>
> I am working on an IOMMU driver feature that allows a user to specify if
> the DMA from a device should be translated by IOMMU or not. Presently,
> we support only all devices or none mode i.e. if user specifies
> “iommu=pt” [X86] or “iommu.passthrough” [ARM64] through kernel command
> line, all the devices would be in pass through mode and we don’t have
> per device granularity, but, we were requested by a customer to
> selectively put devices in pass through mode and not all.
Most iommu vendor drivers have switched from per-device to per-group
domain (a.k.a. default domain). So per-group pass-through mode makes
more sense?
By the way, can we extend this to "per-group default domain type",
instead of only "per-group pass-through mode"? Currently we have system
level default domain type, if we have finer granularity of default
domain type, both iommu drivers and end users will benefit from it.
>
> Since, this feature could be generic across architectures, we thought it
> would be better if the user interface is discussed in the community
> first. We are envisioning this to be used both during boot time and
> runtime and hence having a kernel command line argument along with a
> sysfs entry are needed. So, please pour in your suggestions on how the
> user interface should look like to make it architecture agnostic.
>
> 1.Have a kernel command line argument that takes a list of BDF’s as an
> input and puts them in pass through mode
>
> a.Accepting BDF as an input has a downside – BDF is dynamic and could
> change if BIOS/OS enumerates a new device in next reboot
>
> b.Accepting <vendor_id:device_id> pair as an input has a downside – What
> to do when there are multiple such devices and user would like to put
> only some of them in PT mode
>
> 2.Have a sysfs file which takes 1 or 0 as an input to enable/disable
> pass through mode. Some places that seem to be reasonable are
>
> a./sys/class/iommu/dmar0/devices/
>
> b./sys/kernel/iommu_groups/<id>/devices
>
> I am looking for a consensus on **how the kernel command line argument
> should look like and path for sysfs entry**. Also, please note that if a
> device is put in pass through mode it won’t be available for the guest
> and that’s ok.
Just out of curiosity, what's the limitation for a device using pass-
through DMA domain to be assignable.
Best regards,
Baolu
>
> Regards,
>
> Sai
>
> PS: Idea credits: Ashok Raj
>
>
> _______________________________________________
> iommu mailing list
> iommu@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu
>
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
next prev parent reply other threads:[~2019-06-10 5:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-07 2:24 Device specific pass through in host systems - discuss user interface Prakhya, Sai Praneeth
2019-06-07 12:41 ` Robin Murphy
2019-06-08 1:44 ` Sai Praneeth Prakhya
2019-06-08 7:27 ` hch
2019-06-08 18:38 ` Sai Praneeth Prakhya
2019-06-09 3:20 ` Lu, Baolu [this message]
2019-06-10 5:41 ` Prakhya, Sai Praneeth
2019-06-10 13:56 ` Raj, Ashok
2019-06-11 4:38 ` Prakhya, Sai Praneeth
2019-06-11 4:56 ` Raj, Ashok
2019-06-11 17:27 ` Prakhya, Sai Praneeth
2019-07-01 8:59 ` jroedel
2019-07-03 2:01 ` Prakhya, Sai Praneeth
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=b7a71b22-aa3b-5ac3-7285-5231f84ee979@intel.com \
--to=baolu.lu@intel.com \
--cc=ashok.raj@intel.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux-foundation.org \
--cc=jacob.jun.pan@intel.com \
--cc=jroedel@suse.de \
--cc=kevin.tian@intel.com \
--cc=ravi.v.shankar@intel.com \
--cc=robin.murphy@arm.com \
--cc=sai.praneeth.prakhya@intel.com \
--cc=will.deacon@arm.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