All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lu Baolu <baolu.lu@linux.intel.com>
To: Will Deacon <will@kernel.org>, Ashok Raj <ashok.raj@intel.com>,
	robin.murphy@arm.com
Cc: iommu@lists.linux-foundation.org,
	Will Deacon <will.deacon@arm.com>, Christoph Hellwig <hch@lst.de>
Subject: Re: [Patch V8 0/3] iommu: Add support to change default domain of an iommu group
Date: Thu, 19 Nov 2020 10:36:15 +0800	[thread overview]
Message-ID: <fbfcf459-2014-ac40-70e6-0288160fb915@linux.intel.com> (raw)
In-Reply-To: <20201118135225.GC2177@willie-the-truck>

On 11/18/20 9:52 PM, Will Deacon wrote:
> On Fri, Sep 25, 2020 at 12:06:17PM -0700, Ashok Raj wrote:
>> Presently, the default domain of an iommu group is allocated during boot time
>> and it cannot be changed later. So, the device would typically be either in
>> identity (pass_through) mode or the device would be in DMA mode as long as the
>> system is up and running. There is no way to change the default domain type
>> dynamically i.e. after booting, a device cannot switch between identity mode and
>> DMA mode.
>>
>> Assume a use case wherein the privileged user would want to use the device in
>> pass-through mode when the device is used for host so that it would be high
>> performing. Presently, this is not supported. Hence add support to change the
>> default domain of an iommu group dynamically.
>>
>> Support this by writing to a sysfs file, namely
>> "/sys/kernel/iommu_groups/<grp_id>/type".
>>
>> Testing:
>> --------
>> Tested by dynamically changing storage device (nvme) from
>> 1. identity mode to DMA and making sure file transfer works
>> 2. DMA mode to identity mode and making sure file transfer works
>> Tested only for intel_iommu/vt-d. Would appreciate if someone could test on AMD
>> and ARM based machines.
>>
>> Based on iommu maintainer's 'next' branch.
> 
> Modulo my minor comments, I think this looks good for 5.11 if you can
> please send a version 9.
> 
> Robin -- please can you give it the once-over too? I think root can break
> things quite badly with this interface, but root can do that in other ways
> anyway...

Sure. I will send a v9 after Robin's review.

> 
> Will

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

      reply	other threads:[~2020-11-19  2:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-25 19:06 [Patch V8 0/3] iommu: Add support to change default domain of an iommu group Ashok Raj
2020-09-25 19:06 ` [Patch V8 1/3] " Ashok Raj
2020-11-18 13:51   ` Will Deacon
2020-11-19  2:18     ` Lu Baolu
2020-11-19  8:53       ` Will Deacon
2020-11-20  2:11         ` Lu Baolu
2020-11-20 11:03           ` Will Deacon
2020-11-20 11:27   ` Shameerali Kolothum Thodi
2020-11-20 13:09     ` Lu Baolu
2020-09-25 19:06 ` [Patch V8 2/3] iommu: Take lock before reading iommu group default domain type Ashok Raj
2020-09-25 19:06 ` [Patch V8 3/3] iommu: Document usage of "/sys/kernel/iommu_groups/<grp_id>/type" file Ashok Raj
2020-11-18 13:51   ` Will Deacon
2020-11-19  2:32     ` Lu Baolu
2020-11-19  8:55       ` Will Deacon
2020-11-20  2:13         ` Lu Baolu
2020-10-01 12:58 ` [Patch V8 0/3] iommu: Add support to change default domain of an iommu group Joerg Roedel
2020-10-01 13:51   ` Raj, Ashok
2020-11-18 13:52 ` Will Deacon
2020-11-19  2:36   ` Lu Baolu [this message]

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=fbfcf459-2014-ac40-70e6-0288160fb915@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=ashok.raj@intel.com \
    --cc=hch@lst.de \
    --cc=iommu@lists.linux-foundation.org \
    --cc=robin.murphy@arm.com \
    --cc=will.deacon@arm.com \
    --cc=will@kernel.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.