[Qemu-devel] [PATCH V5 6/6] qemu-iotests: add test for qcow2 snapshot

2013-11-05 Thread Wenchao Xia
This test will focus on the low level procedure of qcow2 snapshot operations, now it covers only the create operation. Overlap error paths are not checked since no good way to trigger those errors. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- tests/qemu-iotests/070 | 214

[Qemu-devel] [PATCH V5 3/6] qcow2: do not free clusters when fail in header update in qcow2_write_snapshots

2013-11-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Max Reitz mre...@redhat.com --- block/qcow2-snapshot.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index 6a1d9de..70e329e 100644 ---

[Qemu-devel] [PATCH V5 0/6] qcow2: rollback the modification on fail in snapshot creation

2013-11-05 Thread Wenchao Xia
V2: 1: all fail case will goto fail section. 2: add the goto code. v3: Address Stefan's comments: 2: don't goto fail after allocation failure. 3: use sn-l1size correctly in qcow2_free_cluster(). 4-7: add test case to verify the error paths. Other: 1: new patch fix a existing bug,

[Qemu-devel] [PATCH V5 1/6] snapshot: add parameter *errp in snapshot create

2013-11-05 Thread Wenchao Xia
The return value is only used for error report before this patch, so change the function protype to return void. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- block/qcow2-snapshot.c| 30 +- block/qcow2.h |4 +++- block/rbd.c

[Qemu-devel] [PATCH V5 4/6] qcow2: cancel the modification on fail in qcow2_snapshot_create()

2013-11-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Max Reitz mre...@redhat.com --- block/qcow2-snapshot.c | 25 + 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index 70e329e..685ef8b 100644

[Qemu-devel] [PATCH V5 5/6] blkdebug: add debug events for snapshot

2013-11-05 Thread Wenchao Xia
Some code in qcow2-snapshot.c directly accesses bs-file, so in those places errors can't be injected by other events. Since the code in qcow2-snapshot.c is similar to the other qcow2 internal code (in regards to e.g. the L1 table), add some debug events. Signed-off-by: Wenchao Xia

[Qemu-devel] [PATCH v2 1/4] apic: Cleanup for QOM'ify

2013-11-05 Thread xiaoqiang zhao
do some cleanup, includes: 1. remove DO_UPCAST() for APICCommonState 2. Change DeviceState pointers from 'd' to 'dev', better to understand 3. rename 'register_types' to specifically 'apic_common_register_types' --- hw/i386/kvm/apic.c|8 +++ hw/intc/apic.c| 42

[Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic icc_bus

2013-11-05 Thread xiaoqiang zhao
changes includes: 1. use type constant for apic and kvm_apic 2. convert function 'init' to QOM's 'realize' for apic/kvm_apic 3. for consistency, also QOM'ify apic's parent bus 'icc_bus' --- hw/cpu/icc_bus.c| 14 ++ hw/i386/kvm/apic.c | 10 +++---

[Qemu-devel] [PATCH v2 0/4] QOM'ify apic and ioapic

2013-11-05 Thread xiaoqiang zhao
This series of patch QOM'ify apic and ioapic. Just replace old 'init' with QOM's 'realize', the call logic is untouched. the first patch of each is a cleanup. the second patch complete the convertion. All patch have been compiled and tested successfully. Changes since v1: - separate cleanup

[Qemu-devel] [PATCH v2 3/4] ioapic: Cleanup for QOM'ify

2013-11-05 Thread xiaoqiang zhao
some cleanup: 1. ioapic_common.c: rename 'register_types' to 'ioapic_common_register_types' 2. change 'DEVICE(s)' to dev conversion by introducing local variable 'DeviceState *dev' --- hw/i386/kvm/ioapic.c|4 +++- hw/intc/ioapic.c|4 +++- hw/intc/ioapic_common.c |4 ++--

[Qemu-devel] [PATCH v2 0/4] QOM'ify apic and ioapic

2013-11-05 Thread xiaoqiang zhao
This series of patch QOM'ify apic and ioapic. Just replace old 'init' with QOM's 'realize', the call logic is untouched. the first patch of each is a cleanup. the second patch complete the convertion. All patch have been compiled and tested successfully. Changes since v1: - separate cleanup

[Qemu-devel] [PATCH v2 1/4] apic: Cleanup for QOM'ify

2013-11-05 Thread xiaoqiang zhao
do some cleanup, includes: 1. remove DO_UPCAST() for APICCommonState 2. Change DeviceState pointers from 'd' to 'dev', better to understand 3. rename 'register_types' to specifically 'apic_common_register_types' Signed-off-by: xiaoqiang zhao zxq_yx_...@163.com --- hw/i386/kvm/apic.c|8

[Qemu-devel] [PATCH v2 3/4] ioapic: Cleanup for QOM'ify

2013-11-05 Thread xiaoqiang zhao
some cleanup: 1. ioapic_common.c: rename 'register_types' to 'ioapic_common_register_types' 2. change 'DEVICE(s)' to dev conversion by introducing local variable 'DeviceState *dev' Signed-off-by: xiaoqiang zhao zxq_yx_...@163.com --- hw/i386/kvm/ioapic.c|4 +++- hw/intc/ioapic.c

[Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic icc_bus

2013-11-05 Thread xiaoqiang zhao
changes includes: 1. use type constant for apic and kvm_apic 2. convert function 'init' to QOM's 'realize' for apic/kvm_apic 3. for consistency, also QOM'ify apic's parent bus 'icc_bus' Signed-off-by: xiaoqiang zhao zxq_yx_...@163.com --- hw/cpu/icc_bus.c| 14 ++

[Qemu-devel] [PATCH V5 2/6] qcow2: add error message in qcow2_write_snapshots()

2013-11-05 Thread Wenchao Xia
The function still returns int since qcow2_snapshot_delete() will return the number. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- block/qcow2-snapshot.c | 43 +-- 1 files changed, 37 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH v2 4/4] ioapic: QOM'ify ioapic

2013-11-05 Thread xiaoqiang zhao
changes: 1. use type constant for kvm_ioapic and ioapic 2. convert 'init' to QOM's 'realize' for ioapic and kvm_ioapic For QOM'ify, I move variable 'ioapic_no' from static to global. Then we can drop the 'instance_no' argument. Now, it's child that increase 'ioapic_no' counter. Signed-off-by:

[Qemu-devel] [PATCH v2 4/4] ioapic: QOM'ify ioapic

2013-11-05 Thread xiaoqiang zhao
changes: 1. use type constant for kvm_ioapic and ioapic 2. convert 'init' to QOM's 'realize' for ioapic and kvm_ioapic For QOM'ify, I move variable 'ioapic_no' from static to global. Then we can drop the 'instance_no' argument. Now, it's child that increase 'ioapic_no' counter. ---

Re: [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic icc_bus

2013-11-05 Thread Chen Fan
On Tue, 2013-11-05 at 15:55 +0800, xiaoqiang zhao wrote: changes includes: 1. use type constant for apic and kvm_apic 2. convert function 'init' to QOM's 'realize' for apic/kvm_apic 3. for consistency, also QOM'ify apic's parent bus 'icc_bus' --- hw/cpu/icc_bus.c| 14

[Qemu-devel] Device Emulation in QEMU

2013-11-05 Thread Ayaz Akram
Hi, I am at beginner's level in the field of QEMU... I wanted to know how device emulation works in QEMU? Any helping material or link would be highly appreciated...

[Qemu-devel] [PATCH RFC 05/10] qapi script: use same function to generate enum string

2013-11-05 Thread Wenchao Xia
One function one rule, so the enum string generating have same behavior for different caller. If multiple caller exist for one enum define in schema, it is for sure the generated string is identical. Note before the patch qapi-visit.py used custom function to generate the string in union visit,

[Qemu-devel] [PATCH RFC 03/10] qapi script: check correctness of discriminator values in union

2013-11-05 Thread Wenchao Xia
It will check whether the values specfied are wrotten correctly when discriminator is a pre-defined enum type, which help check whether the schema is in good form. It is allowed that, not every value in enum is used, so do not check that case. Signed-off-by: Wenchao Xia

[Qemu-devel] [PATCH RFC 04/10] qapi script: code move for generate_enum_name()

2013-11-05 Thread Wenchao Xia
Later both qapi-types.py and qapi-visit.py need a common function for enum name generation. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- scripts/qapi-types.py | 10 -- scripts/qapi.py | 10 ++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git

[Qemu-devel] [PATCH RFC 06/10] qapi script: not generate hidden enum type for pre-defined enum discriminator

2013-11-05 Thread Wenchao Xia
By default, any union will automatically generate a enum type as [UnionName]Kind in C code, and it is duplicated when the discriminator is specified as a pre-defined enum type in schema. After this patch, the pre-defined enum type will be really used as the switch case condition in generated C

[Qemu-devel] [PATCH RFC 07/10] qapi script: support direct inheritance for struct

2013-11-05 Thread Wenchao Xia
Now it is possible to inherit another struct inside data directly, which saves trouble to define trivial structure. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- docs/qapi-code-gen.txt | 21 + scripts/qapi-visit.py | 14 ++ 2 files changed, 31

[Qemu-devel] [PATCH RFC 01/10] qapi: fix memleak by add implict struct functions in dealloc visitor

2013-11-05 Thread Wenchao Xia
Otherwise they are leaked in a qap_free_STRUCTURE() call. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Cc: qemu-sta...@nongnu.org --- qapi/qapi-dealloc-visitor.c | 20 1 files changed, 20 insertions(+), 0 deletions(-) diff --git a/qapi/qapi-dealloc-visitor.c

[Qemu-devel] [PATCH RFC 09/10] tests: fix memleak in error path test for input visitor

2013-11-05 Thread Wenchao Xia
Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Cc: qemu-sta...@nongnu.org --- tests/test-qmp-input-visitor.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/tests/test-qmp-input-visitor.c b/tests/test-qmp-input-visitor.c index 0beb8fb..1e1c6fa 100644 ---

[Qemu-devel] [PATCH RFC 10/10] tests: add cases for inherited struct and union with discriminator

2013-11-05 Thread Wenchao Xia
Test for inherit and complex union. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- tests/qapi-schema/qapi-schema-test.json | 36 + tests/qapi-schema/qapi-schema-test.out | 15 ++ tests/test-qmp-input-visitor.c | 188

[Qemu-devel] [PATCH RFC 08/10] qapi script: do not add _ for every capitalized char in enum

2013-11-05 Thread Wenchao Xia
Now enum AIOContext will generate AIO_CONTEXT instead of A_I_O_CONTEXT, X86CPU will generate X86_CPU instead of X86_C_P_U. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- include/qapi/qmp/qerror.h |2 +- scripts/qapi.py | 26 +++--- target-i386/cpu.c

Re: [Qemu-devel] [PATCH v5 0/8] Add metadata overlap checks

2013-11-05 Thread Stefan Hajnoczi
On Sat, Oct 26, 2013 at 03:03:09PM +0200, Max Reitz wrote: Am 20.09.2013 12:32, schrieb Stefan Hajnoczi: On Thu, Sep 19, 2013 at 05:07:56PM +0200, Max Reitz wrote: As far as I understand, the I/O speed (the duration of an I/O operation) should be pretty much the same for all scenarios,

[Qemu-devel] [PATCH RFC 02/10] qapi script: remember enum values

2013-11-05 Thread Wenchao Xia
Later other script will need to check the enum values. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- scripts/qapi.py| 18 ++ tests/qapi-schema/comments.out |2 +- tests/qapi-schema/qapi-schema-test.out |4 +++- 3 files

Re: [Qemu-devel] [PATCH v2 2/4] apic: QOM'ify apic icc_bus

2013-11-05 Thread 赵小强
于 2013年11月05日 16:25, Chen Fan 写道: On Tue, 2013-11-05 at 15:55 +0800, xiaoqiang zhao wrote: changes includes: 1. use type constant for apic and kvm_apic 2. convert function 'init' to QOM's 'realize' for apic/kvm_apic 3. for consistency, also QOM'ify apic's parent bus 'icc_bus' ---

[Qemu-devel] [PATCH RFC 00/10] qapi script: support enum as discriminator and other improves

2013-11-05 Thread Wenchao Xia
Patch 1 and 9 fix two memleak issue. Patch 2-6 add support for enum type as discriminator Patch 7 add _base support which can reduce number of defined structure Patch 8 fix enum name generation issue, now AIOContext-AIO_CONTEXT, X86CPU- X86_CPU. Patch 10 are a butch of test cases. Wenchao Xia

Re: [Qemu-devel] [PATCH] extend limit of physical sections number

2013-11-05 Thread Paolo Bonzini
Il 05/11/2013 01:36, Peter Maydell ha scritto: On 27 September 2013 17:49, Amos Kong ak...@redhat.com wrote: # qemu -drive file=/disk0,if=none,id=v0,format=qcow2 \ -device virtio-blk-pci,drive=v0,id=v00,multifunction=on,addr=0x04.0 Launching guest with more than 32 virtio-blk disks,

Re: [Qemu-devel] [PATCH v2 2/2] qemu-iotests: Add test for unbacked mirroring

2013-11-05 Thread Wenchao Xia
于 2013/11/5 8:35, Max Reitz 写道: Add a new test for mirroring unbacked images in absolute-paths mode. This should work, if possible, but most importantly, qemu should never crash. Signed-off-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/070 | 91

Re: [Qemu-devel] [PATCH] iscsi: add error handling for qmp_query_uuid

2013-11-05 Thread Paolo Bonzini
Il 05/11/2013 01:08, Amos Kong ha scritto: We can't assume that qmp_query_uuid() always returns available value. Signed-off-by: Amos Kong ak...@redhat.com --- block/iscsi.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index

Re: [Qemu-devel] [PATCH] spapr: add compat machine option

2013-11-05 Thread Paolo Bonzini
Il 30/09/2013 14:57, Alexey Kardashevskiy ha scritto: Why is the option under -machine instead of -cpu? Because it is still the same CPU and the guest will still read the real PVR from the hardware (which it may not support but this is why we need compatibility mode). How do you support

Re: [Qemu-devel] [PATCH] migration: avoid starting a new migration task while the previous one still exist

2013-11-05 Thread Paolo Bonzini
Il 05/11/2013 03:23, Zhanghaoyu (A) ha scritto: Avoid starting a new migration task while the previous one still exist. Can you explain how to reproduce the problem? When network disconnection between source and destination happened, the migration thread stuck at below stack, #0

Re: [Qemu-devel] [PATCH] spapr: add compat machine option

2013-11-05 Thread Alexander Graf
On 05.11.2013, at 10:06, Paolo Bonzini pbonz...@redhat.com wrote: Il 30/09/2013 14:57, Alexey Kardashevskiy ha scritto: Why is the option under -machine instead of -cpu? Because it is still the same CPU and the guest will still read the real PVR from the hardware (which it may not support

Re: [Qemu-devel] [PATCH] spapr: add compat machine option

2013-11-05 Thread Alexander Graf
On 05.11.2013, at 03:19, Alexey Kardashevskiy a...@ozlabs.ru wrote: On 10/01/2013 12:49 AM, Alexander Graf wrote: On 09/30/2013 03:22 PM, Alexey Kardashevskiy wrote: On 30.09.2013 21:25, Alexander Graf wrote: On 27.09.2013, at 10:06, Alexey Kardashevskiy wrote: I realized it has been a

Re: [Qemu-devel] [PATCH 0/8] Make icount thread-safe

2013-11-05 Thread Stefan Hajnoczi
On Tue, Oct 08, 2013 at 10:47:30AM +0200, Paolo Bonzini wrote: This series moves the icount state under the same seqlock as the normal vm_clock implementation. It is not yet 100% thread-safe, because the CPU list should be moved under RCU protection (due to the call to

Re: [Qemu-devel] [PATCH] spapr: add compat machine option

2013-11-05 Thread Paolo Bonzini
Il 05/11/2013 10:16, Alexander Graf ha scritto: On 05.11.2013, at 10:06, Paolo Bonzini pbonz...@redhat.com wrote: Il 30/09/2013 14:57, Alexey Kardashevskiy ha scritto: Why is the option under -machine instead of -cpu? Because it is still the same CPU and the guest will still read the real

[Qemu-devel] [PATCH v3 3/4] ioapic: Cleanup for QOM'ify

2013-11-05 Thread xiaoqiang zhao
some cleanup: 1. ioapic_common.c: rename 'register_types' to 'ioapic_common_register_types' 2. change 'DEVICE(s)' to dev conversion by introducing local variable 'DeviceState *dev' Signed-off-by: xiaoqiang zhao zxq_yx_...@163.com --- hw/i386/kvm/ioapic.c|4 +++- hw/intc/ioapic.c

[Qemu-devel] [PATCH v3 1/4] apic: Cleanup for QOM'ify

2013-11-05 Thread xiaoqiang zhao
do some cleanup, includes: 1. remove DO_UPCAST() for APICCommonState 2. Change DeviceState pointers from 'd' to 'dev', better to understand 3. rename 'register_types' to specifically 'apic_common_register_types' Signed-off-by: xiaoqiang zhao zxq_yx_...@163.com --- hw/i386/kvm/apic.c|8

[Qemu-devel] [PATCH v3 2/4] apic: QOM'ify apic icc_bus

2013-11-05 Thread xiaoqiang zhao
changes includes: 1. use type constant for apic and kvm_apic 2. convert function 'init' to QOM's 'realize' for apic/kvm_apic 3. for consistency, also QOM'ify apic's parent bus 'icc_bus' Signed-off-by: xiaoqiang zhao zxq_yx_...@163.com --- hw/cpu/icc_bus.c| 14 ++

[Qemu-devel] [PATCH v3 4/4] ioapic: QOM'ify ioapic

2013-11-05 Thread xiaoqiang zhao
changes: 1. use type constant for kvm_ioapic and ioapic 2. convert 'init' to QOM's 'realize' for ioapic and kvm_ioapic For QOM'ify, I move variable 'ioapic_no' from static to global. Then we can drop the 'instance_no' argument. Now, it's child that increase 'ioapic_no' counter. Signed-off-by:

[Qemu-devel] [PATCH v3 0/4] QOM'ify apic and ioapic

2013-11-05 Thread xiaoqiang zhao
This series of patch QOM'ify apic and ioapic. Just replace old 'init' with QOM's 'realize', the call logic is untouched. the first patch of each is a cleanup. the second patch complete the convertion. All patch have been compiled and tested successfully. Changes since v2: - fix code style check

Re: [Qemu-devel] [PATCH] spapr: add compat machine option

2013-11-05 Thread Alexander Graf
On 05.11.2013, at 10:52, Paolo Bonzini pbonz...@redhat.com wrote: Il 05/11/2013 10:16, Alexander Graf ha scritto: On 05.11.2013, at 10:06, Paolo Bonzini pbonz...@redhat.com wrote: Il 30/09/2013 14:57, Alexey Kardashevskiy ha scritto: Why is the option under -machine instead of -cpu?

Re: [Qemu-devel] [PATCH] spapr: add compat machine option

2013-11-05 Thread Paolo Bonzini
Il 05/11/2013 11:27, Alexander Graf ha scritto: On 05.11.2013, at 10:52, Paolo Bonzini pbonz...@redhat.com wrote: Il 05/11/2013 10:16, Alexander Graf ha scritto: On 05.11.2013, at 10:06, Paolo Bonzini pbonz...@redhat.com wrote: Il 30/09/2013 14:57, Alexey Kardashevskiy ha scritto: Why

Re: [Qemu-devel] [PATCH] spapr: add compat machine option

2013-11-05 Thread Alexey Kardashevskiy
On 11/05/2013 08:52 PM, Paolo Bonzini wrote: Il 05/11/2013 10:16, Alexander Graf ha scritto: On 05.11.2013, at 10:06, Paolo Bonzini pbonz...@redhat.com wrote: Il 30/09/2013 14:57, Alexey Kardashevskiy ha scritto: Why is the option under -machine instead of -cpu? Because it is still the same

Re: [Qemu-devel] [PATCH] spapr: add compat machine option

2013-11-05 Thread Paolo Bonzini
Il 05/11/2013 11:45, Alexey Kardashevskiy ha scritto: Still in my opinion it should be -cpu, not -machine. Even if it's just a virtual CPU model. The compat option itself does not make much sense (yes we could just add yet another CPU class and that's it) but with the

Re: [Qemu-devel] [PATCH v2 0/2] block/drive-mirror: Check for NULL backing_hd

2013-11-05 Thread Paolo Bonzini
Il 05/11/2013 01:35, Max Reitz ha scritto: It should be possible to execute the QMP drive-mirror command in none sync mode and absolute-paths mode even for block devices lacking a backing file. absolute-paths does in fact not require a backing file to be present, as can be seen from the top

[Qemu-devel] [PATCH] net: move rxfilter_notify() to net.c

2013-11-05 Thread Amos Kong
rxfilter_notify() is a generic function for all nics, not only for virtio_net, so move it to net.c Signed-off-by: Amos Kong ak...@redhat.com --- hw/net/virtio-net.c | 32 +--- include/net/net.h | 1 + net/net.c | 20 3 files changed,

[Qemu-devel] [PATCH] e1000/rtl8139: update HMP NIC when every bit is written

2013-11-05 Thread Amos Kong
We currently just update the HMP NIC info when the last bit of macaddr is written. This assumes that guest driver will write all the macaddr from bit 0 to bit 5 when it changes the macaddr, this is the current behavior of linux driver (e1000/rtl8139cp), but we can't do this assumption. The

[Qemu-devel] [PATCH] integrator/cp: add support for REFCNT register

2013-11-05 Thread Jan Petrouš
Linux kernel from version 3.4 requires CM_REFCNT register for sched timer for Integrator/CP board (integrator_defconfig). See http://infocenter.arm.com/help/topic/com.arm.doc.dui0138e/ch04s06s11.html Signed-off-by: Jan Petrous jan.petr...@tieto.com --- hw/arm/integratorcp.c | 7 +-- 1 file

Re: [Qemu-devel] [PATCH v3 1/7] blockdev: fix drive_init() opts and bs_opts leaks

2013-11-05 Thread Eric Blake
On 10/30/2013 07:54 AM, Stefan Hajnoczi wrote: These memory leaks also make drive_add if=none,id=drive0 without a file= option leak the options list. This keeps ID drive0 around forever. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- blockdev.c | 27 +++ 1

Re: [Qemu-devel] [PATCH v3 2/7] qdev: unref qdev when device_add fails

2013-11-05 Thread Eric Blake
On 10/30/2013 07:54 AM, Stefan Hajnoczi wrote: qdev_device_add() leaks the created qdev upon failure. I suspect this problem crept in because qdev_free() unparents the qdev but does not drop a reference - confusing name. Is it worth renaming in a future patch? Also drop trailing

Re: [Qemu-devel] [PATCH v3 3/7] libqtest: rename qmp() to qmp_discard_response()

2013-11-05 Thread Eric Blake
On 10/30/2013 07:54 AM, Stefan Hajnoczi wrote: Existing qmp() callers do not expect a response object. In order to implement real QMP test cases it will be necessary to inspect the response object. Rename qmp() to qmp_discard_response(). Later patches will introduce a qmp() function that

Re: [Qemu-devel] [PATCH v3 4/7] libqtest: add qmp(fmt, ...) - QDict* function

2013-11-05 Thread Eric Blake
On 10/30/2013 07:54 AM, Stefan Hajnoczi wrote: Add a qtest qmp() function that returns the response object. This allows test cases to verify the result or to check for error responses. It also allows waiting for QMP events. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com ---

Re: [Qemu-devel] [PATCH v3 5/7] blockdev-test: add test case for drive_add duplicate IDs

2013-11-05 Thread Eric Blake
On 10/30/2013 07:54 AM, Stefan Hajnoczi wrote: The following should work: (qemu) drive_add if=none,id=drive0 (qemu) drive_del drive0 (qemu) drive_add if=none,id=drive0 Previous versions of QEMU produced a duplicate ID error because drive_add leaked the options. Signed-off-by:

Re: [Qemu-devel] [PATCH v3 6/7] qdev-monitor-test: add device_add leak test cases

2013-11-05 Thread Eric Blake
On 10/30/2013 07:54 AM, Stefan Hajnoczi wrote: Ensure that the device_add error code path deletes device objects. Failure to do so not only leaks the objects but can also keep other objects (like drive or netdev) alive due to qdev properties holding references. Signed-off-by: Stefan

Re: [Qemu-devel] [PATCH v3 7/7] qdev: drop misleading qdev_free() function

2013-11-05 Thread Eric Blake
On 10/30/2013 07:54 AM, Stefan Hajnoczi wrote: The qdev_free() function name is misleading since all the function does is unlink the device from its parent. The device is not necessarily freed. Aha - you anticipated my comment on 2/7 :) The device will be freed when its QObject refcount

Re: [Qemu-devel] [PATCH] doc: fix hardcode helper path

2013-11-05 Thread Stefan Hajnoczi
On Wed, Oct 23, 2013 at 04:49:28AM +0800, Amos Kong wrote: The install directory of qemu-bridge-helper is configurabled, but we used a fixed path in document. DEFAULT_BRIDGE_HELPER macro isn't available in texi mode, we always use /path/to/ prefix for dynamic path (eg: /path/to/image,

Re: [Qemu-devel] [PATCH] extend limit of physical sections number

2013-11-05 Thread Peter Maydell
On 5 November 2013 09:00, Paolo Bonzini pbonz...@redhat.com wrote: Il 05/11/2013 01:36, Peter Maydell ha scritto: On 27 September 2013 17:49, Amos Kong ak...@redhat.com wrote: # qemu -drive file=/disk0,if=none,id=v0,format=qcow2 \ -device

Re: [Qemu-devel] [PATCH] extend limit of physical sections number

2013-11-05 Thread Paolo Bonzini
Il 05/11/2013 13:23, Peter Maydell ha scritto: This looks really weird. Why should the memory subsystem care whether we're using TCG or KVM or Xen? Because only TCG stores the section number in the low bits of the iotlb entry. This is exactly what is explained in the comments. So

[Qemu-devel] [Bug 1248168] [NEW] MIPS, self-modifying code and uncached memory

2013-11-05 Thread Nikita Kanunnikov
Public bug reported: Self-modifying code does not work properly in MIPS in uncached and unmapped kseg1 memory region. For example, when running this code I get unexpected behavior: 0: e310b 0x390 4: nop ... 380: 00701f40mfc0

[Qemu-devel] [PATCH 1/1] qxl: replace pipe signaling with bottom half

2013-11-05 Thread Gerd Hoffmann
qxl creates a pipe, then writes something to it to wake up the iothread from the spice server thread to raise an irq. These days qemu bottom halves can be scheduled from threads and signals, so there is no reason to do this any more. Time to clean it up. Signed-off-by: Gerd Hoffmann

[Qemu-devel] [PULL for-1.7 0/1] spice bugfix queue

2013-11-05 Thread Gerd Hoffmann
Hi, Here comes the spice patch queue, with a qxl single bugfix for 1.7. please pull, Gerd The following changes since commit a126050a103c924b03388a9a64ce9af8c96b0969: Merge remote-tracking branch 'kwolf/tags/for-anthony' into staging (2013-10-31 17:02:26 +0100) are available in the git

Re: [Qemu-devel] [PATCH] net: fix qemu_flush_queued_packets() in presence of a hub

2013-11-05 Thread Stefan Hajnoczi
On Tue, Nov 05, 2013 at 10:54:29AM +0400, Sergey Fedorov wrote: Do not return after net_hub_flush(). Always flush callee network client incoming queue. Signed-off-by: Sergey Fedorov s.fedo...@samsung.com --- net/net.c |1 - 1 file changed, 1 deletion(-) Thanks, applied to my net

Re: [Qemu-devel] [PATCH v2] iscsi: add error handling for qmp_query_uuid

2013-11-05 Thread Stefan Hajnoczi
On Tue, Nov 05, 2013 at 08:33:14AM +0800, Amos Kong wrote: We can't assume that qmp_query_uuid() always returns available value. Signed-off-by: Amos Kong ak...@redhat.com --- v2: free errp if it's set --- block/iscsi.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-)

Re: [Qemu-devel] [PATCH RFC 01/10] qapi: fix memleak by add implict struct functions in dealloc visitor

2013-11-05 Thread Eric Blake
On 11/04/2013 05:37 PM, Wenchao Xia wrote: s/add/adding/ in subject Otherwise they are leaked in a qap_free_STRUCTURE() call. s/qap/qapi/ Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Cc: qemu-sta...@nongnu.org --- qapi/qapi-dealloc-visitor.c | 20 1

Re: [Qemu-devel] [PATCH RFC 09/10] tests: fix memleak in error path test for input visitor

2013-11-05 Thread Eric Blake
On 11/04/2013 05:37 PM, Wenchao Xia wrote: Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Cc: qemu-sta...@nongnu.org --- tests/test-qmp-input-visitor.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) Reviewed-by: Eric Blake ebl...@redhat.com You should repost your

Re: [Qemu-devel] [PATCH v2 0/3] Make thread pool implementation modular

2013-11-05 Thread Stefan Hajnoczi
On Mon, Nov 04, 2013 at 11:28:41AM +0100, Matthias Brugger wrote: v2: - fix issues found by checkpatch.pl - change the descritpion of patch 3 This patch series makes the thread pool implementation modular. This allows each drive to use a special implementation. The patch series prepares

Re: [Qemu-devel] [PATCH RFC 03/10] qapi script: check correctness of discriminator values in union

2013-11-05 Thread Eric Blake
On 11/04/2013 05:37 PM, Wenchao Xia wrote: It will check whether the values specfied are wrotten correctly when s/specfied/specified/ s/wrotten/written/ discriminator is a pre-defined enum type, which help check whether the schema is in good form. It is allowed that, not every value in

Re: [Qemu-devel] [PATCH RFC 02/10] qapi script: remember enum values

2013-11-05 Thread Eric Blake
On 11/04/2013 05:37 PM, Wenchao Xia wrote: Later other script will need to check the enum values. s/script/scripts/ Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- scripts/qapi.py| 18 ++ tests/qapi-schema/comments.out |2 +-

Re: [Qemu-devel] [migration] questions about removing the old block-migration code

2013-11-05 Thread Stefan Hajnoczi
On Sun, Nov 03, 2013 at 04:01:36AM +, Zhanghaoyu (A) wrote: I read below words on the report of KVM Live Migration: Weather forecast (May 29, 2013), We were going to remove the old block-migration code Then people fixed it Good: it works now Bad: We have to maintain both It uses the

Re: [Qemu-devel] [PATCH RFC 07/10] qapi script: support direct inheritance for struct

2013-11-05 Thread Eric Blake
On 11/04/2013 05:37 PM, Wenchao Xia wrote: Now it is possible to inherit another struct inside data directly, which saves trouble to define trivial structure. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com --- docs/qapi-code-gen.txt | 21 +

Re: [Qemu-devel] [PATCH v2] iscsi: add error handling for qmp_query_uuid

2013-11-05 Thread Paolo Bonzini
Il 05/11/2013 14:17, Stefan Hajnoczi ha scritto: On Tue, Nov 05, 2013 at 08:33:14AM +0800, Amos Kong wrote: We can't assume that qmp_query_uuid() always returns available value. Signed-off-by: Amos Kong ak...@redhat.com --- v2: free errp if it's set --- block/iscsi.c | 8 ++-- 1 file

Re: [Qemu-devel] [PATCH] spapr: add compat machine option

2013-11-05 Thread Andreas Färber
Am 05.11.2013 10:52, schrieb Paolo Bonzini: Il 05/11/2013 10:16, Alexander Graf ha scritto: On 05.11.2013, at 10:06, Paolo Bonzini pbonz...@redhat.com wrote: Il 30/09/2013 14:57, Alexey Kardashevskiy ha scritto: Why is the option under -machine instead of -cpu? Because it is still the same

Re: [Qemu-devel] [PATCH 00/20] Add an IPMI device to QEMU

2013-11-05 Thread Michael S. Tsirkin
On Wed, May 29, 2013 at 05:07:56PM -0500, miny...@acm.org wrote: I have finally gotten some time to work on this, this series of patches adds an IPMI interface to qemu. The changes are roughly: patches 01-05 - Add the capability to have a chardev reconnect if the connections fails. This

Re: [Qemu-devel] [PATCH] integrator/cp: add support for REFCNT register

2013-11-05 Thread Peter Maydell
On 5 November 2013 11:41, Jan Petrouš jan.petr...@tieto.com wrote: Linux kernel from version 3.4 requires CM_REFCNT register for sched timer for Integrator/CP board (integrator_defconfig). See http://infocenter.arm.com/help/topic/com.arm.doc.dui0138e/ch04s06s11.html Signed-off-by: Jan

Re: [Qemu-devel] [PATCH] pc: disable acpi info for isapc and old pc machine

2013-11-05 Thread Andreas Färber
Am 04.11.2013 11:46, schrieb Michael S. Tsirkin: Disable acpi build for isapc and no_kvmclock machine types (used by xen), since acpi build currently expects pci. Reported-by: Andreas Färber afaer...@suse.de Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/i386/pc_piix.c | 2 ++

Re: [Qemu-devel] [PATCH 00/20] Add an IPMI device to QEMU

2013-11-05 Thread Corey Minyard
On 11/05/2013 07:56 AM, Michael S. Tsirkin wrote: On Wed, May 29, 2013 at 05:07:56PM -0500, miny...@acm.org wrote: I have finally gotten some time to work on this, this series of patches adds an IPMI interface to qemu. The changes are roughly: patches 01-05 - Add the capability to have a

Re: [Qemu-devel] [PATCH 2/6] qapi: rename MonitorEvent to QEvent

2013-11-05 Thread Luiz Capitulino
On Tue, 05 Nov 2013 13:31:09 +0800 Wenchao Xia xiaw...@linux.vnet.ibm.com wrote: 于 2013/11/5 10:51, Luiz Capitulino 写道: On Tue, 05 Nov 2013 10:17:28 +0800 Wenchao Xia xiaw...@linux.vnet.ibm.com wrote: 于 2013/11/4 21:33, Luiz Capitulino 写道: On Mon, 04 Nov 2013 09:59:50 +0800 Wenchao

Re: [Qemu-devel] Questions about Spice pv domUs

2013-11-05 Thread Fabio Fantoni
Il 30/09/2013 16:56, Fabio Fantoni ha scritto: I'm trying to implement basic spice support on xen pv domUs. Test seems ok on Ubuntu 12.04 pv domU except mouse which is not visible. I also tried agent-mouse=off on qemu spice options but is not working or maybe spicy (from spice-gtk 0.20) has

