From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NZOmK-0006ME-Oi for qemu-devel@nongnu.org; Mon, 25 Jan 2010 08:14:52 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NZOmF-0006K8-Sn for qemu-devel@nongnu.org; Mon, 25 Jan 2010 08:14:52 -0500 Received: from [199.232.76.173] (port=33282 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NZOmF-0006K3-OE for qemu-devel@nongnu.org; Mon, 25 Jan 2010 08:14:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:3046) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NZOmF-0002IZ-Ak for qemu-devel@nongnu.org; Mon, 25 Jan 2010 08:14:47 -0500 Date: Mon, 25 Jan 2010 11:14:40 -0200 From: Luiz Capitulino Message-ID: <20100125111440.379f9094@doriath> In-Reply-To: <4B5C22B7.5090001@redhat.com> References: <1264108180-3666-1-git-send-email-lcapitulino@redhat.com> <1264108180-3666-9-git-send-email-lcapitulino@redhat.com> <4B5C22B7.5090001@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 08/11] QMP: Asynchronous messages enable/disable support List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org, armbru@redhat.com On Sun, 24 Jan 2010 12:36:39 +0200 Avi Kivity wrote: > On 01/21/2010 11:09 PM, Luiz Capitulino wrote: > > This commit disables asynchronous messages by default and > > introduces two new QMP commands: async_msg_enable and > > async_msg_disable. > > > > Each QMP Monitor has its own set of asynchronous messages, > > so for example, if QEMU is run with two QMP Monitors async > > messages setup in one of them doesn't affect the other. > > > > To implement this design a bitmap is introduced to the > > Monitor struct, each async message is represented by one bit. > > > > > > A bitmap is an overkill here, an array of booleans should suffice. Ok. > > +#define EVENTS_BITMAP_SIZE (QEVENT_MAX / 8) > > > > Doesn't that underflow if QEVENT_MAX is not a multiple of 8? Yes.