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

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" ? > > > >

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 > > >

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

2019-11-08 Thread Lu Baolu
Hi, On 11/9/19 6:28 AM, Deepa Dinamani wrote: + x86_platform.iommu_shutdown = intel_iommu_shutdown; How about moving it to detect_intel_iommu() in drivers/iommu/dmar.c? And Ok, makes sense to move it along with the init handler. make sure that it's included with CONFIG_X86_64. You

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

2019-11-08 Thread Deepa Dinamani
> > > 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" ? > > Yes, I think so. Thanks! Are these changes

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

2019-11-08 Thread Deepa Dinamani
> > + x86_platform.iommu_shutdown = intel_iommu_shutdown; > > How about moving it to detect_intel_iommu() in drivers/iommu/dmar.c? And Ok, makes sense to move it along with the init handler. > make sure that it's included with CONFIG_X86_64. You mean CONFIG_X86 like the init that is already

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

2019-11-08 Thread Zeng, Jason
> -Original Message- > From: David Woodhouse > Sent: Friday, November 8, 2019 3:54 PM > To: Deepa Dinamani ; j...@8bytes.org; linux- > ker...@vger.kernel.org > Cc: iommu@lists.linux-foundation.org; Zeng, Jason ; > Tian, Kevin > Subject: Re: [PATCH] intel-iomm

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

2019-11-08 Thread Zeng, Jason
> > ker...@vger.kernel.org > > > Cc: iommu@lists.linux-foundation.org; Zeng, Jason > ; > > > Tian, Kevin > > > Subject: Re: [PATCH] intel-iommu: Turn off translations at shutdown > > > > > > On Thu, 2019-11-07 at 12:59 -0800, Deepa Dinam

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

2019-11-08 Thread David Woodhouse
undation.org; Zeng, Jason ; > > Tian, Kevin > > Subject: Re: [PATCH] intel-iommu: Turn off translations at shutdown > > > > On Thu, 2019-11-07 at 12:59 -0800, Deepa Dinamani wrote: > > > The intel-iommu driver assumes that the iommu state is > > > cleaned up

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

2019-11-07 Thread David Woodhouse
On Thu, 2019-11-07 at 12:59 -0800, 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

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

2019-11-07 Thread Lu Baolu
Hi, On 11/8/19 5:27 AM, Deepa Dinamani wrote: On Thu, Nov 7, 2019 at 12:59 PM Deepa Dinamani wrote: +static void intel_iommu_shutdown(void) + if (no_iommu || dmar_disabled) + return; This check is actually not required here, as the handler is only installed after these

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

2019-11-07 Thread Lu Baolu
Hi, On 11/8/19 4:59 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] intel-iommu: Turn off translations at shutdown

2019-11-07 Thread Deepa Dinamani
On Thu, Nov 7, 2019 at 12:59 PM Deepa Dinamani wrote: > +static void intel_iommu_shutdown(void) > + if (no_iommu || dmar_disabled) > + return; This check is actually not required here, as the handler is only installed after these have been checked in intel_iommu_init. I can