xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* set_msi_affinity() vs. pci_restore_msi_state()
@ 2010-03-05 16:03 Jan Beulich
  2010-03-08  2:14 ` Zhang, Xiantao
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2010-03-05 16:03 UTC (permalink / raw)
  To: xiantao.zhang; +Cc: xen-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: set_msi_affinity() vs. pci_restore_msi_state()
  2010-03-05 16:03 set_msi_affinity() vs. pci_restore_msi_state() Jan Beulich
@ 2010-03-08  2:14 ` Zhang, Xiantao
  2010-03-08  8:10   ` Jan Beulich
  0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Xiantao @ 2010-03-08  2:14 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel@lists.xensource.com

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: set_msi_affinity() vs. pci_restore_msi_state()
  2010-03-08  2:14 ` Zhang, Xiantao
@ 2010-03-08  8:10   ` Jan Beulich
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Beulich @ 2010-03-08  8:10 UTC (permalink / raw)
  To: Xiantao Zhang; +Cc: xen-devel@lists.xensource.com

>>> "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 also
update 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-03-08  8:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-05 16:03 set_msi_affinity() vs. pci_restore_msi_state() Jan Beulich
2010-03-08  2:14 ` Zhang, Xiantao
2010-03-08  8:10   ` Jan Beulich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).