[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <163001720943.25758.17463061644086046608.tip-bot2@tip-bot2>
Date: Thu, 26 Aug 2021 22:33:29 -0000
From: tip-bot2 for Marek Marczykowski-Górecki
<tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: marmarek@...isiblethingslab.com,
Thomas Gleixner <tglx@...utronix.de>,
Bjorn Helgaas <bhelgaas@...gle.com>, stable@...r.kernel.org,
x86@...nel.org, linux-kernel@...r.kernel.org, maz@...nel.org
Subject: [tip: irq/urgent] PCI/MSI: Skip masking MSI-X on Xen PV
The following commit has been merged into the irq/urgent branch of tip:
Commit-ID: 1a519dc7a73c977547d8b5108d98c6e769c89f4b
Gitweb: https://git.kernel.org/tip/1a519dc7a73c977547d8b5108d98c6e769c89f4b
Author: Marek Marczykowski-Górecki <marmarek@...isiblethingslab.com>
AuthorDate: Thu, 26 Aug 2021 19:03:42 +02:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Fri, 27 Aug 2021 00:27:15 +02:00
PCI/MSI: Skip masking MSI-X on Xen PV
When running as Xen PV guest, masking MSI-X is a responsibility of the
hypervisor. The guest has no write access to the relevant BAR at all - when
it tries to, it results in a crash like this:
BUG: unable to handle page fault for address: ffffc9004069100c
#PF: supervisor write access in kernel mode
#PF: error_code(0x0003) - permissions violation
RIP: e030:__pci_enable_msix_range.part.0+0x26b/0x5f0
e1000e_set_interrupt_capability+0xbf/0xd0 [e1000e]
e1000_probe+0x41f/0xdb0 [e1000e]
local_pci_probe+0x42/0x80
(...)
The recently introduced function msix_mask_all() does not check the global
variable pci_msi_ignore_mask which is set by XEN PV to bypass the masking
of MSI[-X] interrupts.
Add the check to make this function XEN PV compatible.
Fixes: 7d5ec3d36123 ("PCI/MSI: Mask all unused MSI-X entries")
Signed-off-by: Marek Marczykowski-Górecki <marmarek@...isiblethingslab.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: stable@...r.kernel.org
Link: https://lore.kernel.org/r/20210826170342.135172-1-marmarek@invisiblethingslab.com
---
drivers/pci/msi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index e5e7533..3a9f4f8 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -776,6 +776,9 @@ static void msix_mask_all(void __iomem *base, int tsize)
u32 ctrl = PCI_MSIX_ENTRY_CTRL_MASKBIT;
int i;
+ if (pci_msi_ignore_mask)
+ return;
+
for (i = 0; i < tsize; i++, base += PCI_MSIX_ENTRY_SIZE)
writel(ctrl, base + PCI_MSIX_ENTRY_VECTOR_CTRL);
}
Powered by blists - more mailing lists