From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NVmXt-0000az-9S for qemu-devel@nongnu.org; Fri, 15 Jan 2010 08:49:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NVmXo-0000af-CI for qemu-devel@nongnu.org; Fri, 15 Jan 2010 08:49:01 -0500 Received: from [199.232.76.173] (port=42762 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NVmXo-0000ac-5y for qemu-devel@nongnu.org; Fri, 15 Jan 2010 08:48:56 -0500 Received: from e35.co.us.ibm.com ([32.97.110.153]:50587) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NVmXm-0005L9-UV for qemu-devel@nongnu.org; Fri, 15 Jan 2010 08:48:55 -0500 Received: from d03relay05.boulder.ibm.com (d03relay05.boulder.ibm.com [9.17.195.107]) by e35.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id o0FDZB9u032060 for ; Fri, 15 Jan 2010 06:35:11 -0700 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay05.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id o0FDmVqi131936 for ; Fri, 15 Jan 2010 06:48:31 -0700 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id o0FDmUel031418 for ; Fri, 15 Jan 2010 06:48:30 -0700 From: Adam Litke In-Reply-To: <20100115113845.588e2398@doriath> References: <1263504010.2847.27.camel@aglitke> <20100115113845.588e2398@doriath> Content-Type: text/plain; charset="UTF-8" Date: Fri, 15 Jan 2010 07:48:29 -0600 Message-ID: <1263563309.3536.1.camel@aglitke> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] QMP: Save default control monitor for emitting async events List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: qemu-devel@nongnu.org On Fri, 2010-01-15 at 11:38 -0200, Luiz Capitulino wrote: > On Thu, 14 Jan 2010 15:20:10 -0600 > Adam Litke wrote: > > > When using a control/QMP monitor in tandem with a regular monitor, asynchronous > > messages can get lost depending on the order of the QEMU program arguments. > > QEMU events issued by monitor_protocol_event() always go to cur_mon. If the > > user monitor was specified on the command line first (or it has ,default), the > > message will be directed to the user monitor (not the QMP monitor). > > I think we have two problems here: > > 1. Async messages are only delivered for the default Monitor, so if the QMP > Monitor is not the default one it won't get them (not a bug if well > documented, but it's annoying) > > 2. On a multiple QMP Monitor setup, only one of them will get async messages > > This patch fixes 1. but the best fix would be to solve both problems, > as QMP Monitors have to be equally capable IMO. > > There's an array with all Monitors IIRC, maybe we could loop through it > and delivery the message to each QMP ones of them? Sure. This was the other way I was considering. I'll spin up a patch and we can see how it looks. -- Thanks, Adam