WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH] msix: revoke correct amount of msi-x related iom

To: Neil Turton <nturton@xxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH] msix: revoke correct amount of msi-x related iomem
From: Espen Skoglund <espen.skoglund@xxxxxxxxxxxxx>
Date: Tue, 6 May 2008 17:49:21 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Espen Skoglund <espen.skoglund@xxxxxxxxxxxxx>
Delivery-date: Tue, 06 May 2008 09:50:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <482087F5.1030903@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <18459.22471.351306.107348@xxxxxxxxxxxxxxxxxx> <482087F5.1030903@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>