RE: [PATCH V4 1/3] iommu: Add support to change default domain of an iommu group

2020-07-22 Thread Prakhya, Sai Praneeth
ndation.org; Robin Murphy ; > Christoph Hellwig > Subject: Re: [PATCH V4 1/3] iommu: Add support to change default domain of > an iommu group > > On Tue, Jul 14, 2020 at 06:23:54PM +, Prakhya, Sai Praneeth wrote: > > Q1: > > > Presently, iommu_change_dev_def_do

Re: [PATCH V4 1/3] iommu: Add support to change default domain of an iommu group

2020-07-22 Thread Joerg Roedel
On Tue, Jul 14, 2020 at 06:23:54PM +, Prakhya, Sai Praneeth wrote: > Q1: > > Presently, iommu_change_dev_def_domain() checks if the iommu group still has > > only one device or not. Hence, checking if iommu group has one device or > > not is > > done twice, once before taking device_lock() and

RE: [PATCH V4 1/3] iommu: Add support to change default domain of an iommu group

2020-07-14 Thread Prakhya, Sai Praneeth
; Prakhya, Sai Praneeth > Sent: Tuesday, June 30, 2020 8:04 PM > To: Joerg Roedel > Cc: Raj, Ashok ; Will Deacon ; > iommu@lists.linux-foundation.org; Robin Murphy ; > Christoph Hellwig > Subject: RE: [PATCH V4 1/3] iommu: Add support to change default domain of > an iommu group

RE: [PATCH V4 1/3] iommu: Add support to change default domain of an iommu group

2020-06-30 Thread Prakhya, Sai Praneeth
n > Subject: Re: [PATCH V4 1/3] iommu: Add support to change default domain of > an iommu group > > On Thu, Jun 04, 2020 at 06:32:06PM -0700, Sai Praneeth Prakhya wrote: > > +static int iommu_change_dev_def_domain(struct iommu_group *group, int > > +type) { > > + stru

Re: [PATCH V4 1/3] iommu: Add support to change default domain of an iommu group

2020-06-30 Thread Joerg Roedel
On Thu, Jun 04, 2020 at 06:32:06PM -0700, Sai Praneeth Prakhya wrote: > +static int iommu_change_dev_def_domain(struct iommu_group *group, int type) > +{ > + struct iommu_domain *prev_dom; > + struct group_device *grp_dev; > + const struct iommu_ops *ops; > + int ret, dev_def_dom; >

Re: [PATCH V4 1/3] iommu: Add support to change default domain of an iommu group

2020-06-07 Thread Lu Baolu
On 6/5/20 9:32 AM, Sai Praneeth Prakhya 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 (also known as pass_through) mode or the device would be in DMA mode as long as the mac