All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] vfio-pci: Support INTx mode re-enabling
@ 2019-04-08  1:27 ` Leo Yan
  0 siblings, 0 replies; 13+ messages in thread
From: Leo Yan @ 2019-04-08  1:27 UTC (permalink / raw)
  To: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Will Deacon,
	Jean-Philippe Brucker, Marc Zyngier, Eric Auger, Robin Murphy
  Cc: Leo Yan

When enable vfio-pci mode for NIC driver on Juno board, the IRQ is
failed to forward properly from host to guest, finally root caused this
issue is related with kvmtool cannot re-enable INTx mode properly.

So the basic working flow to reproduce this issue is as below:

    Host             Guest
-------------  --------------------
  INTx mode
                 MSI enable failed in NIC driver
                 MSI disable in NIC driver
                 Switch back to INTx mode --> kvmtool doesn't support

So this patch is to support INTx mode re-enabling; patch 0001 is one
minor fixing up for eventfd releasing; patch 0002 introduces a new
function vfio_pci_init_intx() which is used to finish INTx one-time
initialisation; patch 0003 is the core patch for support INTx mode
re-enabling, when kvmtool detects MSI is disabled it rollbacks to INTx
mode.

This patch set has been tested on Juno-r2 board.

== Changes for V4 ==
* Removed the unnecessary comments in patch 0003 (Jean-Philippe).
* Added Jean-Philippe's review tags.

== Changes for V3 ==
* Add new function vfio_pci_init_intx() for one-time initialisation.
* Simplized INTx re-enabling (don't change irq_line anymore at the
  runtime).


Leo Yan (3):
  vfio-pci: Release INTx's unmask eventfd properly
  vfio-pci: Add new function for INTx one-time initialisation
  vfio-pci: Re-enable INTx mode when disable MSI/MSIX

 include/kvm/vfio.h |  1 +
 vfio/pci.c         | 95 ++++++++++++++++++++++++++++++----------------
 2 files changed, 64 insertions(+), 32 deletions(-)

-- 
2.19.1

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

end of thread, other threads:[~2019-04-25 14:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-08  1:27 [PATCH v4 0/3] vfio-pci: Support INTx mode re-enabling Leo Yan
2019-04-08  1:27 ` Leo Yan
2019-04-08  1:27 ` [PATCH v4 1/3] vfio-pci: Release INTx's unmask eventfd properly Leo Yan
2019-04-08  1:27   ` Leo Yan
2019-04-08  1:27 ` [PATCH v4 2/3] vfio-pci: Add new function for INTx one-time initialisation Leo Yan
2019-04-08  1:27   ` Leo Yan
2019-04-08  1:27 ` [PATCH v4 3/3] vfio-pci: Re-enable INTx mode when disable MSI/MSIX Leo Yan
2019-04-08  1:27   ` Leo Yan
2019-04-24 14:21 ` [PATCH v4 0/3] vfio-pci: Support INTx mode re-enabling Leo Yan
2019-04-24 14:21   ` Leo Yan
2019-04-25 14:03   ` Will Deacon
2019-04-25 14:03     ` Will Deacon
2019-04-25 14:03     ` Will Deacon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.