qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] intel_iommu: make sure its init before PCI dev


From: Peter Xu
Subject: Re: [Qemu-devel] [PATCH] intel_iommu: make sure its init before PCI dev
Date: Thu, 23 Feb 2017 10:35:29 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Wed, Feb 22, 2017 at 08:37:32AM -0500, Jintack Lim wrote:
> On Wed, Feb 22, 2017 at 6:42 AM, Jintack Lim <address@hidden>
> wrote:
> 
> >
> >
> > On Wed, Feb 22, 2017 at 12:49 AM, Peter Xu <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]