const struct pi_desc *pi_desc = v ? &v->arch.hvm.vmx.pi_desc : NULL;
struct irq_desc *desc;
struct msi_desc *msi_desc;
+ /*
+ * vmx_pi_update_irte() relies on the IRTE already being setup, and just
+ * updates the guest vector, but not the other IRTE fields. As such the
+ * contents of msg are not consumed by iommu_update_ire_from_msi(). Even
+ * if not consumed, zero the contents to avoid possible stack leaks.
+ */
+ struct msi_msg msg = {};
int rc;
desc = pirq_spin_lock_irq_desc(pirq, NULL);
ASSERT_PDEV_LIST_IS_READ_LOCKED(msi_desc->dev->domain);
- return iommu_update_ire_from_msi(msi_desc, &msi_desc->msg);
+ return iommu_update_ire_from_msi(msi_desc, &msg);
unlock_out:
spin_unlock_irq(&desc->lock);