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: Wenchao Xia
Subject: Re: [Qemu-devel] [PATCH 0/6] qapi: generate event defines automatically
Date: Mon, 04 Nov 2013 09:54:21 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0.1

于 2013/11/1 22:28, Luiz Capitulino 写道:
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.


  I am coding a version to fullly support event in qmp schema, will send
it soon.




reply via email to

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