kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] irqbypass/kvm: Silence registration errors
@ 2016-05-05 17:58 Alex Williamson
  2016-05-05 17:58 ` [PATCH 1/2] irqbypass: Disallow NULL token Alex Williamson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Alex Williamson @ 2016-05-05 17:58 UTC (permalink / raw)
  To: kvm; +Cc: pbonzini, feng.wu, linux-kernel, eric.auger

Currently an AMD system using vfio-pci/kvm will issue a dev_info() for
every MSI/X vector registered because kvm_x86_ops does not support a
bypass mechanism except on Intel and the add_producer callback returns
an errno for that.  This is meaningless, unintended, and confuses
users.  We could simply have KVM's add_producer callback return 0 if
there's no bypass mechanism, but then why are we registering as an IRQ
bypass consumer in the first place?  We also don't necessarily want to
simply remove the dev_info/pr_info on registration failure because
then we have no warning if something does actually go wrong.  So
instead, let's conditionalize IRQ bypass registration on whether we
have any support for it, and to keep the de-registration path clean
and fill an unintended gap, let's ignore deregistration of NULL tokens
and prevent registration of the same.  NULL isn't a good, unique
cookie anyway.  Tested on AMD and non-PI Intel.  Thanks,

Alex

---

Alex Williamson (2):
      irqbypass: Disallow NULL token
      kvm: Conditionally register IRQ bypass consumer


 arch/x86/kvm/x86.c        |   19 ++++++++-----------
 include/linux/irqbypass.h |    4 ++--
 include/linux/kvm_host.h  |    1 +
 virt/kvm/eventfd.c        |   18 ++++++++++--------
 virt/lib/irqbypass.c      |   12 +++++++++++-
 5 files changed, 32 insertions(+), 22 deletions(-)

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

end of thread, other threads:[~2016-05-11 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-05 17:58 [PATCH 0/2] irqbypass/kvm: Silence registration errors Alex Williamson
2016-05-05 17:58 ` [PATCH 1/2] irqbypass: Disallow NULL token Alex Williamson
2016-05-05 17:58 ` [PATCH 2/2] kvm: Conditionally register IRQ bypass consumer Alex Williamson
2016-05-11 14:49 ` [PATCH 0/2] irqbypass/kvm: Silence registration errors Paolo Bonzini

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).