From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: kvm@vger.kernel.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
David Gibson <david@gibson.dropbear.id.au>,
Alex Williamson <alex.williamson@redhat.com>,
Bjorn Helgaas <bhelgaas@google.com>,
Yongji Xie <elohimes@gmail.com>,
Eric Auger <eric.auger@redhat.com>,
Yongji Xie <xyjxie@linux.vnet.ibm.com>
Subject: [PATCH kernel v4 1/6] PCI: Add a new PCI_BUS_FLAGS_MSI_REMAP flag
Date: Fri, 30 Jun 2017 15:24:31 +1000 [thread overview]
Message-ID: <20170630052436.15212-2-aik@ozlabs.ru> (raw)
In-Reply-To: <20170630052436.15212-1-aik@ozlabs.ru>
From: Yongji Xie <elohimes@gmail.com>
We introduce a new pci_bus_flags, PCI_BUS_FLAGS_MSI_REMAP
which indicates interrupts of all devices on the bus are
managed by the hardware enabling IRQ remapping (intel naming).
When the capability is enabled, a given PCI device can only
shoot the MSIs assigned for it. In other words, the hardware
can protect system from invalid MSIs of the device by checking
the target address and data when there is something wrong
with MSI part in device or device driver.
The new flag will be set by when the kernel decides that it is safe to
do so. With this flag enabled, we can easily know whether it's safe
to expose MSI-X tables of PCI BARs to userspace. Some usespace
drivers such as VFIO may benefit from this.
Signed-off-by: Yongji Xie <xyjxie@linux.vnet.ibm.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
include/linux/pci.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 8039f9f0ca05..2c6dbb3dd0da 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -200,6 +200,7 @@ enum pci_bus_flags {
PCI_BUS_FLAGS_NO_MSI = (__force pci_bus_flags_t) 1,
PCI_BUS_FLAGS_NO_MMRBC = (__force pci_bus_flags_t) 2,
PCI_BUS_FLAGS_NO_AERSID = (__force pci_bus_flags_t) 4,
+ PCI_BUS_FLAGS_MSI_REMAP = (__force pci_bus_flags_t) 8,
};
/* These values come from the PCI Express Spec */
--
2.11.0
next prev parent reply other threads:[~2017-06-30 5:24 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-30 5:24 [PATCH kernel v4 0/6] vfio-pci: Add support for mmapping MSI-X table Alexey Kardashevskiy
2017-06-30 5:24 ` Alexey Kardashevskiy [this message]
2017-07-10 19:20 ` [PATCH kernel v4 1/6] PCI: Add a new PCI_BUS_FLAGS_MSI_REMAP flag Bjorn Helgaas
2017-07-11 8:36 ` Alexey Kardashevskiy
2017-06-30 5:24 ` [PATCH kernel v4 2/6] PCI: Set PCI_BUS_FLAGS_MSI_REMAP if MSI controller enables IRQ remapping Alexey Kardashevskiy
2017-06-30 5:24 ` [PATCH kernel v4 3/6] PCI: Set PCI_BUS_FLAGS_MSI_REMAP if IOMMU have capability of " Alexey Kardashevskiy
2017-07-01 10:27 ` kbuild test robot
2017-06-30 5:24 ` [PATCH kernel v4 4/6] iommu: Set PCI_BUS_FLAGS_MSI_REMAP on iommu driver initialization Alexey Kardashevskiy
[not found] ` <20170630052436.15212-5-aik-sLpHqDYs0B2HXe+LvDLADg@public.gmane.org>
2017-07-10 19:23 ` Bjorn Helgaas via iommu
[not found] ` <CAErSpo4pAZfDx5p_S9Z8jR_ctH=ZrkgG6aNaNmPaN2H77dgEgQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-11 10:39 ` Robin Murphy
2017-07-12 2:47 ` Alexey Kardashevskiy
2017-07-19 5:12 ` Benjamin Herrenschmidt
2017-07-19 10:02 ` Alexey Kardashevskiy
2017-07-25 6:09 ` Alexey Kardashevskiy
[not found] ` <b444851a-3240-f98f-04b9-0223649ea856-sLpHqDYs0B2HXe+LvDLADg@public.gmane.org>
2017-07-26 9:50 ` Joerg Roedel
[not found] ` <20170726095053.GG15833-zLv9SwRftAIdnm+yROfE0A@public.gmane.org>
2017-07-26 11:33 ` Benjamin Herrenschmidt
2017-07-12 7:04 ` Jike Song
2017-07-12 7:28 ` Alexey Kardashevskiy
2017-06-30 5:24 ` [PATCH kernel v4 5/6] pci-ioda: Set PCI_BUS_FLAGS_MSI_REMAP for IODA host bridge Alexey Kardashevskiy
2017-06-30 5:24 ` [PATCH kernel v4 6/6] vfio-pci: Allow to expose MSI-X table to userspace if interrupt remapping is enabled Alexey Kardashevskiy
2017-07-10 2:20 ` [PATCH kernel v4 0/6] vfio-pci: Add support for mmapping MSI-X table Alexey Kardashevskiy
2017-07-10 19:11 ` Bjorn Helgaas
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=20170630052436.15212-2-aik@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=david@gibson.dropbear.id.au \
--cc=elohimes@gmail.com \
--cc=eric.auger@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=xyjxie@linux.vnet.ibm.com \
/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