From: Peter Xu <peterx@redhat.com>
To: Jintack Lim <jintack@cs.columbia.edu>
Cc: QEMU Devel Mailing List <qemu-devel@nongnu.org>,
Alex Williamson <alex.williamson@redhat.com>,
yi.l.liu@intel.com, "\\ Michael S . Tsirkin \\" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] intel_iommu: make sure its init before PCI dev
Date: Thu, 23 Feb 2017 10:35:29 +0800 [thread overview]
Message-ID: <20170223023529.GA4015@pxdev.xzpeter.org> (raw)
In-Reply-To: <CAHyh4xjELha5V5n+dLwmQsoJ=kfahiZsamo7WEEfMtRgXvRsbw@mail.gmail.com>
On Wed, Feb 22, 2017 at 08:37:32AM -0500, Jintack Lim wrote:
> On Wed, Feb 22, 2017 at 6:42 AM, Jintack Lim <jintack@cs.columbia.edu>
> wrote:
>
> >
> >
> > On Wed, Feb 22, 2017 at 12:49 AM, Peter Xu <peterx@redhat.com> wrote:
> >
> >> Intel vIOMMU devices are created with "-device" parameter, while here
> >> actually we need to make sure this device will be created before some
> >> other PCI devices (like vfio-pci devices) so that we know iommu_fn will
> >> be setup correctly before realizations of those PCI devices.
> >>
> >> Here we do explicit check to make sure intel-iommu device will be inited
> >> before all the rest of the PCI devices. This is done by checking against
> >> the devices dangled under current root PCIe bus and we should see
> >> nothing there besides integrated ICH9 ones.
> >>
> >> If the user violated this rule, we abort the program.
> >>
> >
> > Hi Peter,
> >
> > After applying this patch, qemu gave the following error and was
> > terminated, but I believe I passed parameters in a right order?
> >
>
> FYI, I've applied this patch to your vtd-vfio-enablement-v7 branch.
I think the problem is that I was always testing with "-nodefaults",
while that's not your case... And without "-nodefaults" we'll have
these two devices created before all the rest:
00:01.0 VGA compatible controller: Device 1234:1111 (rev 02)
00:02.0 Ethernet controller: Intel Corporation 82540EM Gigabit Ethernet Controller (rev 03)
So Intel vIOMMU complaint. :(
Thanks for the report! I'll think of something better and prepare
another version.
-- peterx
next prev parent reply other threads:[~2017-02-23 2:35 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-22 5:49 [Qemu-devel] [PATCH] intel_iommu: make sure its init before PCI dev Peter Xu
2017-02-22 11:42 ` Jintack Lim
2017-02-22 13:37 ` Jintack Lim
2017-02-23 2:35 ` Peter Xu [this message]
2017-02-22 17:30 ` Alex Williamson
2017-02-23 3:06 ` Peter Xu
2017-02-23 3:24 ` Alex Williamson
2017-02-23 5:42 ` Peter Xu
2017-02-23 23:26 ` Michael S. Tsirkin
2017-02-23 8:10 ` Marcel Apfelbaum
2017-02-23 8:16 ` Peter Xu
2017-02-23 12:02 ` Marcel Apfelbaum
2017-02-23 15:35 ` Alex Williamson
2017-02-28 14:37 ` Marcel Apfelbaum
2017-03-09 12:31 ` Paolo Bonzini
2017-03-09 15:29 ` Michael S. Tsirkin
2017-03-09 15:34 ` Paolo Bonzini
2017-02-23 23:21 ` Michael S. Tsirkin
2017-02-24 2:45 ` Peter Xu
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=20170223023529.GA4015@pxdev.xzpeter.org \
--to=peterx@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=jintack@cs.columbia.edu \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=yi.l.liu@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 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.