]> www.infradead.org Git - users/jedix/linux-maple.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)
committerJoerg Roedel <jroedel@suse.de>
Thu, 20 Mar 2025 08:03:56 +0000 (09:03 +0100)
commit2454823e97a63d85a6b215905f71e5a06324eab7
treec5d8c253f06d9392bf2b112e39ed038404bcd23e
parent4c293add5874038dc82ef579663dd86744d8e872
iommu/vt-d: Put IRTE back into posted MSI mode if vCPU posting is disabled

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>
drivers/iommu/intel/irq_remapping.c