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][retry 3][1/2] new vcpu op call to getphysicalCPU

To: "Ian Jackson" <Ian.Jackson@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH][retry 3][1/2] new vcpu op call to getphysicalCPU information
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Wed, 05 Mar 2008 12:34:51 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Mark Langsdorf <mark.langsdorf@xxxxxxx>
Delivery-date: Wed, 05 Mar 2008 04:34:41 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <18382.34448.884199.279782@xxxxxxxxxxxxxxxxxxxxxxxx>
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: <200803041552.28425.mark.langsdorf@xxxxxxx> <47CE6491.76E4.0078.0@xxxxxxxxxx> <18382.34448.884199.279782@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
>>> Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx> 05.03.08 12:40 >>>
>Jan Beulich writes ("Re: [Xen-devel] [PATCH][retry 3][1/2] new vcpu op call to 
>get physicalCPU information"):
>> >+   short temp = 0xff;
>...
>> >+   cpu_id.phys_id |= temp << 8;
>> 
>> Please shift by 32 here for forward compatibility.
>
>short promotes to int, probably 32-bit, but shifting by the word size
>or more is not permitted.  In any case even if it worked like you
>wanted, the result would be 0.  Perhaps you meant to suggest some
>changes of types as well ?

Of course.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel