RE: [PATCH] iommu: Remove functions that support private domain

2020-05-28 Thread Prakhya, Sai Praneeth
Hi Joerg, > -Original Message- > From: Joerg Roedel > Sent: Monday, May 25, 2020 6:57 AM > To: Prakhya, Sai Praneeth > Cc: Lu Baolu ; iommu@lists.linux-foundation.org > Subject: Re: [PATCH] iommu: Remove functions that support private domain > > On Sun, May 17,

Re: [PATCH] iommu: Remove functions that support private domain

2020-05-25 Thread Joerg Roedel
On Sun, May 17, 2020 at 08:29:17AM +, Prakhya, Sai Praneeth wrote: > iommu_bus_notifier() > -> iommu_release_device() > -> ops->release_device() (Eg: intel_iommu_release_device()) > -> iommu_group_remove_device() >-> mutex_lock() > > But, I added print statements to iommu_bus_notifier()

RE: [PATCH] iommu: Remove functions that support private domain

2020-05-17 Thread Prakhya, Sai Praneeth
> -Original Message- > From: Joerg Roedel > Sent: Friday, May 15, 2020 8:46 AM > To: Lu Baolu > Cc: Prakhya, Sai Praneeth ; > iommu@lists.linux-foundation.org > Subject: Re: [PATCH] iommu: Remove functions that support private domain > > On Fri, May 15, 2

RE: [PATCH] iommu: Remove functions that support private domain

2020-05-15 Thread Prakhya, Sai Praneeth
Hi Joerg, > -Original Message- > From: Joerg Roedel > Sent: Friday, May 15, 2020 2:59 AM > To: Prakhya, Sai Praneeth > Cc: iommu@lists.linux-foundation.org; Lu Baolu > Subject: Re: [PATCH] iommu: Remove functions that support private domain > > On Thu, May 14,

Re: [PATCH] iommu: Remove functions that support private domain

2020-05-15 Thread Joerg Roedel
On Fri, May 15, 2020 at 08:55:42PM +0800, Lu Baolu wrote: > It seems that we can do like this: > > [1] mutex_lock(&group->lock) > [2] for_each_group_device(device_lock()) > [3] if (for_each_group_device(!device_is_bound())) > change_default_domain() > [4] for_each_group_device_reverse(device

Re: [PATCH] iommu: Remove functions that support private domain

2020-05-15 Thread Lu Baolu
Hi, On 2020/5/15 17:59, Joerg Roedel wrote: On Thu, May 14, 2020 at 11:12:52PM +, Prakhya, Sai Praneeth wrote: +static int is_driver_bound(struct device *dev, void *not_used) +{ + int ret = 0; + + device_lock(dev); + if (device_is_bound(dev)) + ret = 1; +

Re: [PATCH] iommu: Remove functions that support private domain

2020-05-15 Thread Joerg Roedel
On Wed, May 13, 2020 at 03:47:21PM -0700, Sai Praneeth Prakhya wrote: > After moving iommu_group setup to iommu core code [1][2] and removing > private domain support in vt-d [3], there are no users for functions such > as iommu_request_dm_for_dev(), iommu_request_dma_domain_for_dev() and > request

Re: [PATCH] iommu: Remove functions that support private domain

2020-05-15 Thread Joerg Roedel
On Thu, May 14, 2020 at 11:12:52PM +, Prakhya, Sai Praneeth wrote: > +static int is_driver_bound(struct device *dev, void *not_used) > +{ > + int ret = 0; > + > + device_lock(dev); > + if (device_is_bound(dev)) > + ret = 1; > + device_unlock(dev); > + return ret;

RE: [PATCH] iommu: Remove functions that support private domain

2020-05-14 Thread Prakhya, Sai Praneeth
Hi Joerg, > -Original Message- > From: Joerg Roedel > Sent: Thursday, May 14, 2020 12:56 PM > To: Prakhya, Sai Praneeth > Cc: iommu@lists.linux-foundation.org; Lu Baolu > Subject: Re: [PATCH] iommu: Remove functions that support private domain > > On Thu, Ma

Re: [PATCH] iommu: Remove functions that support private domain

2020-05-14 Thread Joerg Roedel
On Thu, May 14, 2020 at 06:44:16PM +, Prakhya, Sai Praneeth wrote: > Could you please explain why we shouldn't change default-domain for an > iommu group that has multiple devices? Because you can't be sure that a device is bound to a driver while the default domain of the group is changed. As

RE: [PATCH] iommu: Remove functions that support private domain

2020-05-14 Thread Prakhya, Sai Praneeth
Hi Joerg, > -Original Message- > From: Joerg Roedel > Sent: Thursday, May 14, 2020 11:33 AM > To: Prakhya, Sai Praneeth > Cc: iommu@lists.linux-foundation.org; Lu Baolu > Subject: Re: [PATCH] iommu: Remove functions that support private domain > > On Thu, Ma

Re: [PATCH] iommu: Remove functions that support private domain

2020-05-14 Thread Joerg Roedel
On Thu, May 14, 2020 at 05:51:39PM +, Prakhya, Sai Praneeth wrote: > Sorry! didn't get that quite well. When you meant "per-group > default-domain patch-set", do you mean the patch set that I am working > on which changes iommu group default domain dynamically by writing to > sysfs file? Not o

RE: [PATCH] iommu: Remove functions that support private domain

2020-05-14 Thread Prakhya, Sai Praneeth
Hi Joerg, > -Original Message- > From: Joerg Roedel > Sent: Thursday, May 14, 2020 6:13 AM > To: Prakhya, Sai Praneeth > Cc: iommu@lists.linux-foundation.org; Lu Baolu > Subject: Re: [PATCH] iommu: Remove functions that support private domain > > On Wed, Ma

Re: [PATCH] iommu: Remove functions that support private domain

2020-05-14 Thread Joerg Roedel
On Wed, May 13, 2020 at 03:47:21PM -0700, Sai Praneeth Prakhya wrote: > After moving iommu_group setup to iommu core code [1][2] and removing > private domain support in vt-d [3], there are no users for functions such > as iommu_request_dm_for_dev(), iommu_request_dma_domain_for_dev() and > request

[PATCH] iommu: Remove functions that support private domain

2020-05-13 Thread Sai Praneeth Prakhya
After moving iommu_group setup to iommu core code [1][2] and removing private domain support in vt-d [3], there are no users for functions such as iommu_request_dm_for_dev(), iommu_request_dma_domain_for_dev() and request_default_domain_for_dev(). So, remove these functions. [1] commit dce8d6964eb