Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NDjV9-0000W7-LV for qemu-devel@nongnu.org; Thu, 26 Nov 2009 13:55:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NDjV4-0000P9-QV for qemu-devel@nongnu.org; Thu, 26 Nov 2009 13:55:34 -0500 Received: from [199.232.76.173] (port=42650 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NDjV4-0000Ok-A0 for qemu-devel@nongnu.org; Thu, 26 Nov 2009 13:55:30 -0500 Received: from mx1.redhat.com ([209.132.183.28]:9791) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NDjV3-0007tc-Rc for qemu-devel@nongnu.org; Thu, 26 Nov 2009 13:55:30 -0500 From: Juan Quintela In-Reply-To: <20091126154833.GB2694@redhat.com> (Michael S. Tsirkin's message of "Thu, 26 Nov 2009 17:48:33 +0200") References: <20091126154833.GB2694@redhat.com> Date: Thu, 26 Nov 2009 19:54:43 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCHv2 1/3] pci: prepare irq code for interrupt state List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: yamahata@valinux.co.jp, qemu-devel@nongnu.org, paul@codesourcery.com "Michael S. Tsirkin" wrote: > This rearranges code in preparation for interrupt state > implementation. > Changes: > - split up but walk away from interrupt handling > into a subroutine > - change irq_state from an array to bitmask > - verify that irq_state values are 0 or 1 on load > > There are no functional changes. I guess that there is a good reason for changing for an array of ints to one bitmap. Change looks ok, and if it worked for you, it should work for everybody (if you breaks pci_device migration stops working). I would delay changing things to bitmaps until we decide how to implement bitmaps in qemu (there are more than one implementation), at least: - use array of ints, save as array of ints (i.e. works between hosts with different endianess) - use arraf of ints but save as array of bytes (break when you change endianess) - Now, you have a bitmap that fits in an uint8_t. An probably some other way that I have missed. Later, Juan.