All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joro@8bytes.org>
To: Takao Indoh <indou.takao@jp.fujitsu.com>
Cc: kexec@lists.infradead.org, iommu@lists.linux-foundation.org,
	dwmw2@infradead.org, linux-kernel@vger.kernel.org,
	wei@aristanetworks.com
Subject: Re: [PATCH v2] intel-iommu: Disable translation if already enabled
Date: Tue, 23 Apr 2013 14:49:27 +0200	[thread overview]
Message-ID: <20130423124926.GC2589@8bytes.org> (raw)
In-Reply-To: <1366706103-2640-1-git-send-email-indou.takao@jp.fujitsu.com>

On Tue, Apr 23, 2013 at 05:35:03PM +0900, Takao Indoh wrote:
> This patch disables translation(dma-remapping) before its initialization
> if it is already enabled.
> 
> This is needed for kexec/kdump boot. If dma-remapping is enabled in the
> first kernel, it need to be disabled before initializing its page table
> during second kernel boot. Wei Hu also reported that this is needed
> when second kernel boots with intel_iommu=off.
> 
> Basically iommu->gcmd is used to know whether translation is enabled or
> disabled, but it is always zero at boot time even when translation is
> enabled since iommu->gcmd is initialized without considering such a
> case. Therefor this patch synchronizes iommu->gcmd value with global
> command register when iommu structure is allocated.
> 
> Changelog:
> v2:
> - Change subject and patch description
> - Disable translation after dmar_table_init() so that it works when
>   intel_iommu=off is specified.
> 
> v1:
> https://lkml.org/lkml/2013/3/20/707
> 
> Signed-off-by: Takao Indoh <indou.takao@jp.fujitsu.com>
> ---
>  drivers/iommu/dmar.c        |   11 ++++++++++-
>  drivers/iommu/intel-iommu.c |   15 +++++++++++++++
>  2 files changed, 25 insertions(+), 1 deletions(-)

Looks good to me, applied to x86/vt-d, thanks Takao.



_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
To: Takao Indoh <indou.takao-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
Cc: kexec-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
	dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	wei-BGArkANP9klv6pq1l3V1OdBPR1lH4CV8@public.gmane.org
Subject: Re: [PATCH v2] intel-iommu: Disable translation if already enabled
Date: Tue, 23 Apr 2013 14:49:27 +0200	[thread overview]
Message-ID: <20130423124926.GC2589@8bytes.org> (raw)
In-Reply-To: <1366706103-2640-1-git-send-email-indou.takao-+CUm20s59erQFUHtdCDX3A@public.gmane.org>

On Tue, Apr 23, 2013 at 05:35:03PM +0900, Takao Indoh wrote:
> This patch disables translation(dma-remapping) before its initialization
> if it is already enabled.
> 
> This is needed for kexec/kdump boot. If dma-remapping is enabled in the
> first kernel, it need to be disabled before initializing its page table
> during second kernel boot. Wei Hu also reported that this is needed
> when second kernel boots with intel_iommu=off.
> 
> Basically iommu->gcmd is used to know whether translation is enabled or
> disabled, but it is always zero at boot time even when translation is
> enabled since iommu->gcmd is initialized without considering such a
> case. Therefor this patch synchronizes iommu->gcmd value with global
> command register when iommu structure is allocated.
> 
> Changelog:
> v2:
> - Change subject and patch description
> - Disable translation after dmar_table_init() so that it works when
>   intel_iommu=off is specified.
> 
> v1:
> https://lkml.org/lkml/2013/3/20/707
> 
> Signed-off-by: Takao Indoh <indou.takao-+CUm20s59erQFUHtdCDX3A@public.gmane.org>
> ---
>  drivers/iommu/dmar.c        |   11 ++++++++++-
>  drivers/iommu/intel-iommu.c |   15 +++++++++++++++
>  2 files changed, 25 insertions(+), 1 deletions(-)

Looks good to me, applied to x86/vt-d, thanks Takao.

WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joro@8bytes.org>
To: Takao Indoh <indou.takao@jp.fujitsu.com>
Cc: linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
	dwmw2@infradead.org, kexec@lists.infradead.org,
	wei@aristanetworks.com
Subject: Re: [PATCH v2] intel-iommu: Disable translation if already enabled
Date: Tue, 23 Apr 2013 14:49:27 +0200	[thread overview]
Message-ID: <20130423124926.GC2589@8bytes.org> (raw)
In-Reply-To: <1366706103-2640-1-git-send-email-indou.takao@jp.fujitsu.com>

On Tue, Apr 23, 2013 at 05:35:03PM +0900, Takao Indoh wrote:
> This patch disables translation(dma-remapping) before its initialization
> if it is already enabled.
> 
> This is needed for kexec/kdump boot. If dma-remapping is enabled in the
> first kernel, it need to be disabled before initializing its page table
> during second kernel boot. Wei Hu also reported that this is needed
> when second kernel boots with intel_iommu=off.
> 
> Basically iommu->gcmd is used to know whether translation is enabled or
> disabled, but it is always zero at boot time even when translation is
> enabled since iommu->gcmd is initialized without considering such a
> case. Therefor this patch synchronizes iommu->gcmd value with global
> command register when iommu structure is allocated.
> 
> Changelog:
> v2:
> - Change subject and patch description
> - Disable translation after dmar_table_init() so that it works when
>   intel_iommu=off is specified.
> 
> v1:
> https://lkml.org/lkml/2013/3/20/707
> 
> Signed-off-by: Takao Indoh <indou.takao@jp.fujitsu.com>
> ---
>  drivers/iommu/dmar.c        |   11 ++++++++++-
>  drivers/iommu/intel-iommu.c |   15 +++++++++++++++
>  2 files changed, 25 insertions(+), 1 deletions(-)

Looks good to me, applied to x86/vt-d, thanks Takao.



  reply	other threads:[~2013-04-23 12:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23  8:35 [PATCH v2] intel-iommu: Disable translation if already enabled Takao Indoh
2013-04-23  8:35 ` Takao Indoh
2013-04-23  8:35 ` Takao Indoh
2013-04-23 12:49 ` Joerg Roedel [this message]
2013-04-23 12:49   ` Joerg Roedel
2013-04-23 12:49   ` Joerg Roedel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130423124926.GC2589@8bytes.org \
    --to=joro@8bytes.org \
    --cc=dwmw2@infradead.org \
    --cc=indou.takao@jp.fujitsu.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wei@aristanetworks.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.