Re: [Qemu-devel] [PATCH v5 2/2] sheepdog: support user-defined redundancy option

2013-11-05 Thread Stefan Hajnoczi
On Fri, Nov 01, 2013 at 11:10:13PM +0800, Liu Yuan wrote: diff --git a/block/sheepdog.c b/block/sheepdog.c index 66b3ea8..a267d31 100644 --- a/block/sheepdog.c +++ b/block/sheepdog.c @@ -91,6 +91,14 @@ #define SD_NR_VDIS (1U 24) #define SD_DATA_OBJ_SIZE (UINT64_C(1) 22) #define

Re: [Qemu-devel] [PATCH] integrator/cp: add support for REFCNT register

2013-11-05 Thread Jan Petrouš
Hi Peter. On 5 November 2013 14:54, Peter Maydell peter.mayd...@linaro.org wrote: On 5 November 2013 11:41, Jan Petrouš jan.petr...@tieto.com wrote: Linux kernel from version 3.4 requires CM_REFCNT register for sched timer for Integrator/CP board (integrator_defconfig). See

Re: [Qemu-devel] [PATCH v3 1/2] linux-user: create target_structsheader to place ipc_perm and shmid_dss

2013-11-05 Thread Alex Bennée
petar.jovano...@imgtec.com writes: From: Alex Bennée [alex.ben...@linaro.org] snip There is an awful lot of similarity between a lot of the structures while not being totally identical. Given the syscall munging is common is there not an argument

Re: [Qemu-devel] [PATCH 0/7] block: qemu-iotests, more quoting fixes

