Re: [Qemu-devel] [PATCH v2 02/14] qapi: ignore files created during make check

2014-08-05 Thread Wenchao Xia
Reviewed-by: Wenchao Xia wenchaoq...@gmail.com 在 2014-8-6 6:38, Eric Blake 写道: After an in-tree build and run of 'make check-{qapi-schema,unit}', I noticed some leftover files. * tests/.gitignore: Ignore more testsuite droppings. Signed-off-by: Eric Blake ebl...@redhat.com --- tests

Re: [Qemu-devel] [PATCH v2 03/14] qapi: add some enum tests

2014-08-05 Thread Wenchao Xia
Reviewed-by: Wenchao Xia wenchaoq...@gmail.com

Re: [Qemu-devel] [PATCH v2 for-2.1 4/5] docs: document missing POWERDOWN event

2014-07-23 Thread Wenchao Xia
于 2014/7/23 20:26, Eric Blake 写道: The POWERDOWN event was first documented in 0aab9ec3. But since dfab4892 later restored this file to the state prior to qmp events, and we never documented it in the past, anyone using this file instead of qapi will miss out on this event. Tweak the existing

Re: [Qemu-devel] [PATCH v2 for-2.1 0/5] docs: document remaining QMP events

2014-07-23 Thread Wenchao Xia
Reviewed-by: Wenchao Xia wenchaoq...@gmail.com

Re: [Qemu-devel] [PATCH] scripts: qapi-event.py: support vendor extension

2014-07-23 Thread Wenchao Xia
Reviewed-by: Wenchao Xia wenchaoq...@gmail.com I didn't expect dot in schema before.

Re: [Qemu-devel] [PATCH FOR 2.1 1/5] tests/test-qmp-event: fix for GLib 2.31

2014-07-01 Thread Wenchao Xia
Jun 2014 16:33:56 -0700 Wenchao Xia wenchaoq...@gmail.com wrote: From: Paolo Bonzini pbonz...@redhat.com On old GLib, the test needs a g_thread_init call. Reported-by: Wenchao Xia wenchaoq...@gmail.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Tested-by: Wenchao Xia wenchaoq...@gmail.com

Re: [Qemu-devel] [PATCH v2 2.1 2/3] blockjob: Fix recent BLOCK_JOB_ERROR regression

2014-07-01 Thread Wenchao Xia
于 2014/6/28 1:24, Markus Armbruster 写道: Commit 5a2d2cb screwed up the the value of members device and action, breaking tests/qemu-iotests/041. Signed-off-by: Markus Armbruster arm...@redhat.com Tested-By: Benoit Canet ben...@irqsave.net Reviewed-by: Kevin Wolf kw...@redhat.com Reviewed-by:

Re: [Qemu-devel] [PULL for-2.1 00/40] QMP queue

2014-06-24 Thread Wenchao Xia
于 2014/6/21 4:02, Eric Blake 写道: On 06/20/2014 01:49 PM, Paolo Bonzini wrote: As I explained on IRC, many patches when rebased would have conflicts with Igor's new event. I think this is much more complex than having an extraordinary merge commit. I include the conflict resolution: -

Re: [Qemu-devel] [PULL for-2.1 00/40] QMP queue

2014-06-24 Thread Wenchao Xia
于 2014/6/24 21:24, Peter Maydell 写道: On 24 June 2014 14:20, Eric Blake ebl...@redhat.com wrote: Rebase your cleanups on to of this PULL request: https://lists.gnu.org/archive/html/qemu-devel/2014-06/msg05424.html I just applied that, so rebase on top of master... There is a test broken due

Re: [Qemu-devel] [PATCH build-fix] tests/test-qmp-event: fix for GLib 2.31

2014-06-24 Thread Wenchao Xia
Tested-by: Wenchao Xia wenchaoq...@gmail.com

[Qemu-devel] [PATCH FOR 2.1 4/5] qapi script: clean up in scripts

2014-06-24 Thread Wenchao Xia
This patch improve docs and uses c_type(argentry, is_param=True) in script. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qapi-code-gen.txt |8 scripts/qapi-event.py |5 ++--- scripts/qapi.py |2 +- tests

[Qemu-devel] [PATCH FOR 2.1 1/5] tests/test-qmp-event: fix for GLib 2.31

2014-06-24 Thread Wenchao Xia
From: Paolo Bonzini pbonz...@redhat.com On old GLib, the test needs a g_thread_init call. Reported-by: Wenchao Xia wenchaoq...@gmail.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Tested-by: Wenchao Xia wenchaoq...@gmail.com Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- tests/test

