Linux IOMMU Development
 help / color / mirror / Atom feed
* Device specific pass through in host systems - discuss user interface
@ 2019-06-07  2:24 Prakhya, Sai Praneeth
  2019-06-07 12:41 ` Robin Murphy
  2019-06-09  3:20 ` Lu, Baolu
  0 siblings, 2 replies; 13+ messages in thread
From: Prakhya, Sai Praneeth @ 2019-06-07  2:24 UTC (permalink / raw)
  To: iommu@lists.linux-foundation.org
  Cc: Shankar, Ravi V, Tian, Kevin, jroedel@suse.de, Raj, Ashok,
	Will Deacon, Pan, Jacob jun, robin.murphy@arm.com, hch@lst.de,
	Lu, Baolu


[-- Attachment #1.1: Type: text/plain, Size: 1852 bytes --]

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.

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.

Regards,
Sai

PS: Idea credits: Ashok Raj

[-- Attachment #1.2: Type: text/html, Size: 7404 bytes --]

[-- Attachment #2: Type: text/plain, Size: 156 bytes --]

_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu

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

end of thread, other threads:[~2019-07-03  2:01 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox