From: Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org
Cc: linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org,
mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org,
tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org
Subject: [PATCH 1/3] PCI/MSI: Initial hook for archs to declare multivector MSI support
Date: Fri, 21 Nov 2014 15:08:33 -0700 [thread overview]
Message-ID: <20141121220833.31095.12371.stgit@gimli.home> (raw)
In-Reply-To: <20141121213752.31095.30735.stgit-GCcqpEzw8uZBDLzU/O5InQ@public.gmane.org>
For the most part multivector MSI is not supported and drivers and
hardware wanting multiple vectors opt for MSI-X instead. It seems
though that having the ability to query the arch/platform code to
determine whether allocating multiple MSI vectors will ever succeed
is a useful thing. For instance, vfio-pci can use this to determine
whether to expose multiple MSI vectors to the user. If we know we
cannot ever support more than one vector, we have a better shot at
the userspace driver working, especially if it's a guest OS, if we
only expose one vector as being available in the interface.
Signed-off-by: Alex Williamson <alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
drivers/pci/msi.c | 5 +++++
include/linux/msi.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 9fab30a..36b503a 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -79,6 +79,11 @@ int __weak arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
return 0;
}
+bool __weak arch_supports_multivector_msi(struct pci_dev *dev)
+{
+ return false;
+}
+
/*
* We have a default implementation available as a separate non-weak
* function, as it is used by the Xen x86 PCI code
diff --git a/include/linux/msi.h b/include/linux/msi.h
index 44f4746..2365c64 100644
--- a/include/linux/msi.h
+++ b/include/linux/msi.h
@@ -58,6 +58,7 @@ void arch_teardown_msi_irq(unsigned int irq);
int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type);
void arch_teardown_msi_irqs(struct pci_dev *dev);
void arch_restore_msi_irqs(struct pci_dev *dev);
+bool arch_supports_multivector_msi(struct pci_dev *dev);
void default_teardown_msi_irqs(struct pci_dev *dev);
void default_restore_msi_irqs(struct pci_dev *dev);
next prev parent reply other threads:[~2014-11-21 22:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-21 22:08 [PATCH 0/3] PCI/x86: Interface for testing multivector MSI support Alex Williamson
[not found] ` <20141121213752.31095.30735.stgit-GCcqpEzw8uZBDLzU/O5InQ@public.gmane.org>
2014-11-21 22:08 ` Alex Williamson [this message]
[not found] ` <20141121220833.31095.12371.stgit-GCcqpEzw8uZBDLzU/O5InQ@public.gmane.org>
2014-11-23 20:20 ` [PATCH 1/3] PCI/MSI: Initial hook for archs to declare " Thomas Gleixner
2014-11-24 21:45 ` Alex Williamson
2014-11-25 3:22 ` Jiang Liu
2014-11-21 22:08 ` [PATCH 2/3] PCI/x86: Add arch_supports_multivector_msi() hook Alex Williamson
2014-11-21 22:08 ` [PATCH 3/3] PCI: Extend and export pci_msi_supported() for multivector MSI Alex Williamson
2015-01-08 16:15 ` [PATCH 0/3] PCI/x86: Interface for testing multivector MSI support Bjorn Helgaas
[not found] ` <20150108161521.GB6575-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2015-01-12 15:42 ` Alex Williamson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141121220833.31095.12371.stgit@gimli.home \
--to=alex.williamson-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
--cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org \
--cc=x86-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox