public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* PCI/kernel msi code vs GIC ITS driver conflict?
@ 2019-09-03 14:09 John Garry
  2019-09-03 16:16 ` Marc Zyngier
  2019-09-06 11:08 ` [tip: irq/core] irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices tip-bot2 for Marc Zyngier
  0 siblings, 2 replies; 16+ messages in thread
From: John Garry @ 2019-09-03 14:09 UTC (permalink / raw)
  To: Marc Zyngier, Thomas Gleixner, Bjorn Helgaas
  Cc: Linux PCI, Linuxarm, luojiaxing@huawei.com,
	linux-kernel@vger.kernel.org

Hi Marc, Bjorn, Thomas,

We've come across a conflict with the kernel/pci msi code and GIC ITS 
driver on our arm64 system, whereby we can't unbind and re-bind a PCI 
device driver under special conditions. I'll explain...

Our PCI device support 32 MSIs. The driver attempts to allocate msi 
vectors with min msi=17, max msi = 32, and affd.pre vectors = 16. For 
our test we make nr_cpus = 1 (just anything less than 16).

We find that the pci/kernel msi code gives us 17 vectors, but the GIC 
ITS code reserves 32 lpi maps in its_irq_domain_alloc(). The problem 
then occurs when unbinding the driver in its_irq_domain_free() call, 
where we only clear bits for 17 vectors. So if we unbind the driver and 
then attempt to bind again, it fails.

Where the fault lies, I can't say. Maybe the kernel msi code should 
always give power of 2 vectors - as I understand, the PCI spec mandates 
this. Or maybe the GIC ITS driver has a problem in the free path, as 
above. Or maybe the PCI driver should not be allowed to request !power 
of 2 min/max vectors.

Opinion?

Thanks in advance,
John


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-09-06 11:10 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-03 14:09 PCI/kernel msi code vs GIC ITS driver conflict? John Garry
2019-09-03 16:16 ` Marc Zyngier
2019-09-04  8:56   ` John Garry
2019-09-04 10:25     ` Andrew Murray
2019-09-05  8:38       ` Marc Zyngier
2019-09-05  9:39         ` John Garry
2019-09-05 10:02           ` Marc Zyngier
2019-09-05 10:35             ` John Garry
2019-09-05 11:22               ` Marc Zyngier
2019-09-05 13:26                 ` John Garry
2019-09-05 13:50                   ` Marc Zyngier
2019-09-05 14:23                     ` John Garry
2019-09-05 14:32                       ` Marc Zyngier
2019-09-05 14:53                         ` John Garry
2019-09-05 15:09                           ` Marc Zyngier
2019-09-06 11:08 ` [tip: irq/core] irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices tip-bot2 for Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox