From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2] qemu-kvm: x86: Refactor persistent CPU state Date: Wed, 27 May 2009 12:48:26 +0300 Message-ID: <4A1D0C6A.2070009@redhat.com> References: <4A15BFCB.6050403@web.de> <4A1939CC.8030206@redhat.com> <4A1A3F15.30809@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Gleb Natapov , kvm-devel To: Jan Kiszka Return-path: Received: from mx2.redhat.com ([66.187.237.31]:49565 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760628AbZE0Js1 (ORCPT ); Wed, 27 May 2009 05:48:27 -0400 In-Reply-To: <4A1A3F15.30809@web.de> Sender: kvm-owner@vger.kernel.org List-ID: Jan Kiszka wrote: >> Why are you using uint64_t? It would be more natural to use ffsll and >> the natural type of the bitmap vector. >> > > Better don't ask how I interpreted the ffs doc. > It's a misdesigned API anyway. > > + if (version_id >= 9) { > + qemu_get_sbe32s(f, &pending_irq); > + memset(&env->interrupt_bitmap, 0, sizeof(env->interrupt_bitmap)); > + if (pending_irq >= 0) { > + env->interrupt_bitmap[pending_irq / 64] |= 1 << (pending_irq % 64); > (uint64_t)1 so we don't lose the upper word. -- error compiling committee.c: too many arguments to function