Re: [PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-10 Thread Lu Baolu
Hi, On 11/11/19 10:58 AM, Qian Cai wrote: On Nov 8, 2019, at 10:43 PM, Lu Baolu wrote: +config INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON +prompt "Enable Intel IOMMU scalable mode by default" +depends on INTEL_IOMMU +help + Selecting this option will enable the scalable mode if +

Re: [PATCH v2] iommu/vt-d: Turn off translations at shutdown

2019-11-10 Thread Lu Baolu
Hi, On 11/11/19 11:21 AM, Deepa Dinamani wrote: On Sun, Nov 10, 2019 at 5:35 PM Lu Baolu wrote: Hi, On 11/11/19 1:27 AM, Deepa Dinamani wrote: The intel-iommu driver assumes that the iommu state is cleaned up at the start of the new kernel. But, when we try to kexec boot something other tha

Re: [PATCH v2] iommu/vt-d: Turn off translations at shutdown

2019-11-10 Thread Lu Baolu
Hi, On 11/11/19 1:27 AM, Deepa Dinamani wrote: The intel-iommu driver assumes that the iommu state is cleaned up at the start of the new kernel. But, when we try to kexec boot something other than the Linux kernel, the cleanup cannot be relied upon. Hence, cleanup before we go down for reboot.

Re: [PATCH v2] iommu/vt-d: Turn off translations at shutdown

2019-11-10 Thread Deepa Dinamani
On Sun, Nov 10, 2019 at 5:35 PM Lu Baolu wrote: > > Hi, > > On 11/11/19 1:27 AM, Deepa Dinamani wrote: > > The intel-iommu driver assumes that the iommu state is > > cleaned up at the start of the new kernel. > > But, when we try to kexec boot something other than the > > Linux kernel, the cleanup

Re: [PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-10 Thread Qian Cai
> On Nov 8, 2019, at 10:43 PM, Lu Baolu wrote: > > +config INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON > +prompt "Enable Intel IOMMU scalable mode by default" > +depends on INTEL_IOMMU > +help > + Selecting this option will enable the scalable mode if > + hardware presents the c

RE: [PATCH] intel-iommu: Turn off translations at shutdown

2019-11-10 Thread Zeng, Jason
> -Original Message- > On Sun, Nov 10, 2019 at 10:24 AM Deepa Dinamani > > I've posted the v2 without the conditional for now: > > https://lore.kernel.org/patchwork/patch/1151225/ > > > > As a side topic, I'm trying to support https://www.linuxboot.org/. I > > have a couple of more such c

Re: [PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-10 Thread Lu Baolu
Hi, On 11/11/19 10:00 AM, Qian Cai wrote: On Nov 10, 2019, at 8:30 PM, Lu Baolu wrote: How about "pasid based multiple stages DMA translation"? It is better but I am still not sure how developers should select it or not when asking. Ideally, should it mention pros and cons of this? At mi

Re: [PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-10 Thread Qian Cai
> On Nov 10, 2019, at 8:30 PM, Lu Baolu wrote: > > How about "pasid based multiple stages DMA translation"? It is better but I am still not sure how developers should select it or not when asking. Ideally, should it mention pros and cons of this? At minimal, there should be a line said “if n

Re: [PATCH v2] iommu/vt-d: Turn off translations at shutdown

2019-11-10 Thread Lu Baolu
Hi, On 11/11/19 1:27 AM, Deepa Dinamani wrote: The intel-iommu driver assumes that the iommu state is cleaned up at the start of the new kernel. But, when we try to kexec boot something other than the Linux kernel, the cleanup cannot be relied upon. Hence, cleanup before we go down for reboot.

Re: [PATCH v2 1/1] iommu/vt-d: Add Kconfig option to enable/disable scalable mode

2019-11-10 Thread Lu Baolu
Hi, On 11/9/19 11:59 AM, Qian Cai wrote: On Nov 8, 2019, at 10:40 PM, Lu Baolu wrote: This adds Kconfig option INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON to make it easier for distributions to enable or disable the Intel IOMMU scalable mode by default during kernel build. Signed-off-by: Lu Baolu

RE: [PATCH] intel-iommu: Turn off translations at shutdown

2019-11-10 Thread Zeng, Jason
> -Original Message- > > > > For VMM live update case, we should be able to detect and bypass > > > > the shutdown that Deepa introduced here, so keep IOMMU still > operating? > > > > > > Is that a 'yes' to Deepa's "if someone wants to make it conditional, > > > we can do that" ? > > > > Ye

Re: [PATCH] intel-iommu: Turn off translations at shutdown

2019-11-10 Thread Deepa Dinamani
On Sun, Nov 10, 2019 at 10:24 AM Deepa Dinamani wrote: > > On Fri, Nov 8, 2019 at 2:48 PM Deepa Dinamani wrote: > > > > > > > For VMM live update case, we should be able to detect and bypass > > > > > the shutdown that Deepa introduced here, so keep IOMMU still > > > > > operating? > > > > > > >

Re: [PATCH] intel-iommu: Turn off translations at shutdown

2019-11-10 Thread Deepa Dinamani
On Fri, Nov 8, 2019 at 2:48 PM Deepa Dinamani wrote: > > > > > For VMM live update case, we should be able to detect and bypass > > > > the shutdown that Deepa introduced here, so keep IOMMU still operating? > > > > > > Is that a 'yes' to Deepa's "if someone wants to make it conditional, we > > >

[PATCH v2] iommu/vt-d: Turn off translations at shutdown

2019-11-10 Thread Deepa Dinamani
The intel-iommu driver assumes that the iommu state is cleaned up at the start of the new kernel. But, when we try to kexec boot something other than the Linux kernel, the cleanup cannot be relied upon. Hence, cleanup before we go down for reboot. Keeping the cleanup at initialization also, in cas