From: Greg Kroah-Hartman Date: Thu, 26 May 2022 12:02:51 +0000 (+0200) Subject: 4.14-stable patches X-Git-Tag: v5.18.1~29 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b43aae0dbae0aef22f0581ea774d99e54080e967;p=thirdparty%2Fkernel%2Fstable-queue.git 4.14-stable patches added patches: x86-pci-xen-disable-pci-msi-masking-for-xen_hvm-guests.patch --- diff --git a/queue-4.14/series b/queue-4.14/series index e69de29bb2d..b6783939782 100644 --- a/queue-4.14/series +++ b/queue-4.14/series @@ -0,0 +1 @@ +x86-pci-xen-disable-pci-msi-masking-for-xen_hvm-guests.patch diff --git a/queue-4.14/x86-pci-xen-disable-pci-msi-masking-for-xen_hvm-guests.patch b/queue-4.14/x86-pci-xen-disable-pci-msi-masking-for-xen_hvm-guests.patch new file mode 100644 index 00000000000..42a4c2bfb47 --- /dev/null +++ b/queue-4.14/x86-pci-xen-disable-pci-msi-masking-for-xen_hvm-guests.patch @@ -0,0 +1,51 @@ +From 7e0815b3e09986d2fe651199363e135b9358132a Mon Sep 17 00:00:00 2001 +From: Thomas Gleixner +Date: Thu, 28 Apr 2022 15:50:54 +0200 +Subject: x86/pci/xen: Disable PCI/MSI[-X] masking for XEN_HVM guests + +From: Thomas Gleixner + +commit 7e0815b3e09986d2fe651199363e135b9358132a upstream. + +When a XEN_HVM guest uses the XEN PIRQ/Eventchannel mechanism, then +PCI/MSI[-X] masking is solely controlled by the hypervisor, but contrary to +XEN_PV guests this does not disable PCI/MSI[-X] masking in the PCI/MSI +layer. + +This can lead to a situation where the PCI/MSI layer masks an MSI[-X] +interrupt and the hypervisor grants the write despite the fact that it +already requested the interrupt. As a consequence interrupt delivery on the +affected device is not happening ever. + +Set pci_msi_ignore_mask to prevent that like it's done for XEN_PV guests +already. + +Fixes: 809f9267bbab ("xen: map MSIs into pirqs") +Reported-by: Jeremi Piotrowski +Reported-by: Dusty Mabe +Reported-by: Salvatore Bonaccorso +Signed-off-by: Thomas Gleixner +Tested-by: Noah Meyerhans +Cc: stable@vger.kernel.org +Link: https://lore.kernel.org/r/87tuaduxj5.ffs@tglx +[nmeyerha@amazon.com: backported to 4.14] +Signed-off-by: Noah Meyerhans +Signed-off-by: Greg Kroah-Hartman +--- + arch/x86/pci/xen.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- a/arch/x86/pci/xen.c ++++ b/arch/x86/pci/xen.c +@@ -442,6 +442,11 @@ void __init xen_msi_init(void) + + x86_msi.setup_msi_irqs = xen_hvm_setup_msi_irqs; + x86_msi.teardown_msi_irq = xen_teardown_msi_irq; ++ /* ++ * With XEN PIRQ/Eventchannels in use PCI/MSI[-X] masking is solely ++ * controlled by the hypervisor. ++ */ ++ pci_msi_ignore_mask = 1; + } + #endif +