Jan Beulich
2010-Mar-05 16:03 UTC
[Xen-devel] set_msi_affinity() vs. pci_restore_msi_state()
Isn''t the fact that the former updates the MSI message data without updating the copy of it in memory a problem for the latter, i.e. won''t the latter restore stale information? While the problem (if there is one) existed before c/s 20073, the fact that the vector now can change seems to make the potential effect of this much worse. Thanks, Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Zhang, Xiantao
2010-Mar-08 02:14 UTC
[Xen-devel] RE: set_msi_affinity() vs. pci_restore_msi_state()
Jan, Have you met any issue ? Per my understanding, there is no problem here. For set_msi_affinity, it calls write_msi_msg to write the MSI info to real hardware and also update it to (msi_desc)entry->msg, so entry->msg should store the latest msi''s data/addr. And only if pci_restore_msi_state uses entry->msg to restore msi state, the correct info should be restored. And the key point is that write_msi_msg not only update hardware''s msi state, but it stores the latest MSI info to msi descriptor entry->msg. Xiantao -----Original Message----- From: Jan Beulich [mailto:JBeulich@novell.com] Sent: Saturday, March 06, 2010 12:04 AM To: Zhang, Xiantao Cc: xen-devel@lists.xensource.com Subject: set_msi_affinity() vs. pci_restore_msi_state() Isn''t the fact that the former updates the MSI message data without updating the copy of it in memory a problem for the latter, i.e. won''t the latter restore stale information? While the problem (if there is one) existed before c/s 20073, the fact that the vector now can change seems to make the potential effect of this much worse. Thanks, Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jan Beulich
2010-Mar-08 08:10 UTC
[Xen-devel] RE: set_msi_affinity() vs. pci_restore_msi_state()
>>> "Zhang, Xiantao" <xiantao.zhang@intel.com> 08.03.10 03:14 >>> >Jan, > Have you met any issue ?Yes, but not in the resume code path. Instead, I got a log including output from the new ''M'' debug key, which showed that entry->msg.data must have been all zero. That lead me to look at the code paths where this field would get written.>Per my understanding, there is no problem here. For set_msi_affinity, >it calls write_msi_msg to write the MSI info to real hardware and alsoupdate it to (msi_desc)entry->msg, so entry->msg should store the>latest msi''s data/addr.Oh, right, I overlooked write_msi_msg() writing entry->msg - mislead by the fact that it may be called with &entry->msg (which makes the - in this case unnecessary - assignment sort of unexpected. Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel