From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vd9NG-0001uH-7M for qemu-devel@nongnu.org; Sun, 03 Nov 2013 20:54:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vd9N6-0001o8-Bf for qemu-devel@nongnu.org; Sun, 03 Nov 2013 20:54:38 -0500 Received: from e23smtp08.au.ibm.com ([202.81.31.141]:39808) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vd9N5-0001o4-Mu for qemu-devel@nongnu.org; Sun, 03 Nov 2013 20:54:28 -0500 Received: from /spool/local by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 4 Nov 2013 11:54:23 +1000 Received: from d23relay05.au.ibm.com (d23relay05.au.ibm.com [9.190.235.152]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 850B23578040 for ; Mon, 4 Nov 2013 12:54:20 +1100 (EST) Received: from d23av03.au.ibm.com (d23av03.au.ibm.com [9.190.234.97]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id rA41ahaS2752990 for ; Mon, 4 Nov 2013 12:36:44 +1100 Received: from d23av03.au.ibm.com (localhost [127.0.0.1]) by d23av03.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id rA41sJCh015927 for ; Mon, 4 Nov 2013 12:54:19 +1100 Message-ID: <5276FE4D.3000700@linux.vnet.ibm.com> Date: Mon, 04 Nov 2013 09:54:21 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1382321765-29052-1-git-send-email-xiawenc@linux.vnet.ibm.com> <20131101102805.0c4c119d@redhat.com> In-Reply-To: <20131101102805.0c4c119d@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 0/6] qapi: generate event defines automatically List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: kwolf@redhat.com, pbonzini@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, armbru@redhat.com 于 2013/11/1 22:28, Luiz Capitulino 写道: > On Mon, 21 Oct 2013 10:15:59 +0800 > Wenchao Xia wrote: > >> This series move the event define to qapi code, so later other components >> could use it easily, it also make monitor code less and easier to decouple >> with other code. > > Yes, this is an improvement over the current code. But it doesn't move > in the direction we (or better Anthony) originally had for events in > the QAPI. > > Basically, *iirc*, the idea was to have an event type, so that we could > declare events as: > > { 'event': 'BLOCK_IO_ERROR', 'data': { 'device': 'str', > 'operation': 'str', > 'action': 'str' } } > > (Note that keys 'operation' and 'action' should be enums) > > Then the QAPI could generate C functions to register and de-register from > an event. This way C code could benefit from events too, and we could > also allow QMP clients to register/de-register to/from events. > > Maybe we could apply this series as a first step, but I can't tell if > later on we'll regret it due to compatibility issues or if we'll realize > it was unneeded churn. > I am coding a version to fullly support event in qmp schema, will send it soon.