]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
PCI/MSI: Enforce MSI[X] entry updates to be visible
authorThomas Gleixner <tglx@linutronix.de>
Thu, 29 Jul 2021 21:51:43 +0000 (23:51 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 24 Sep 2021 09:57:23 +0000 (11:57 +0200)
commita97c82ae4d454217a6967cd315762968d2c7f38e
treec024c1808c33f040f9c4baabe7e10530cddd64af
parentce2ceef94e1523e67f7f68b54c7ed03b303e6629
PCI/MSI: Enforce MSI[X] entry updates to be visible

BugLink: https://bugs.launchpad.net/bugs/1943756
commit b9255a7cb51754e8d2645b65dd31805e282b4f3e upstream.

Nothing enforces the posted writes to be visible when the function
returns. Flush them even if the flush might be redundant when the entry is
masked already as the unmask will flush as well. This is either setup or a
rare affinity change event so the extra flush is not the end of the world.

While this is more a theoretical issue especially the logic in the X86
specific msi_set_affinity() function relies on the assumption that the
update has reached the hardware when the function returns.

Again, as this never has been enforced the Fixes tag refers to a commit in:
   git://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git

Fixes: f036d4ea5fa7 ("[PATCH] ia32 Message Signalled Interrupt support")
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20210729222542.515188147@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/pci/msi.c