2013-11-05 Thread Stefan Hajnoczi
On Thu, Oct 31, 2013 at 11:57:35AM -0400, Jeff Cody wrote: There are still problems with the qemu-iotests, if the pathname of the working directory contains spaces. This series fixes most of them. To verify, ./check -qcow2 was run from a pathname with spaces (e.g., renamed ~/qemu-kvm to

Re: [Qemu-devel] [PATCH] integrator/cp: add support for REFCNT register

2013-11-05 Thread Peter Maydell
On 5 November 2013 14:44, Jan Petrouš jan.petr...@tieto.com wrote: Hehe, duno, but when I started learning QEMU the Integrator devboard looked for me the nice start-up point = very simple to understand and only very basic, but still core, device list. QEMU's integrator model is really very

Re: [Qemu-devel] [PATCH v3 1/2] linux-user: create target_structsheader to place ipc_perm and shmid_dss

2013-11-05 Thread Peter Maydell
On 5 November 2013 14:46, Alex Bennée alex.ben...@linaro.org wrote: Where is the reference for each of these structures? The kernels own headers or glibc's for the appropriate arch? Always the kernel -- we are implementing the syscall interface, not the glibc function. -- PMM

Re: [Qemu-devel] [PATCH] iscsi: add error handling for qmp_query_uuid

2013-11-05 Thread Amos Kong
On Tue, Nov 05, 2013 at 10:03:10AM +0100, Paolo Bonzini wrote: Il 05/11/2013 01:08, Amos Kong ha scritto: We can't assume that qmp_query_uuid() always returns available value. Signed-off-by: Amos Kong ak...@redhat.com --- block/iscsi.c | 7 +-- 1 file changed, 5 insertions(+), 2

[Qemu-devel] KVM call agenda for 2013-11-12

2013-11-05 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. Thanks, Juan. Call details: 10:00 AM to 11:00 AM EDT Every two weeks If you need phone number details, contact me privately.

[Qemu-devel] [PATCH for-1.7] vga: fix invalid read after free

2013-11-05 Thread Marc-André Lureau
After calling dpy_gfx_replace_surface(s-con, surface), the outer surface is invalid. ==5370== Invalid read of size 4 ==5370==at 0x460229: surface_bits_per_pixel (console.h:250) ==5370==by 0x466A81: get_depth_index (vga.c:1173) ==5370==by 0x467EC2: vga_draw_graphic (vga.c:1718)

[Qemu-devel] [PATCH v4] net: Adding netmap network backend

2013-11-05 Thread Vincenzo Maffione
This patch adds support for a network backend based on netmap. netmap is a framework for high speed packet I/O. You can use it to build extremely fast traffic generators, monitors, software switches or network middleboxes. Its companion software switch VALE lets you interconnect virtual machines.

Re: [Qemu-devel] [v2, 3/4] qemu-char: add support for U-prefixed symbols

2013-11-05 Thread Jan Krupa
On 11/01/2013 12:28 PM, Michael Tokarev wrote: 01.11.2013 13:59, Michael Tokarev пишет: 16.10.2013 16:40, Jan Krupa wrote: This patch adds support for Unicode symbols in keymap files. This feature was already used in some keyboard layouts in QEMU generated from XKB (e.g. Arabic) but it wasn't

Re: [Qemu-devel] [v2, 4/4] qemu-char: add missing characters used in keymaps

2013-11-05 Thread Jan Krupa
On 11/01/2013 11:00 AM, Michael Tokarev wrote: 16.10.2013 16:40, Jan Krupa wrote: This patch adds all missing characters used in regional keymap files which already exist in QEMU. I checked for the missing characters by going through all of the keymaps and matching that with records in

Re: [Qemu-devel] [PATCH for-1.7] vga: fix invalid read after free

2013-11-05 Thread Gerd Hoffmann
On Di, 2013-11-05 at 16:15 +0100, Marc-André Lureau wrote: --- a/hw/display/vga.c +++ b/hw/display/vga.c @@ -1707,7 +1707,6 @@ static void vga_draw_graphic(VGACommonState *s, int full_update) } else if (is_buffer_shared(surface) (full_update || surface_data(surface) !=

Re: [Qemu-devel] [PATCH v3 2/7] qdev: unref qdev when device_add fails

2013-11-05 Thread Stefan Hajnoczi
On Tue, Nov 05, 2013 at 04:50:30AM -0700, Eric Blake wrote: On 10/30/2013 07:54 AM, Stefan Hajnoczi wrote: qdev_device_add() leaks the created qdev upon failure. I suspect this problem crept in because qdev_free() unparents the qdev but does not drop a reference - confusing name. Is it

[Qemu-devel] [Bug 685096] Re: USB Passthrough not working for Windows 7 guest

2013-11-05 Thread Jens Frederich
Is there any workaround? We're currently evaluating different RTOS systems. One is Linux RT with KVM/QEMU with Windows 7. This bug breaks the latency measurement setup and Linux RT is out of race. It there anyway to fix the issue? -- You received this bug notification because you are a member

Re: [Qemu-devel] [PATCH v5 2/2] sheepdog: support user-defined redundancy option

2013-11-05 Thread Eric Blake
On 11/05/2013 07:37 AM, Stefan Hajnoczi wrote: + +copy = strtol(n1, NULL, 10); +if (copy SD_MAX_COPIES) { +return -EINVAL; +} The string manipulation can be simplified using sscanf(3) and is_numeric() can be dropped: static int parse_redundancy(BDRVSheepdogState

  1   2   3   >