Espen Skoglund
2008-May-02 18:04 UTC
[Xen-devel] [PATCH] msix: revoke correct amount of msi-x related iomem
Calculation of MSI-X table size needs to be masked. Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Neil Turton
2008-May-06 16:31 UTC
Re: [Xen-devel] [PATCH] msix: revoke correct amount of msi-x related iomem
Espen Skoglund wrote:> + self.msix_entries = (message_cont_lo + \ > + message_cont_hi << 8) \ > + & MSIX_SIZE_MASKThat still doesn''t look right to me since "+" binds tighter than "<<". I think it needs some more parentheses around "message_cont_hi << 8", at least if I''ve understood what the code''s supposed to do. Cheers, Neil. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Espen Skoglund
2008-May-06 16:49 UTC
Re: [Xen-devel] [PATCH] msix: revoke correct amount of msi-x related iomem
Very true. Not being all that experienced with Python I simply believed that the previous code was correct. Checking the reference manual now I do see that the ''<<'' operator does indeed precedence over ''+''. Also, the table size field is actually 11 bits rather than 10. MSIX_SIZE_MASK should therefore be 0x7ff. eSk [Neil Turton]> Espen Skoglund wrote: >> + self.msix_entries = (message_cont_lo + \ >> + message_cont_hi << 8) \ >> + & MSIX_SIZE_MASK> That still doesn''t look right to me since "+" binds tighter than > "<<". I think it needs some more parentheses around > "message_cont_hi << 8", at least if I''ve understood what the code''s > supposed to do._______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel