RE: [PATCH 3/4] iommu: Add support to change default domain of an iommu_group

2019-09-04 Thread Prakhya, Sai Praneeth
> >>> +free_prev_domain: > >>> + /* > >>> + * Free the existing default domain and replace it with the newly > >>> + * created default domain. No need to set group->domain because > >>> + * __iommu_attach_group() already does it on success. > >>> + */ > >>> + iommu_domain_free(prev_domain); > >

Re: [PATCH 3/4] iommu: Add support to change default domain of an iommu_group

2019-09-03 Thread Lu Baolu
Hi, On 9/4/19 11:09 AM, Prakhya, Sai Praneeth wrote: Hi Joerg, Thanks a lot! for the review. I highly appreciate for sparing your time to review the patch :) On Tue, Aug 20, 2019 at 07:42:25PM -0700, Sai Praneeth Prakhya wrote: + /* +* iommu_domain_alloc() takes "struct bus_ty

RE: [PATCH 3/4] iommu: Add support to change default domain of an iommu_group

2019-09-03 Thread Prakhya, Sai Praneeth
Hi Joerg, Thanks a lot! for the review. I highly appreciate for sparing your time to review the patch :) > On Tue, Aug 20, 2019 at 07:42:25PM -0700, Sai Praneeth Prakhya wrote: > > + /* > > +* iommu_domain_alloc() takes "struct bus_type" as an argument which > is > > +* a member in "st

Re: [PATCH 3/4] iommu: Add support to change default domain of an iommu_group

2019-09-03 Thread Joerg Roedel
On Tue, Aug 20, 2019 at 07:42:25PM -0700, Sai Praneeth Prakhya wrote: > + /* > + * iommu_domain_alloc() takes "struct bus_type" as an argument which is > + * a member in "struct device". Changing a group's default domain type > + * deals at iommu_group level rather than device le

[PATCH 3/4] iommu: Add support to change default domain of an iommu_group

2019-08-20 Thread Sai Praneeth Prakhya
Presently, the default domain of an iommu_group is allocated during boot time (i.e. when a device is being added to a group) and it cannot be changed later. So, the device would typically be either in identity (also known as pass_through) mode (controlled by "iommu=pt" kernel command line argument)