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 16:16:16 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

On Thu, Feb 23, 2017 at 10:10:57AM +0200, Marcel Apfelbaum wrote:
> On 02/23/2017 05:06 AM, Peter Xu wrote:
> >On Wed, Feb 22, 2017 at 10:30:47AM -0700, Alex Williamson wrote:
> >>On Wed, 22 Feb 2017 13:49:25 +0800
> >>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.
> 
> Hi,
> 
> Commit b86eacb8 (hw/pci: delay bus_master_enable_region initialization)
> creates the IOMMU memory region at machine_done time so the
> devices creation order wouldn't matter.
> 
> I don't think we use the iommu_fn before machine_done.
> What have I missed?

Hi, Marcel,

The problem is that vfio-pci will need to fetch the pci address space
during realization (pci_device_iommu_address_space() is called in
vfio_realize()).

Any thoughts? Thanks,

-- peterx



reply via email to

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