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
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:[email protected]]
Sent: Saturday, March 06, 2010 12:04 AM
To: Zhang, Xiantao
Cc: [email protected]
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
Quoted 3 lines
Quoted 1 line
Quoted 1 line
"Zhang, Xiantao" <[email protected]> 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.
Quoted 2 lines
Per my understanding, there is no problem here. For
set_msi_affinity, it callswrite_msi_msgto write the MSI info to real hardware and also
update it to (msi_desc)entry->msg, so entry->msg should store the
Quoted 1 line
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