From: David Woodhouse <dwmw2@infradead.org>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, chrisw@sous-sol.org,
ddutile@redhat.com
Subject: Re: [PATCH] intel-iommu: Default to non-coherent for domains unattached to iommus
Date: Sat, 12 Nov 2011 00:37:47 +0000 [thread overview]
Message-ID: <1321058267.2006.21.camel@shinybook.infradead.org> (raw)
In-Reply-To: <20111111224849.9756.13368.stgit@bling.home>
[-- Attachment #1: Type: text/plain, Size: 1366 bytes --]
On Fri, 2011-11-11 at 15:49 -0700, Alex Williamson wrote:
> To fix this, switch domain_update_iommu_coherency() to use the
> safer, non-coherent default for domains not attached to iommus.
That isn't a fix for the problem you described.
The problem is that changing a domain from coherent to non-coherent is
*broken*. It probably needs to flush the cache for the *entire* set of
page tables — not just the new context entry it adds.
You might have removed the *common* case where we trigger that bug, but
it certainly isn't a fix.
However, I'd be receptive to an argument that the situation you describe
is in fact the *only* time we'd have to switch from coherent to
non-coherent at run time, because the coherency is an all-or-nothing
characteristic of the chipset. Either all the IOMMUs are coherent, or
none of them, right? This brain-damage only affects the first chipsets
from before we worked out that cache incoherency was a *really* f*cking
stupid idea, doesn't it?
So if you were to ditch the whole idea of a per-domain runtime update,
and instead calculate a global value for 'iommu_coherency' at boot time,
by iterating over for_each_active_iommu()¹, I think that would be a
better way to deal with the issue. And you *could* really call that a
'fix'.
Make sense?
--
dwmw2
¹ just in *case* they ever differ
[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 5818 bytes --]
next prev parent reply other threads:[~2011-11-12 0:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-11 22:49 Alex Williamson
2011-11-12 0:17 ` Chris Wright
2011-11-12 0:37 ` David Woodhouse [this message]
2011-11-12 0:45 ` Chris Wright
2011-11-12 0:47 ` Chris Wright
2011-11-12 0:51 ` David Woodhouse
2011-11-12 0:58 ` Chris Wright
2011-11-12 1:03 ` David Woodhouse
2011-11-12 0:46 ` Roland Dreier
2011-11-12 0:51 ` Chris Wright
2011-11-12 0:55 ` David Woodhouse
2011-11-12 1:08 ` Chris Wright
2011-11-12 1:20 ` David Woodhouse
2011-11-15 7:12 ` cody
2011-11-15 4:54 ` Chris Wright
2011-11-15 5:55 ` Kai Huang
2011-11-12 1:30 ` Roland Dreier
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=1321058267.2006.21.camel@shinybook.infradead.org \
--to=dwmw2@infradead.org \
--cc=alex.williamson@redhat.com \
--cc=chrisw@sous-sol.org \
--cc=ddutile@redhat.com \
--cc=iommu@lists.linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.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
all inboxes | Powered by JetHome®