Re: [PATCH v8 06/13] iommu/amd: copy old trans table from old kernel

2017-07-28 Thread Baoquan He
On 07/27/17 at 05:38pm, Joerg Roedel wrote: > On Fri, Jul 21, 2017 at 04:59:04PM +0800, Baoquan He wrote: > > @@ -2128,9 +2131,43 @@ static void early_enable_iommu(struct amd_iommu > > *iommu) > > static void early_enable_iommus(void) > > { > > struct amd_iommu *iommu; > > + bool

Re: [PATCH v8 06/13] iommu/amd: copy old trans table from old kernel

2017-07-28 Thread Baoquan He
On 07/27/17 at 05:38pm, Joerg Roedel wrote: > On Fri, Jul 21, 2017 at 04:59:04PM +0800, Baoquan He wrote: > > @@ -2128,9 +2131,43 @@ static void early_enable_iommu(struct amd_iommu > > *iommu) > > static void early_enable_iommus(void) > > { > > struct amd_iommu *iommu; > > + bool

Re: [PATCH v8 06/13] iommu/amd: copy old trans table from old kernel

2017-07-27 Thread Joerg Roedel
On Fri, Jul 21, 2017 at 04:59:04PM +0800, Baoquan He wrote: > @@ -2128,9 +2131,43 @@ static void early_enable_iommu(struct amd_iommu *iommu) > static void early_enable_iommus(void) > { > struct amd_iommu *iommu; > + bool is_pre_enabled = false; > > - for_each_iommu(iommu) > -

Re: [PATCH v8 06/13] iommu/amd: copy old trans table from old kernel

2017-07-27 Thread Joerg Roedel
On Fri, Jul 21, 2017 at 04:59:04PM +0800, Baoquan He wrote: > @@ -2128,9 +2131,43 @@ static void early_enable_iommu(struct amd_iommu *iommu) > static void early_enable_iommus(void) > { > struct amd_iommu *iommu; > + bool is_pre_enabled = false; > > - for_each_iommu(iommu) > -

[PATCH v8 06/13] iommu/amd: copy old trans table from old kernel

2017-07-21 Thread Baoquan He
Here several things need be done: - If iommu is pre-enabled in a normal kernel, just disable it and print warning. - If failed to copy dev table of old kernel, continue to proceed as it does in normal kernel. - Disable and Re-enable event/cmd buffer, install the copied DTE table to reg,

[PATCH v8 06/13] iommu/amd: copy old trans table from old kernel

2017-07-21 Thread Baoquan He
Here several things need be done: - If iommu is pre-enabled in a normal kernel, just disable it and print warning. - If failed to copy dev table of old kernel, continue to proceed as it does in normal kernel. - Disable and Re-enable event/cmd buffer, install the copied DTE table to reg,