> From: Gao, Chao > Sent: Thursday, April 6, 2017 8:30 AM > > msi_msg_to_remap_entry() is buggy when the live IRTE is in posted format. It > wrongly inherits the 'im' field meaning the IRTE is in posted format but > updates all the other fields to remapping format. > > There are also two situations that lead to the above issue. One is some > callers > really want to change the IRTE to remapped format. The other is some callers > only want to update msi message (e.g. set msi affinity) for they don't aware > that this msi is binded with a guest interrupt. We should suppress update > in the second situation. To distinguish them, straightforwardly, we can let > caller specify which format of IRTE they want update to. It isn't feasible for > making all callers be aware of the binding with guest interrupt will cause a > far more complicated change (including the interfaces exposed to IOAPIC and > MSI). Also some callings happen in interrupt context where we can't acquire > d->event_lock to read struct hvm_pirq_dpci. > > This patch introduces two new fields in msi_desc to track binding with a > guest > interrupt such that msi_msg_to_remap_entry() can get the binding and > update > IRTE accordingly. After that change, pi_update_irte() can utilize > msi_msg_to_remap_entry() to update IRTE to posted format. > > Signed-off-by: Feng Wu <feng...@intel.com> > Signed-off-by: Chao Gao <chao....@intel.com>
Reviewed-by: Kevin Tian <kevin.t...@intel.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel