]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
iommu/vt-d: Put IRTE back into posted MSI mode if vCPU posting is disabled
authorSean Christopherson <seanjc@google.com>
Wed, 19 Mar 2025 02:20:59 +0000 (10:20 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 20 Apr 2025 08:15:47 +0000 (10:15 +0200)
commitc95a438d2c37748541b696053cd5c72042c838ad
tree65afd2dcf2d1153bf1421edc21d10aec2cbd1163
parente5dd974d6e00704553308ef1a88659f8dcfb39d4
iommu/vt-d: Put IRTE back into posted MSI mode if vCPU posting is disabled

commit 2454823e97a63d85a6b215905f71e5a06324eab7 upstream.

Add a helper to take care of reconfiguring an IRTE to deliver IRQs to the
host, i.e. not to a vCPU, and use the helper when an IRTE's vCPU affinity
is nullified, i.e. when KVM puts an IRTE back into "host" mode.  Because
posted MSIs use an ephemeral IRTE, using modify_irte() puts the IRTE into
full remapped mode, i.e. unintentionally disables posted MSIs on the IRQ.

Fixes: ed1e48ea4370 ("iommu/vt-d: Enable posted mode for device MSIs")
Cc: stable@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jacob Pan <jacob.jun.pan@linux.intel.com>
Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20250315025135.2365846-2-seanjc@google.com
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/intel/irq_remapping.c