From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: RE: PCI MSI questions Date: Thu, 24 Jul 2008 10:39:34 +0100 Message-ID: <488869F6.76E4.0078.0@novell.com> References: <4888452A.76E4.0078.0@novell.com> <823A93EED437D048963A3697DB0E35DE0191557C@pdsmsx414.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <823A93EED437D048963A3697DB0E35DE0191557C@pdsmsx414.ccr.corp.intel.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Haitao Shan Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org >> 2) While pci_restore_msi_state() properly checks the success of >> msi_map_pirq_to_vector(), pci_restore_msix_state() doesn't. Is this >> for a reason, or just because the code would get more complex if the >> error needs to be handled? >Yes. I do not know what is the proper action. If one of the MSI-X pirq >failed, should we return? Or unmap those already mapped and return? Or >continue processing other MSI-X entries? >Any comments on this? Jan. I would think this should follow the logic in msix_capabilities_init(), = i.e. unmap what was mapped (and hence leave the device in a semi- consistent [interrupts non-functional] state). >> 3) The type parameter of xc_physdev_map_pirq{,_msi}() seems >> superfluous, or is there any reason why these could be called with the > respectively reversed types? >Yes. The type is not useful in current code. >I am not quite sure about the reason. I think at the beginning of >submitting the patches, we do not have two seperate wrap functions for >this hypercall (only xc_physdev_map_pirq). That's where the "type" >parameter comes. Later, with MSI capabilities owned by Xen, we need pass >down more information to Xen via this hypercall. Thus the second one was >born. >Agree that this may need to be cleaned up. That is what I suspected. I'll prepare a patch, unless you want to. Jan