From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933588AbYD1LoX (ORCPT ); Mon, 28 Apr 2008 07:44:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1763526AbYD1LoO (ORCPT ); Mon, 28 Apr 2008 07:44:14 -0400 Received: from bzq-179-150-194.static.bezeqint.net ([212.179.150.194]:22693 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1763223AbYD1LoO (ORCPT ); Mon, 28 Apr 2008 07:44:14 -0400 Message-ID: <4815B88B.3010909@qumranet.com> Date: Mon, 28 Apr 2008 14:44:11 +0300 From: Avi Kivity User-Agent: Thunderbird 2.0.0.12 (X11/20080226) MIME-Version: 1.0 To: Harvey Harrison CC: LKML , Izik Eidus , kvm-devel Subject: Re: kvm: how big is type? References: <1209323919.14173.73.camel@brick> In-Reply-To: <1209323919.14173.73.camel@brick> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Harvey Harrison wrote: > arch/x86/kvm/x86.c:3484:25: warning: cast truncates bits from constant value (100 becomes 0) > arch/x86/kvm/x86.c:3510:24: warning: cast truncates bits from constant value (100 becomes 0) > > The problem: > cseg_desc.type &= ~(1 << 8); //clear the B flag > nseg_desc.type |= (1 << 8); > > type is a 4-bit bitfield on x86....please look into this. > > I think it ought to be (1 << 1), not (1 << 8), as it refers to the "busy" bit of the task type. Izik? -- error compiling committee.c: too many arguments to function From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: kvm: how big is type? Date: Mon, 28 Apr 2008 14:44:11 +0300 Message-ID: <4815B88B.3010909@qumranet.com> References: <1209323919.14173.73.camel@brick> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel , LKML To: Harvey Harrison Return-path: In-Reply-To: <1209323919.14173.73.camel@brick> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces@lists.sourceforge.net Errors-To: kvm-devel-bounces@lists.sourceforge.net List-Id: kvm.vger.kernel.org Harvey Harrison wrote: > arch/x86/kvm/x86.c:3484:25: warning: cast truncates bits from constant value (100 becomes 0) > arch/x86/kvm/x86.c:3510:24: warning: cast truncates bits from constant value (100 becomes 0) > > The problem: > cseg_desc.type &= ~(1 << 8); //clear the B flag > nseg_desc.type |= (1 << 8); > > type is a 4-bit bitfield on x86....please look into this. > > I think it ought to be (1 << 1), not (1 << 8), as it refers to the "busy" bit of the task type. Izik? -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone