From: Joerg Roedel <joro@8bytes.org>
To: Wan Zongshun <vw@iommu.org>
Cc: iommu@lists.linux-foundation.org, Joerg Roedel <jroedel@suse.de>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] iommu/amd: Fix unity mapping initialization race
Date: Mon, 11 Jul 2016 11:39:07 +0200 [thread overview]
Message-ID: <20160711093907.GD12639@8bytes.org> (raw)
In-Reply-To: <57836609.5060406@iommu.org>
On Mon, Jul 11, 2016 at 05:25:29PM +0800, Wan Zongshun wrote:
> Okay, this patch should also better to general case not only unity-mapping.
>
> How about the interrupt remap function? Do we need same considering
> for IV bit enable for interrupt remap?
No, there are no unity mappings for irqs, so we are not running into the
same race here.
> Sorry, why you still say this 'init_device_table_dma' can block DMA?
> I just think this function will enable DMA transfer, since we set
> the V and TV bits, right? or I misunderstand what "block DMA" mean?
When the V and TV bits are not set, it means that all DMA from that
device-id is forwared untranslated by the IOMMU. But if we set V and TV
it means that there is translation information, and the IOMMU translates
the requests using the rest of the DTE information. As all other bits
are 0, this means that page-table-level is 0 (== no page-table) and that
the global IW and IR bits are 0 too (== no read and write permissions).
So all requests are blocked.
Joerg
next prev parent reply other threads:[~2016-07-11 9:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-06 16:00 [PATCH] iommu/amd: Fix unity mapping initialization race Joerg Roedel
[not found] ` <1467820838-5059-1-git-send-email-joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2016-07-10 11:40 ` Wan Zongshun
[not found] ` <57823445.1020808-6ukY98dZOFrYtjvyW6yDsg@public.gmane.org>
2016-07-11 7:19 ` Joerg Roedel
2016-07-11 9:25 ` Wan Zongshun
2016-07-11 9:39 ` Joerg Roedel [this message]
2016-07-11 10:05 ` Wan ZongShun
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=20160711093907.GD12639@8bytes.org \
--to=joro@8bytes.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jroedel@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=vw@iommu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).