kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question on guest enable msi fail when using GICv4/4.1
@ 2021-05-07  5:57 Shaokun Zhang
  2021-05-07  9:03 ` Marc Zyngier
  0 siblings, 1 reply; 11+ messages in thread
From: Shaokun Zhang @ 2021-05-07  5:57 UTC (permalink / raw)
  To: kvmarm, linux-arm-kernel, kvm, linux-pci
  Cc: Marc Zyngier, Alex Williamson, Cornelia Huck, Nianyao Tang,
	Bjorn Helgaas

[This letter comes from Nianyao Tang]

Hi,

Using GICv4/4.1 and msi capability, guest vf driver requires 3 vectors and enable msi, will lead to
guest stuck. Qemu gets number of interrupts from Multiple Message Capable field set by guest. This
field is aligned to a power of 2(if a function requires 3 vectors, it initializes it to 2).
However, guest driver just sends 3 mapi-cmd to vits and 3 ite entries is recorded in host.
Vfio initializes msi interrupts using the number of interrupts 4 provide by qemu.
When it comes to the 4th msi without ite in vits, in irq_bypass_register_producer, producer
and consumer will __connect fail, due to find_ite fail, and do not resume guest.

Do we support this case, Guest function using msi interrupts number not aligned to a power of 2?
Or qemu should provide correct msi interrupts number?

Thanks,
Shaokun

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

end of thread, other threads:[~2021-05-10  9:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-07  5:57 Question on guest enable msi fail when using GICv4/4.1 Shaokun Zhang
2021-05-07  9:03 ` Marc Zyngier
2021-05-07  9:58   ` Shaokun Zhang
2021-05-07 11:02     ` Marc Zyngier
     [not found]       ` <874kfepht4.wl-maz@kernel.org>
2021-05-08  1:51         ` Jason Wang
2021-05-08  6:56           ` Zhu, Lingshan
2021-05-08  9:15           ` Marc Zyngier
2021-05-09 17:00       ` Auger Eric
2021-05-10  7:49         ` Marc Zyngier
2021-05-10  8:29           ` Auger Eric
2021-05-10  9:59             ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).