qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/6] qapi: generate event defines automatically


From: Luiz Capitulino
Subject: Re: [Qemu-devel] [PATCH 0/6] qapi: generate event defines automatically
Date: Fri, 1 Nov 2013 10:28:05 -0400

On Mon, 21 Oct 2013 10:15:59 +0800
Wenchao Xia <address@hidden> 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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]