]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/MSI: Add pci_msi_ignore_mask to prevent writes to MSI/MSI-X Mask Bits
authorYijing Wang <wangyijing@huawei.com>
Mon, 27 Oct 2014 02:44:36 +0000 (10:44 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 6 Nov 2014 23:34:39 +0000 (16:34 -0700)
commit2713c72f08422b5ceca91a647144b670841bb836
treed43a3bc4a84dad0e3a178f74478ea6996c0773c8
parentcf707b7b48540e4559958bc7587fb506b5c80cc1
PCI/MSI: Add pci_msi_ignore_mask to prevent writes to MSI/MSI-X Mask Bits

MSI-X vector Mask Bits are in MSI-X Tables in PCI memory space.  Xen PV
guests can't write to those tables.  MSI vector Mask Bits are in PCI
configuration space.  Xen PV guests can write to config space, but those
writes are ignored.

Commit 060a538375ca ("PCI: Add x86_msi.msi_mask_irq() and
msix_mask_irq()") added a way to override default_mask_msi_irqs() and
default_mask_msix_irqs() so they can be no-ops in Xen guests, but this is
more complicated than necessary.

Add "pci_msi_ignore_mask" in the core PCI MSI code.  If set,
default_mask_msi_irqs() and default_mask_msix_irqs() return without doing
anything.  This is less flexible, but much simpler.

[bhelgaas: changelog]
Signed-off-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: David Vrabel <david.vrabel@citrix.com>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: xen-devel@lists.xenproject.org
arch/x86/pci/xen.c
drivers/pci/msi.c
include/linux/msi.h