On Wed, Feb 22, 2017 at 08:37:32AM -0500, Jintack Lim wrote: > On Wed, Feb 22, 2017 at 6:42 AM, Jintack Lim <jint...@cs.columbia.edu> > wrote: > > > > > > > On Wed, Feb 22, 2017 at 12:49 AM, Peter Xu <pet...@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