[Qemu-devel] [PATCH FOR 2.1 2/5] qapi: move event defines

2014-06-24 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- Makefile |2 +- qapi-event.json | 318 -- qapi-schema.json |5 +- qapi/event.json | 318 ++ 4 files changed, 322

[Qemu-devel] [PATCH FOR 2.1 0/5] clean up for qapi event

2014-06-24 Thread Wenchao Xia
Paolo Bonzini (1): tests/test-qmp-event: fix for GLib 2.31 Wenchao Xia (4): qapi: move event defines qapi: ignore generated event files qapi script: clean up in scripts qapi event: clean up in callers .gitignore |1 + Makefile

[Qemu-devel] [PATCH FOR 2.1 3/5] qapi: ignore generated event files

2014-06-24 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- .gitignore |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/.gitignore b/.gitignore index c658613..2286d0a 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ /qapi-generated /qapi-types.[ch] /qapi-visit.[ch

[Qemu-devel] [PATCH FOR 2.1 5/5] qapi event: clean up in callers

2014-06-24 Thread Wenchao Xia
This patch improves docs and address small issues in event callers. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- hw/watchdog/watchdog.c |2 +- include/block/blockjob.h |2 +- monitor.c|2 +- qapi-schema.json |7 --- qapi/block-core.json

Re: [Qemu-devel] [PATCH 2.1 00/36] Pending monitor patches for 2.1

2014-06-20 Thread Wenchao Xia
于 2014/6/20 23:44, Eric Blake 写道: On 06/18/2014 12:43 AM, Paolo Bonzini wrote: This includes: - Max's dependency fixes for QAPI scripts - Wenchao's QAPI event series - my thread-safety fixes, rebased onto QAPI events Paolo monitor.c| 226 ++---

Re: [Qemu-devel] [PATCH v3] qmp: add ACPI_DEVICE_OST event handling

2014-06-20 Thread Wenchao Xia
', 'sector-num': 'int', 'sector-count': 'int' } } + +## +# @ACPI_DEVICE_OST +# +# Emitted when guest executes ACPI _OST method. +# +# @info: ACPIOSTInfo type as described in qapi-schema.json Needs 'Since: 2.1'. With above added, Reviewed-by: Wenchao Xia wenchaoq...@gmail.com +## +{ 'event

Re: [Qemu-devel] [PATCH V6 03/29] qapi script: add event support

2014-06-18 Thread Wenchao Xia
于 2014/6/18 14:06, Paolo Bonzini 写道: Il 18/06/2014 05:33, Eric Blake ha scritto: +# This work is licensed under the terms of the GNU GPL, version 2. +# See the COPYING file in the top-level directory. Any reason this can't be GPLv2+ instead of GPLv2-only? I suppose because it copies parts

Re: [Qemu-devel] [PATCH 2.1 03/36] qapi: add event helper functions

2014-06-18 Thread Wenchao Xia
于 2014/6/18 14:43, Paolo Bonzini 写道: From: Wenchao Xia wenchaoq...@gmail.com This file holds some functions that do not need to be generated. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com

Re: [Qemu-devel] [PATCH V6 00/29] add direct support of event in qapi schema

2014-06-17 Thread Wenchao Xia
于 2014/6/18 0:30, Paolo Bonzini 写道: Il 17/06/2014 18:05, Eric Blake ha scritto: diff --git a/Makefile b/Makefile index 3e65525..f473cf5 100644 --- a/Makefile +++ b/Makefile @@ -246,8 +246,7 @@ $(SRC_PATH)/qga/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py $(qapi-py)

Re: [Qemu-devel] [PATCH V6 06/29] monitor: add an implemention as qapi event emit method

2014-06-14 Thread Wenchao Xia
于 2014/6/14 3:04, Eric Blake 写道: On 06/05/2014 06:22 AM, Wenchao Xia wrote: In the subject: s/as/of/ Now monitor has been hooked on the new event mechanism, so the patches s/Now/The/ later can convert event callers one by one. Most code are copied from s/the patches later/that later

Re: [Qemu-devel] [PATCH V6 08/29] qapi event: convert SHUTDOWN

2014-06-14 Thread Wenchao Xia
于 2014/6/14 3:57, Eric Blake 写道: On 06/05/2014 06:22 AM, Wenchao Xia wrote: This patch also eliminates build time warning caused by QAPI_EVENT_MAX = 0. I still don't know why I wasn't seeing a warning for that, but agree this cleans it up (or whichever event gets converted first

Re: [Qemu-devel] [PATCH V6 16/29] qapi event: convert RTC_CHANGE

2014-06-14 Thread Wenchao Xia
于 2014/6/14 5:27, Eric Blake 写道: On 06/05/2014 06:22 AM, Wenchao Xia wrote: This patch also eliminates build time warning caused by no caller of monitor_qapi_event_throttle(). Again, my suggestion on 6/29 could avoid that warning; if you use that workaround, don't clean it until 29/29

Re: [Qemu-devel] [PATCH V6 17/29] qapi event: convert WATCHDOG

2014-06-14 Thread Wenchao Xia
于 2014/6/14 6:05, Eric Blake 写道: On 06/13/2014 03:47 PM, Eric Blake wrote: On 06/05/2014 06:22 AM, Wenchao Xia wrote: Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 19 --- hw/watchdog/watchdog.c | 23 +++ monitor.c

Re: [Qemu-devel] [PATCH V6 00/29] add direct support of event in qapi schema

2014-06-14 Thread Wenchao Xia
于 2014/6/10 13:48, Paolo Bonzini 写道: Il 05/06/2014 14:21, Wenchao Xia ha scritto: This series add support for tag/keyword 'event' in qapi-schema. A new file was created to store some helper functions in patch 2, patch 4 is the test case, patch 5 is a convert example. The implemention is done

[Qemu-devel] [PATCH V6 02/29] qapi: add event helper functions

2014-06-05 Thread Wenchao Xia
This file holds some functions that do not need to be generated. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com Reviewed-by: Eric Blake ebl...@redhat.com --- include/qapi/qmp-event.h | 27 + qapi/Makefile.objs |1 + qapi/qmp-event.c | 74

[Qemu-devel] [PATCH V6 03/29] qapi script: add event support

2014-06-05 Thread Wenchao Xia
in some cases the real emit behavior may change, for example, qemu-img would not send a event, a callback layer is used to control the behavior. As a result, the stubs at compile time can be saved, the binding of block layer code and monitor code will become looser. Signed-off-by: Wenchao Xia wenchaoq

[Qemu-devel] [PATCH V6 00/29] add direct support of event in qapi schema

2014-06-05 Thread Wenchao Xia
28/29, need a confirm from whom has the test env. Wenchao Xia (29): 1 os-posix: include sys/time.h 2 qapi: add event helper functions 3 qapi script: add event support 4 test: add test cases for qapi event 5 qapi: adjust existing defines 6 monitor: add an implemention as qapi event emit

[Qemu-devel] [PATCH V6 08/29] qapi event: convert SHUTDOWN

2014-06-05 Thread Wenchao Xia
This patch also eliminates build time warning caused by QAPI_EVENT_MAX = 0. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 15 --- qapi-event.json | 12 vl.c|3 ++- 3 files changed, 14 insertions(+), 16

[Qemu-devel] [PATCH V6 04/29] test: add test cases for qapi event

2014-06-05 Thread Wenchao Xia
These cases will verify whether the expected qdict is built. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- tests/Makefile | 16 ++- tests/qapi-schema/qapi-schema-test.json | 12 ++ tests/qapi-schema/qapi-schema-test.out | 10 +- tests/test-qmp-event.c

[Qemu-devel] [PATCH V6 12/29] qapi event: convert RESUME

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 12 qapi-event.json |9 + vl.c|2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/docs/qmp/qmp-events.txt b/docs/qmp/qmp-events.txt index

[Qemu-devel] [PATCH V6 06/29] monitor: add an implemention as qapi event emit method

2014-06-05 Thread Wenchao Xia
of monitor_qapi_event_throttle(), the other one is caused by QAPI_EVENT_MAX = 0. They will be fixed automatically after full event conversion later. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- monitor.c| 128 +- trace-events |4

[Qemu-devel] [PATCH V6 11/29] qapi event: convert STOP

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- cpus.c |5 +++-- docs/qmp/qmp-events.txt | 12 qapi-event.json |9 + 3 files changed, 12 insertions(+), 14 deletions(-) diff --git a/cpus.c b/cpus.c index dd7ac13..28abb11 100644

[Qemu-devel] [PATCH V6 05/29] qapi: adjust existing defines

2014-06-05 Thread Wenchao Xia
is that, VncInfo should be foldered but may break API stability. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- block.c| 17 --- block/backup.c |2 +- block/mirror.c |7 ++- block/stream.c |4 +- blockjob.c | 11 ++-- hmp.c

[Qemu-devel] [PATCH V6 18/29] qapi event: convert DEVICE_DELETED

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 18 -- hw/core/qdev.c | 12 ++-- qapi-event.json | 16 3 files changed, 18 insertions(+), 28 deletions(-) diff --git a/docs/qmp/qmp-events.txt b/docs/qmp

[Qemu-devel] [PATCH V6 13/29] qapi event: convert SUSPEND

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 12 qapi-event.json | 10 ++ vl.c|2 +- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/qmp/qmp-events.txt b/docs/qmp/qmp-events.txt index

[Qemu-devel] [PATCH V6 07/29] qapi: add new schema file qapi-event.json

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- Makefile | 12 qapi-schema.json |2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 qapi-event.json diff --git a/Makefile b/Makefile index 237657e..554fb2d 100644 --- a/Makefile +++ b

[Qemu-devel] [PATCH V6 09/29] qapi event: convert POWERDOWN

2014-06-05 Thread Wenchao Xia
There is no existing comments for POWERDOWN in doc/qmp/qmp-events.txt, so no change on it like other conversion patch. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- qapi-event.json | 10 ++ vl.c|2 +- 2 files changed, 11 insertions(+), 1 deletions(-) diff --git

[Qemu-devel] [PATCH V6 15/29] qapi event: convert WAKEUP

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 12 qapi-event.json |9 + vl.c|2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/docs/qmp/qmp-events.txt b/docs/qmp/qmp-events.txt index

[Qemu-devel] [PATCH V6 14/29] qapi event: convert SUSPEND_DISK

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 14 -- hw/acpi/core.c |4 ++-- qapi-event.json | 12 3 files changed, 14 insertions(+), 16 deletions(-) diff --git a/docs/qmp/qmp-events.txt b/docs/qmp/qmp-events.txt

[Qemu-devel] [PATCH V6 20/29] qapi event: convert BLOCK_IO_ERROR and BLOCK_JOB_ERROR

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- block.c | 36 +++-- blockjob.c|6 - docs/qmp/qmp-events.txt | 47 - include/block/block_int.h |3 -- qapi-event.json

[Qemu-devel] [PATCH V6 22/29] qapi event: convert other BLOCK_JOB events

2014-06-05 Thread Wenchao Xia
Since BLOCK_JOB_COMPLETED, BLOCK_JOB_CANCELLED, BLOCK_JOB_READY are related, converts them in one patch. The block_job_event_* functions are used to keep encapsulation of BlockJob structure. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- block/mirror.c |2 +- blockdev.c

[Qemu-devel] [PATCH V6 26/29] qapi event: convert BALLOON_CHANGE

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- balloon.c | 13 - docs/qmp/qmp-events.txt| 17 - hw/virtio/virtio-balloon.c |6 -- include/sysemu/balloon.h |2 -- monitor.c |3 +-- qapi-event.json

[Qemu-devel] [PATCH V6 29/29] qapi event: clean up

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- include/monitor/monitor.h | 40 monitor.c | 216 +--- stubs/Makefile.objs|1 - stubs/mon-protocol-event.c |6 -- 4 files changed, 3 insertions(+), 260

[Qemu-devel] [PATCH V6 28/29] qapi event: convert QUORUM events

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- block/quorum.c | 25 - docs/qmp/qmp-events.txt | 41 - monitor.c |6 +++--- qapi-event.json | 38 ++ 4

[Qemu-devel] [PATCH V6 25/29] qapi event: convert SPICE events

2014-06-05 Thread Wenchao Xia
-events.txt before this patch. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 62 - include/qemu/sockets.h |1 - qapi-event.json | 55 + ui/spice-core.c | 70

[Qemu-devel] [PATCH V6 17/29] qapi event: convert WATCHDOG

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 19 --- hw/watchdog/watchdog.c | 23 +++ monitor.c |2 +- qapi-event.json | 15 +++ qapi-schema.json| 24

[Qemu-devel] [PATCH V6 21/29] qapi event: convert BLOCK_IMAGE_CORRUPTED

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- block/qcow2-refcount.c | 14 -- docs/qmp/qmp-events.txt | 22 -- qapi-event.json | 22 ++ 3 files changed, 30 insertions(+), 28 deletions(-) diff --git a/block/qcow2-refcount.c

[Qemu-devel] [PATCH V6 01/29] os-posix: include sys/time.h

2014-06-05 Thread Wenchao Xia
Since gettimeofday() is used in this header file as a macro define, include the function's define header file, to avoid compile warning when other file include os-posix.h. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com Reviewed-by: Eric Blake ebl...@redhat.com --- include/sysemu/os-posix.h

[Qemu-devel] [PATCH V6 19/29] qapi event: convert DEVICE_TRAY_MOVED

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- block.c | 21 +++-- docs/qmp/qmp-events.txt | 18 -- qapi-event.json | 15 +++ 3 files changed, 22 insertions(+), 32 deletions(-) diff --git a/block.c b/block.c index

[Qemu-devel] [PATCH V6 16/29] qapi event: convert RTC_CHANGE

2014-06-05 Thread Wenchao Xia
This patch also eliminates build time warning caused by no caller of monitor_qapi_event_throttle(). Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 16 hw/ppc/spapr_rtas.c |3 ++- hw/timer/mc146818rtc.c |3 ++- include/sysemu

[Qemu-devel] [PATCH V6 27/29] qapi event: convert GUEST_PANICKED

2014-06-05 Thread Wenchao Xia
'monitor.h' is still included in target-s390x/kvm.c, since I have no good way to verify whether other code need it on my x86 host. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 14 -- hw/misc/pvpanic.c | 13 ++--- qapi-event.json

[Qemu-devel] [PATCH V6 23/29] qapi event: convert NIC_RX_FILTER_CHANGED

2014-06-05 Thread Wenchao Xia
Param name is declared as optional, since in code it is an optional one. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 17 - hw/net/virtio-net.c | 13 +++-- qapi-event.json | 15 +++ 3 files changed, 18

[Qemu-devel] [PATCH V6 24/29] qapi event: convert VNC events

2014-06-05 Thread Wenchao Xia
Since VNC_CONNECTED, VNC_DISCONNECTED, VNC_INITIALIZED share some common functions, converts them in one patch. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 90 -- qapi-event.json | 49 + ui

[Qemu-devel] [PATCH V6 10/29] qapi event: convert RESET

2014-06-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- docs/qmp/qmp-events.txt | 12 qapi-event.json |9 + vl.c|2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/docs/qmp/qmp-events.txt b/docs/qmp/qmp-events.txt index

Re: [Qemu-devel] [PATCH V3 0/3] Create an include directive for QAPI JSON files

2014-05-15 Thread Wenchao Xia
has this series been upstream? I am waiting for it to rebase my event series.

Re: [Qemu-devel] qemu core dump when vnc client connect to VM, Is anyone has the similar problem, thanks!

2014-05-15 Thread Wenchao Xia
Yeah, I have experienced it before on some Fefora 18 installation with the qemu and libvirt it packaged. Sadlly I didn't look deep into it at that time. It appeared some time when I boot a linux guest changing its size in startup sequence, or sometime vnc client resize. I guess it is caused by

Re: [Qemu-devel] [PATCH V5 05/28] qapi: define events in qapi schema

2014-05-07 Thread Wenchao Xia
于 2014/5/1 23:00, Eric Blake 写道: On 04/30/2014 10:26 PM, Wenchao Xia wrote: Some old type defines for spice and vnc are changed to let new event defines use them instead of redefine. Note that define of BlockErrorAction is moved from block.h to qapi schema, and it is not merged

Re: [Qemu-devel] [PATCH V5 06/28] monitor: change event functions as an implemention of new emit method

2014-05-07 Thread Wenchao Xia
于 2014/5/2 6:09, Eric Blake 写道: On 04/30/2014 10:26 PM, Wenchao Xia wrote: Now monitor has been hooked on the new event mechanism, so the patches later can convert event callers one by one. qmp_query_events() is also switched to use new generated event defines. Note that old function

Re: [Qemu-devel] [PATCH V5 07/28] qapi event: convert SHUTDOWN

2014-05-07 Thread Wenchao Xia
于 2014/5/1 22:44, Eric Blake 写道: On 04/30/2014 10:26 PM, Wenchao Xia wrote: Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- vl.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) This, and many of the subsequent patches in the series, are a bit misleading; I have to go back

[Qemu-devel] [PATCH V5 13/28] qapi event: convert SUSPEND_DISK

2014-05-01 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- hw/acpi/core.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/acpi/core.c b/hw/acpi/core.c index 79414b4..ace6438 100644 --- a/hw/acpi/core.c +++ b/hw/acpi/core.c @@ -22,11 +22,11 @@ #include hw/hw.h #include

[Qemu-devel] [PATCH V5 22/28] qapi event: convert NIC_RX_FILTER_CHANGED

2014-05-01 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- hw/net/virtio-net.c | 13 +++-- 1 files changed, 3 insertions(+), 10 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 33bd233..216d4e1 100644 --- a/hw/net/virtio-net.c +++ b/hw/net/virtio-net.c @@ -22,7 +22,7

[Qemu-devel] [PATCH V5 16/28] qapi event: convert WATCHDOG

2014-05-01 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- hw/watchdog/watchdog.c | 23 +++ 1 files changed, 7 insertions(+), 16 deletions(-) diff --git a/hw/watchdog/watchdog.c b/hw/watchdog/watchdog.c index f28161b..9284d3f 100644 --- a/hw/watchdog/watchdog.c +++ b/hw/watchdog

[Qemu-devel] [PATCH V5 11/28] qapi event: convert RESUME

2014-05-01 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 717bfc1..3679588 100644 --- a/vl.c +++ b/vl.c @@ -1734,7 +1734,7 @@ void vm_start(void) runstate_set(RUN_STATE_RUNNING

[Qemu-devel] [PATCH V5 12/28] qapi event: convert SUSPEND

2014-05-01 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 3679588..3ee2494 100644 --- a/vl.c +++ b/vl.c @@ -1907,7 +1907,7 @@ static void qemu_system_suspend(void) pause_all_vcpus

[Qemu-devel] [PATCH V5 05/28] qapi: define events in qapi schema

2014-05-01 Thread Wenchao Xia
, since in caller it is optional. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- block.c | 17 +- block/backup.c |2 +- block/mirror.c |7 +- block/stream.c |4 +- blockjob.c | 11 +- docs/qmp/qmp-events.txt | 354

[Qemu-devel] [PATCH V5 00/28] add direct support of event in qapi schema

2014-04-30 Thread Wenchao Xia
-28. 3/28: add prefix for event enum type name, to avoid double define of QAPIEvent in test code. Wenchao Xia (28): 1 os-posix: include sys/time.h 2 qapi: add event helper functions 3 qapi script: add event support 4 test: add test cases for qapi event 5 qapi: define events in qapi

[Qemu-devel] [PATCH V5 01/28] os-posix: include sys/time.h

2014-04-30 Thread Wenchao Xia
Since gettimeofday() is used in this header file as a macro define, include the function's define header file, to avoid compile warning when other file include os-posix.h. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com Reviewed-by: Eric Blake ebl...@redhat.com --- include/sysemu/os-posix.h

[Qemu-devel] [PATCH V5 03/28] qapi script: add event support

2014-04-30 Thread Wenchao Xia
in some cases the real emit behavior may change, for example, qemu-img would not send a event, a callback layer is used to control the behavior. As a result, the stubs at compile time can be saved, the binding of block layer code and monitor code will become looser. Signed-off-by: Wenchao Xia wenchaoq

[Qemu-devel] [PATCH V5 07/28] qapi event: convert SHUTDOWN

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- vl.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 236f95e..9f78bd7 100644 --- a/vl.c +++ b/vl.c @@ -117,6 +117,7 @@ int main(int argc, char **argv) #include ui/qemu-spice.h #include qapi/string

[Qemu-devel] [PATCH V5 02/28] qapi: add event helper functions

2014-04-30 Thread Wenchao Xia
This file holds some functions that do not need to be generated. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- include/qapi/qmp-event.h | 27 + qapi/Makefile.objs |1 + qapi/qmp-event.c | 74 ++ 3 files

[Qemu-devel] [PATCH V5 04/28] test: add test cases for qapi event

2014-04-30 Thread Wenchao Xia
These cases will verify whether the expected qdict is built. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- tests/Makefile | 14 ++- tests/qapi-schema/qapi-schema-test.json | 12 ++ tests/qapi-schema/qapi-schema-test.out | 10 +- tests/test-qmp-event.c

[Qemu-devel] [PATCH V5 06/28] monitor: change event functions as an implemention of new emit method

2014-04-30 Thread Wenchao Xia
limiting is bypassed to avoid too many duplicated code. After convertion, the function would be removed. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- monitor.c | 47 ++- 1 files changed, 26 insertions(+), 21 deletions(-) diff --git a/monitor.c b

[Qemu-devel] [PATCH V5 09/28] qapi event: convert RESET

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 5dd30c9..717bfc1 100644 --- a/vl.c +++ b/vl.c @@ -1886,7 +1886,7 @@ void qemu_system_reset(bool report) qemu_devices_reset

[Qemu-devel] [PATCH V5 10/28] qapi event: convert STOP

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- cpus.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cpus.c b/cpus.c index 7bbe153..95a0228 100644 --- a/cpus.c +++ b/cpus.c @@ -25,7 +25,7 @@ /* Needed early for CONFIG_BSD etc. */ #include config-host.h

[Qemu-devel] [PATCH V5 14/28] qapi event: convert WAKEUP

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 3ee2494..73b4725 100644 --- a/vl.c +++ b/vl.c @@ -2031,7 +2031,7 @@ static bool main_loop_should_exit(void) notifier_list_notify

[Qemu-devel] [PATCH V5 08/28] qapi event: convert POWERDOWN

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index 9f78bd7..5dd30c9 100644 --- a/vl.c +++ b/vl.c @@ -1970,7 +1970,7 @@ void qemu_system_shutdown_request(void) static void qemu_system_powerdown

[Qemu-devel] [PATCH V5 24/28] qapi event: convert SPICE events

2014-04-30 Thread Wenchao Xia
SPICE_INITIALIZED, SPICE_CONNECTED, SPICE_DISCONNECTED and SPICE_MIGRATE_COMPLETED are converted. inet_strfamily is removed since no more caller exist now. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- include/qemu/sockets.h |1 - ui/spice-core.c| 70

[Qemu-devel] [PATCH V5 23/28] qapi event: convert VNC events

2014-04-30 Thread Wenchao Xia
VNC_CONNECTED, VNC_DISCONNECTED, VNC_INITIALIZED are converted. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- ui/vnc.c | 111 -- ui/vnc.h |4 +- 2 files changed, 59 insertions(+), 56 deletions(-) diff --git a/ui/vnc.c b/ui

[Qemu-devel] [PATCH V5 27/28] qapi event: convert QUORUM events

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- block/quorum.c | 25 - 1 files changed, 8 insertions(+), 17 deletions(-) diff --git a/block/quorum.c b/block/quorum.c index ecec3a5..5d1c3dc 100644 --- a/block/quorum.c +++ b/block/quorum.c @@ -17,6 +17,7 @@ #include

[Qemu-devel] [PATCH V5 26/28] qapi event: convert GUEST_PANICKED

2014-04-30 Thread Wenchao Xia
monitor.h is still included in target-s390x/kvm.c, since no good way to verify whether other code need it on my x86 host. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- hw/misc/pvpanic.c | 13 ++--- target-s390x/kvm.c |8 +++- 2 files changed, 5 insertions(+), 16

[Qemu-devel] [PATCH V5 19/28] qapi event: convert BLOCK_IO_ERROR and BLOCK_JOB_ERROR

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- block.c | 36 blockjob.c|6 +- include/block/block_int.h |3 --- 3 files changed, 9 insertions(+), 36 deletions(-) diff --git a/block.c b/block.c index

[Qemu-devel] [PATCH V5 28/28] qapi event: clean up

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- include/monitor/monitor.h | 40 - monitor.c | 81 stubs/Makefile.objs|1 - stubs/mon-protocol-event.c |6 --- 4 files changed, 0 insertions

[Qemu-devel] [PATCH V5 20/28] qapi event: convert BLOCK_IMAGE_CORRUPTED

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- block/qcow2-refcount.c | 14 -- 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index a37ee45..3ab6b4e 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c

[Qemu-devel] [PATCH V5 21/28] qapi event: convert other BLOCK_JOB events

2014-04-30 Thread Wenchao Xia
BLOCK_JOB_COMPLETED, BLOCK_JOB_CANCELLED, BLOCK_JOB_READY are converted. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- block/mirror.c |2 +- blockdev.c | 12 +--- blockjob.c | 36 include/block

[Qemu-devel] [PATCH V5 25/28] qapi event: convert BALLOON_CHANGE

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- balloon.c | 13 - hw/virtio/virtio-balloon.c |6 -- include/sysemu/balloon.h |2 -- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/balloon.c b/balloon.c index e321f2c..b70da4f 100644

[Qemu-devel] [PATCH V5 18/28] qapi event: convert DEVICE_TRAY_MOVED

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- block.c | 21 +++-- 1 files changed, 7 insertions(+), 14 deletions(-) diff --git a/block.c b/block.c index e9a55bb..dae5d25 100644 --- a/block.c +++ b/block.c @@ -35,6 +35,7 @@ #include block/qapi.h #include qmp-commands.h

[Qemu-devel] [PATCH V5 17/28] qapi event: convert DEVICE_DELETED

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- hw/core/qdev.c | 12 ++-- 1 files changed, 2 insertions(+), 10 deletions(-) diff --git a/hw/core/qdev.c b/hw/core/qdev.c index 60f9df1..ac85eaf 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -32,8 +32,8 @@ #include qapi/qmp

[Qemu-devel] [PATCH V5 15/28] qapi event: convert RTC_CHANGE

2014-04-30 Thread Wenchao Xia
Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- hw/ppc/spapr_rtas.c |3 ++- hw/timer/mc146818rtc.c |3 ++- include/sysemu/sysemu.h |2 -- vl.c|9 - 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/hw/ppc/spapr_rtas.c b/hw/ppc

Re: [Qemu-devel] [RFC PATCH V4 2/5] qapi: add event helper functions

2014-04-02 Thread Wenchao Xia
于 2014/3/28 16:21, Markus Armbruster 写道: Eric Blake ebl...@redhat.com writes: On 03/27/2014 02:03 AM, Wenchao Xia wrote: This file holds some functions that do not need to be generated. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- include/qapi/qmp-event.h | 27

Re: [Qemu-devel] [RFC PATCH V2 3/5] qapi script: add event support by qapi-event.py

2014-03-27 Thread Wenchao Xia
You may need to rebase this on top of other patches that refactor the qapi generators to track the input file, for improved error messages. It seems qapi-visit.py and qapi-types.py remains the same as above in upstream, which kind of change are your referring to? Lluís' patch to use an

[Qemu-devel] [RFC PATCH V4 0/5] add direct support of event in qapi schema

2014-03-27 Thread Wenchao Xia
file better seems not the final version, so I didn't rebase this series ontop for now, will do it once Benoit's ones get ACKed. Wenchao Xia (5): 1 os-posix: include sys/time.h 2 qapi: add event helper functions 3 qapi script: add event support 4 test: add test cases for qapi event 5 qapi

[Qemu-devel] [RFC PATCH V4 1/5] os-posix: include sys/time.h

2014-03-27 Thread Wenchao Xia
Since gettimeofday() is used in this header file as a macro define, include the function's define header file, to avoid compile warning when other file include os-posix.h. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com Reviewed-by: Eric Blake ebl...@redhat.com --- include/sysemu/os-posix.h

[Qemu-devel] [RFC PATCH V4 3/5] qapi script: add event support

2014-03-27 Thread Wenchao Xia
in some cases the real emit behavior may change, for example, qemu-img would not send a event, a callback layer is used to control the behavior. As a result, the stubs at compile time can be saved, the binding of block layer code and monitor code will become looser. Signed-off-by: Wenchao Xia wenchaoq

[Qemu-devel] [RFC PATCH V4 2/5] qapi: add event helper functions

2014-03-27 Thread Wenchao Xia
This file holds some functions that do not need to be generated. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- include/qapi/qmp-event.h | 27 + qapi/Makefile.objs |1 + qapi/qmp-event.c | 70 ++ 3 files

[Qemu-devel] [RFC PATCH V4 4/5] test: add test cases for qapi event

2014-03-27 Thread Wenchao Xia
These cases will verify whether the expected qdict is built. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com --- tests/Makefile | 14 ++- tests/qapi-schema/qapi-schema-test.json | 12 ++ tests/qapi-schema/qapi-schema-test.out | 10 +- tests/test-qmp-event.c

[Qemu-devel] [RFC PATCH V4 5/5] qapi event: convert RTC_CHANGE

2014-03-27 Thread Wenchao Xia
This is just an example of how to use qapi event API, and it bypassed the event throttle queue. A complete convert should be first define all events in qapi-schema.json, use qapi event types in monitor functions, then change caller one by one. Signed-off-by: Wenchao Xia wenchaoq...@gmail.com

Re: [Qemu-devel] [PATCH 2/2] qapi: Create an include directive for use in the JSON description files.

2014-03-26 Thread Wenchao Xia
Just saw the discuss of Lluís's patch, either { 'include': './include/include.json' } or include(include-cycle-b.json) is OK to me, but hope only one way is kepted in the end.

Re: [Qemu-devel] [RFC PATCH V3 2/5] qapi: add event helper functions

2014-03-23 Thread Wenchao Xia
于 2014/3/21 6:53, Eric Blake 写道: On 03/18/2014 11:16 PM, Wenchao Xia wrote: This file hold some functions that do not need to be generated. s/hold/holds/ Signed-off-by: Wenchao Xiawenchaoq...@gmail.com --- include/qapi/qmp-event.h | 25 qapi/Makefile.objs |1

  1   2   3   4   5   6   7   8   9   10   >