From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VcFhx-0005mU-Dh for qemu-devel@nongnu.org; Fri, 01 Nov 2013 10:28:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VcFhr-0005rm-EK for qemu-devel@nongnu.org; Fri, 01 Nov 2013 10:28:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60901) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VcFhr-0005rf-5q for qemu-devel@nongnu.org; Fri, 01 Nov 2013 10:28:11 -0400 Date: Fri, 1 Nov 2013 10:28:05 -0400 From: Luiz Capitulino Message-ID: <20131101102805.0c4c119d@redhat.com> In-Reply-To: <1382321765-29052-1-git-send-email-xiawenc@linux.vnet.ibm.com> References: <1382321765-29052-1-git-send-email-xiawenc@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Wenchao Xia Cc: kwolf@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com, stefanha@redhat.com, pbonzini@redhat.com 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.