qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking wit


From: Jason Gunthorpe
Subject: Re: [PATCH v2 17/20] vfio/common: Support device dirty page tracking with vIOMMU
Date: Fri, 24 Feb 2023 11:47:28 -0400

On Fri, Feb 24, 2023 at 12:53:26PM +0000, Joao Martins wrote:
> > But reading the code this ::bypass_iommu (new to me) apparently tells that
> > vIOMMU is bypassed or not for the PCI devices all the way to avoiding
> > enumerating in the IVRS/DMAR ACPI tables. And I see VFIO double-checks 
> > whether
> > PCI device is within the IOMMU address space (or bypassed) prior to DMA 
> > maps and
> > such.
> > 
> > You can see from the other email that all of the other options in my head 
> > were
> > either bit inconvenient or risky. I wasn't aware of this option for what is
> > worth -- much simpler, should work!
> >
> 
> I say *should*, but on a second thought interrupt remapping may still be
> required to one of these devices that are IOMMU-bypassed. Say to put 
> affinities
> to vcpus above 255? I was trying this out with more than 255 vcpus with a 
> couple
> VFs and at a first glance these VFs fail to probe (these are CX6
> VFs).

It is pretty bizarre, but the Intel iommu driver is responsible for
installing the interrupt remapping irq driver on the devices.

So if there is no iommu driver bound then there won't be any interrupt
remapping capability for the device even if the interrupt remapping HW
is otherwise setup.

The only reason Avihai is touching this is to try and keep the
interrupt remapping emulation usable, we could certainly punt on that
for now if it looks too ugly.

Jason



reply via email to

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