public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Joerg Roedel <joerg.roedel@amd.com>
Cc: "Han, Weidong" <weidong.han@intel.com>,
	"'iommu@lists.linux-foundation.org'"
	<iommu@lists.linux-foundation.org>, 'Avi Kivity' <avi@redhat.com>,
	'kvm' <kvm@vger.kernel.org>
Subject: Re: [PATCH] VT-d: fix PCI device detach from virtual machine
Date: Tue, 15 Jun 2010 15:52:40 +0100	[thread overview]
Message-ID: <1276613560.2406.14.camel@macbook.infradead.org> (raw)
In-Reply-To: <20100615141023.GA15264@amd.com>

On Tue, 2010-06-15 at 16:10 +0200, Joerg Roedel wrote:
> On Mon, Jun 14, 2010 at 07:19:17PM -0400, David Woodhouse wrote:
> > Why not just jump straight to the 'DMA proxy' device, and use that
> > _only_?
> 
> Not sure about Intel chipsets, but on AMD chipset a legacy device can be
> seen by the IOMMU with both device-ids, its own and the bridge device.
> So the domain needs to be configured for both device-ids in the iommu
> driver.

'can be seen with both' sounds odd to me... you mean that depending on
the phase of the moon, it may show up with one or the other on the
_same_ hardware? Or is your IOMMU sufficiently different that you
actually mean both ids are present at the same time for mapping
purposes?

Or do you just mean that you can't always tell which it'll be, so if
there's a _possibility_ that an upstream bridge will act as a proxy, you
map both of them so that you don't have to worry about false positives
in your "is there a proxy?" algorithm?

That approach may make a lot of sense -- but still I don't see why we'd
set up the mapping for _every_ PCI bridge from the device up to the
suspected proxy... unless we're _really_ unsure about where the
transactions will appear to come from, perhaps?

Have you encountered these Ricoh multi-function devices and observed
them doing DMA transactions from function zero regardless of which
function is actually responsible for it:
03:00.0 SD Host controller: Ricoh Co Ltd Device e822 (rev 03)
03:00.4 FireWire (IEEE 1394): Ricoh Co Ltd Device e832 (rev 03)

Do we need to share a 'quirks' infrastructure for handling such devices?

-- 
dwmw2


  reply	other threads:[~2010-06-15 14:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-26  9:31 [PATCH] VT-d: fix PCI device detach from virtual machine Han, Weidong
2010-06-14 23:19 ` David Woodhouse
2010-06-15 14:10   ` Joerg Roedel
2010-06-15 14:52     ` David Woodhouse [this message]
2010-06-17  3:35   ` Weidong Han
2010-06-17  8:49     ` David Woodhouse
2010-06-17  9:15       ` Weidong Han

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=1276613560.2406.14.camel@macbook.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=avi@redhat.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joerg.roedel@amd.com \
    --cc=kvm@vger.kernel.org \
    --cc=weidong.han@intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox