Re: [PATCH kvmtool v2] vfio: fix multi-MSI vector handling

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

 



On Fri, Apr 24, 2020 at 04:31:19PM +0100, Lorenzo Pieralisi wrote:
> A PCI device with a MSI capability enabling Multiple MSI messages
> (through the Multiple Message Enable field in the Message Control
> register[6:4]) is expected to drive the Message Data lower bits (number
> determined by the number of selected vectors) to generate the
> corresponding MSI messages writes on the PCI bus.
> 
> Therefore, KVM expects the MSI data lower bits (a number of
> bits that depend on bits [6:4] of the Message Control
> register - which in turn control the number of vectors
> allocated) to be set-up by kvmtool while programming the
> MSI IRQ routing entries to make sure the MSI entries can
> actually be demultiplexed by KVM and IRQ routes set-up
> accordingly so that when an actual HW fires KVM can
> route it to the correct entry in the interrupt controller
> (and set-up a correct passthrough route for directly
> injected interrupt).
> 
> Current kvmtool code does not set-up Message data entries
> correctly for multi-MSI vectors - the data field is left
> as programmed in the MSI capability by the guest for all
> vector entries, triggering IRQs misrouting.
> 
> Fix it.
> 
> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>
> Acked-by: Marc Zyngier <maz@xxxxxxxxxx>
> Cc: Will Deacon <will@xxxxxxxxxx>
> Cc: Julien Thierry <julien.thierry.kdev@xxxxxxxxx>
> ---
> v1 -> v2:
> 	- Removed superfluous nr_vectors check
> 	- Added MarcZ ACK
> 	- Added comment

Thanks, pushed out now.

Will



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux