From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=50401 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q2Ft4-0002q3-BA for qemu-devel@nongnu.org; Wed, 23 Mar 2011 00:41:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q2Ft2-0005Nc-Ak for qemu-devel@nongnu.org; Wed, 23 Mar 2011 00:41:38 -0400 Received: from ozlabs.org ([203.10.76.45]:51461) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q2Ft2-0005MD-1K for qemu-devel@nongnu.org; Wed, 23 Mar 2011 00:41:36 -0400 Date: Wed, 23 Mar 2011 14:48:36 +1100 From: David Gibson Subject: Re: [Qemu-devel] [PATCH 18/26] Implement the PAPR (pSeries) virtualized interrupt controller (xics) Message-ID: <20110323034836.GE22782@yookeroo> References: <1300251423-6715-1-git-send-email-david@gibson.dropbear.id.au> <1300251423-6715-19-git-send-email-david@gibson.dropbear.id.au> <4D8136A7.2040706@codemonkey.ws> <20110317013459.GD1105@yookeroo> <4D8208F7.1040400@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4D8208F7.1040400@codemonkey.ws> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: paulus@samba.org, agraf@suse.de, anton@samba.org, qemu-devel@nongnu.org On Thu, Mar 17, 2011 at 08:13:27AM -0500, Anthony Liguori wrote: > On 03/16/2011 08:34 PM, David Gibson wrote: > > > >>>+/* > >>>+ * ICP: Presentation layer > >>>+ */ > >>>+ > >>>+struct icp_server_state { > >>>+ uint32_t cppr :8; > >>>+ uint32_t xisr :24; > >>No real reason to use bitfields here. > >Well.. in the hardware xics implementation, CPPR and XISR are > >considered fields of the one 32-bit register, XIRR. Matching that is > >why I have the bitfield. > > Bitfields don't work well with the way we save device state. Good point. In fact, I think I even hit that when I did some preliminary looking at adding partition save/migration support to the pseries stuff. Bitfields removed in the next version. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson