Re: [Qemu-devel] [PATCH v3 0/3] spapr: fix H_SET_MODE

2014-02-10 Thread Alexey Kardashevskiy
On 01/22/2014 04:43 PM, Alexey Kardashevskiy wrote: > This fixes H_SET_MODE. > > Alexey Kardashevskiy (3): > target-ppc: introduce powerisa-207-server flag > spapr-hcall: fix little-endian resource handling in H_SET_MODE > spapr-hcall: add address-translation-mode-on-interrupt resource in >

Re: [Qemu-devel] [PATCH v3 3/3] spapr-hcall: add address-translation-mode-on-interrupt resource in H_SET_MODE

2014-02-10 Thread Alexey Kardashevskiy
On 01/23/2014 07:26 PM, Aneesh Kumar K.V wrote: > Alexey Kardashevskiy writes: > >> This adds handling of the RESOURCE_ADDR_TRANS_MODE resource from >> the H_SET_MODE, for POWER8 (PowerISA 2.07) only. >> >> Signed-off-by: Alexey Kardashevskiy >> --- >> hw/ppc/spapr_hcall.c | 26

Re: [Qemu-devel] [PATCH v7 0/2] target-ppc: CPU device tree id

2014-02-10 Thread Alexey Kardashevskiy
On 02/02/2014 01:45 AM, Alexey Kardashevskiy wrote: > This is some cleanup. Please, comment. Thanks! Ping? > > Changes: > v7: > * cleaned up a bit of QOM use > > v6: > * removed kvmppc_fixup_cpu() > > v5: > * cleanup > * removed cpustate::kvm_cpu_id > * split into 2 patches - new PPC API and

Re: [Qemu-devel] [PATCH v8 13/13] dump: add 'query-dump-guest-memory-capability' command

2014-02-10 Thread Paolo Bonzini
Il 11/02/2014 03:47, Luiz Capitulino ha scritto: On Tue, 11 Feb 2014 00:34:37 +0100 Paolo Bonzini wrote: Il 11/02/2014 00:30, Laszlo Ersek ha scritto: However, I don't see the point in having the "format-option" field. What about: -> { "execute": "query-dump-guest-memory-capabilities" } <- {

[Qemu-devel] [PATCH V11 5/8] qcow2: full rollback on fail in qcow2_write_snapshots()

2014-02-10 Thread Wenchao Xia
A header restore step is added and the old label "fail" is renamed to the more verbose "dealloc_sn_table", whereas the new "fail" section does not rollback anything on disk. If any step during the rollback fails, all remaining will be skipped to prevent dangling pointers. A new parameter "*errp_ro

[Qemu-devel] [PATCH v3 1/5] qemu-io: Account IO by aio_read and aio_write

2014-02-10 Thread Fam Zheng
This will enable accounting of aio requests issued from qemu-io aio read/write commands. Signed-off-by: Fam Zheng Reviewed-by: Benoit Canet --- qemu-io-cmds.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index f1de24c..d68eb23 100644 --- a/qemu

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

2014-02-10 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 Reviewed-by: Max Reitz --- block/qcow2-snapshot.c| 30 +- block/qcow2.h |4 +++- block/rbd.c

[Qemu-devel] [PATCH v5 RESEND 2/4] raw, qcow2: don't convert file size to sector size

2014-02-10 Thread Hu Tao
and avoid convert it back later. Signed-off-by: Hu Tao --- block/qcow2.c | 8 block/raw-posix.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 30e36bc..e4bab70 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1569,7 +15

[Qemu-devel] [PATCH v5 RESEND 3/4] raw-posix: Add full image preallocation option

2014-02-10 Thread Hu Tao
This patch adds a new option preallocation for raw format, and implements full preallocation. Signed-off-by: Hu Tao --- block/raw-posix.c | 43 +++ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/block/raw-posix.c b/block/raw-posix.c index 0

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

2014-02-10 Thread Wenchao Xia
The function still returns int since qcow2_snapshot_delete() will return the number. Signed-off-by: Wenchao Xia Reviewed-by: Max Reitz --- block/qcow2-snapshot.c | 43 +-- 1 files changed, 37 insertions(+), 6 deletions(-) diff --git a/block/qcow2-snaps

[Qemu-devel] [PATCH v5 RESEND 0/4] qemu-img: add preallocation=full

2014-02-10 Thread Hu Tao
This series implements full image preallocation to create a non-sparse image file at creation time, both for raw and qcow2 format. The purpose is to avoid performance deterioration of the guest cause by sparse image. v5: - fix wrong calculation of qcow2 metadata size in v4 - remove raw_preallo

[Qemu-devel] [PATCH v5 RESEND 1/4] qapi: introduce PreallocMode and a new PreallocMode full.

2014-02-10 Thread Hu Tao
This patch prepares for the subsequent patches. Signed-off-by: Hu Tao --- block/qcow2.c| 8 qapi-schema.json | 12 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 99a1ad1..30e36bc 100644 --- a/block/qcow2.c +++ b/bloc

[Qemu-devel] [PATCH v5 RESEND 4/4] qcow2: Add full image preallocation option

2014-02-10 Thread Hu Tao
This adds a preallocation=full mode to qcow2 image creation, which creates a non-sparse image file. Signed-off-by: Hu Tao --- block/qcow2.c | 75 --- 1 file changed, 72 insertions(+), 3 deletions(-) diff --git a/block/qcow2.c b/block/qcow2

Re: [Qemu-devel] [PATCH v5 2/4] raw, qcow2: don't convert file size to sector size

2014-02-10 Thread Hu Tao
On Tue, Feb 11, 2014 at 02:57:24PM +0800, Hu Tao wrote: > and avoid convert it back later. > > Signed-off-by: Your Name Sorry, will respin. -- Regards, Hu Tao

[Qemu-devel] [PATCH v5 4/4] qcow2: Add full image preallocation option

2014-02-10 Thread Hu Tao
This adds a preallocation=full mode to qcow2 image creation, which creates a non-sparse image file. Signed-off-by: Hu Tao Signed-off-by: Your Name --- block/qcow2.c | 75 --- 1 file changed, 72 insertions(+), 3 deletions(-) diff --git a/b

[Qemu-devel] [PATCH v5 1/4] qapi: introduce PreallocMode and a new PreallocMode full.

2014-02-10 Thread Hu Tao
This patch prepares for the subsequent patches. Signed-off-by: Hu Tao Signed-off-by: Your Name --- block/qcow2.c| 8 qapi-schema.json | 12 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 99a1ad1..30e36bc 100644 ---

[Qemu-devel] [PATCH v5 3/4] raw-posix: Add full image preallocation option

2014-02-10 Thread Hu Tao
This patch adds a new option preallocation for raw format, and implements full preallocation. Signed-off-by: Hu Tao Signed-off-by: Your Name --- block/raw-posix.c | 43 +++ 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/block/raw-posix.c b

[Qemu-devel] [PATCH v5 0/4] qemu-img: add preallocation=full

2014-02-10 Thread Hu Tao
From: Your Name This series implements full image preallocation to create a non-sparse image file at creation time, both for raw and qcow2 format. The purpose is to avoid performance deterioration of the guest cause by sparse image. v5: - fix wrong calculation of qcow2 metadata size in v4 -

[Qemu-devel] [PATCH v5 2/4] raw, qcow2: don't convert file size to sector size

2014-02-10 Thread Hu Tao
and avoid convert it back later. Signed-off-by: Your Name --- block/qcow2.c | 8 block/raw-posix.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 30e36bc..e4bab70 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1569,7

[Qemu-devel] [PATCH bugfix v1 1/1] char/serial: Fix emptyness check

2014-02-10 Thread Peter Crosthwaite
This was guarding against a full fifo rather than an empty fifo when popping. Fix. Signed-off-by: Peter Crosthwaite --- hw/char/serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/char/serial.c b/hw/char/serial.c index 27dab7d..6d3b5af 100644 --- a/hw/char/serial.c +

[Qemu-devel] [PATCH v3 5/5] qemu-iotests: Add 080 for IO throttling

2014-02-10 Thread Fam Zheng
This case utilizes qemu-io command "aio_{read,write} -q" to verify the effectiveness of IO throttling options. It's implemented by driving the vm timer from qtest protocol, so the throttling timers are signaled with determined time duration. Then we verify the completed IO requests are within 110%

[Qemu-devel] [PATCH v3 4/5] qemu-iotests: Allow caller to disable underscore convertion for qmp

2014-02-10 Thread Fam Zheng
QMP command "block_set_io_throttle" expects underscores in parameters instead of dashes: {iops,bps}_{rd,wr,max}. Add optional argument conv_keys (defaults to True, backward compatible), it will be used in IO throttling test case. Reviewed-by: Benoit Canet Signed-off-by: Fam Zheng --- tests/qem

[Qemu-devel] [PATCH v3 3/5] qemu-iotests: Add VM method qtest() to iotests.py

2014-02-10 Thread Fam Zheng
This will allow test case to run command in qtest protocol. It's write-only for now. Signed-off-by: Fam Zheng --- tests/qemu-iotests/iotests.py | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py ind

[Qemu-devel] [PATCH v3 0/5] qemu-iotests: Test case for IO throttling

2014-02-10 Thread Fam Zheng
This series adds iotest case for IO throttling. There is a change in qemu-io sub-commands "aio_read" and "aio_write", which makes the aio requests accounted and the statistics reflected in blockstats. Note that IO throttling implementation allows overcommiting of requests, so the actual IO happen

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

2014-02-10 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 v3 2/5] qtest: Add scripts/qtest/qtest.py

2014-02-10 Thread Fam Zheng
This removes the dummy scripts/qtest and adds scripts/qtest/qtest.py as a python library for qtest protocol. This is a skeleton with a basic "cmd" method to execute a command, reading and parsing of qtest output will be added later on demand. Signed-off-by: Fam Zheng --- scripts/qtest

[Qemu-devel] [PATCH] virtio-net: remove function calls from assert

2014-02-10 Thread Joel Stanley
peer_{de,at}tach were called from inside assert(). This will be a problem for virtio-net if built with NDEBUG. Signed-off-by: Joel Stanley --- hw/net/virtio-net.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 3626608..5

Re: [Qemu-devel] [PATCH v2 5/5] qemu-iotests: Add 080 for IO throttling

2014-02-10 Thread Fam Zheng
On Mon, 02/10 13:32, Benoît Canet wrote: > Le Friday 07 Feb 2014 à 18:43:33 (+0800), Fam Zheng a écrit : > > +nsec_per_sec = 10 > > + > > +# With current interface we can't set burst to 0, they will be > > override > > +# to bps / 10 and iops / 10. Setting to 1 work

[Qemu-devel] [PATCH target-arm v1 7/7] dma/pl330: implement dmaadnh instruction

2014-02-10 Thread Peter Crosthwaite
Implement the missing DMAADNH instruction. This is a minor variant of the DMAADDH instruction, so factor out to a common implementation for both (dmaadxh). Signed-off-by: Peter Crosthwaite --- hw/dma/pl330.c | 19 --- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH target-arm v1 6/7] dma/pl330: Fix buffer depth

2014-02-10 Thread Peter Crosthwaite
This is the product of the data-width and the depth arguments, I.e the depth of the FIFO is in terms of data entries and not bytes (which is what the original implementation was suggesting). Fix. Signed-off-by: Peter Crosthwaite --- hw/dma/pl330.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[Qemu-devel] [PATCH target-arm v1 4/7] dma/pl330: Rename parent_obj

2014-02-10 Thread Peter Crosthwaite
As per current QOM conventions. Signed-off-by: Peter Crosthwaite --- hw/dma/pl330.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index a4cc6f9..8046a6f 100644 --- a/hw/dma/pl330.c +++ b/hw/dma/pl330.c @@ -227,7 +227,8 @@ static const VMSt

[Qemu-devel] [PATCH target-arm v1 5/7] dma/pl330: Add event debugging printfs

2014-02-10 Thread Peter Crosthwaite
These are helpful to anyone trying to debug event sequencing. Signed-off-by: Peter Crosthwaite --- hw/dma/pl330.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index 8046a6f..303f8b8 100644 --- a/hw/dma/pl330.c +++ b/hw/dma/pl330.c @@ -873,6 +873,7 @@ sta

[Qemu-devel] [PATCH target-arm v1 3/7] dma/pl330: printf format type sweep.

2014-02-10 Thread Peter Crosthwaite
Use PRI formats as appropriate rather than raw %x and %d. This fixes debug printfery on some host platforms. Fix types of debug only variables as appropriate. Signed-off-by: Peter Crosthwaite --- hw/dma/pl330.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-)

[Qemu-devel] [PATCH target-arm v1 2/7] dma/pl330: Fix misleading type

2014-02-10 Thread Peter Crosthwaite
This type really should just be a regular int as no usages rely on it's 32 bitness (it's only meaningful as a bit position and not a bit mask). This also fixes a printf which uses the variable with a regular %d. Signed-off-by: Peter Crosthwaite --- hw/dma/pl330.c | 2 +- 1 file changed, 1 inser

[Qemu-devel] [PATCH target-arm v1 1/7] dma/pl330: Delete overly verbose debug printf

2014-02-10 Thread Peter Crosthwaite
When using event synchronisation, this particular debug printf floods. Just delete it. Signed-off-by: Peter Crosthwaite --- hw/dma/pl330.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/dma/pl330.c b/hw/dma/pl330.c index 401399d..68adf39 100644 --- a/hw/dma/pl330.c +++ b/hw/dma/pl330.c @

[Qemu-devel] [PATCH target-arm v1 0/7] PL330 Changes

2014-02-10 Thread Peter Crosthwaite
Hi Peter, Some minor fixups and tweaks to PL330. Regards, Peter Peter Crosthwaite (7): dma/pl330: Delete overly verbose debug printf dma/pl330: Fix misleading type dma/pl330: printf format type sweep. dma/pl330: Rename parent_obj dma/pl330: Add event debugging printfs dma/pl330: Fix

[Qemu-devel] [PATCH V11 7/8] blkdebug: add debug events for snapshot

2014-02-10 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 Reviewed-by: M

[Qemu-devel] [PATCH V11 4/8] qcow2: return int for qcow2_free_clusters()

2014-02-10 Thread Wenchao Xia
The return value can help caller check whether error happens, and it does not need to have *errp since the return value already tips what happend. Signed-off-by: Wenchao Xia Reviewed-by: Max Reitz --- block/qcow2-refcount.c |8 +--- block/qcow2.h |6 +++--- 2 files changed,

[Qemu-devel] [PATCH V11 3/8] util: add error_append()

2014-02-10 Thread Wenchao Xia
Some old code in error_set() is factored out, so this function can call it. Signed-off-by: Wenchao Xia Reviewed-by: Max Reitz --- include/qapi/error.h |6 ++ util/error.c | 44 +++- 2 files changed, 45 insertions(+), 5 deletions(-) diff

[Qemu-devel] [PATCH V11 6/8] qcow2: rollback on fail in qcow2_snapshot_create()

2014-02-10 Thread Wenchao Xia
A new variable *err_rollback is added to detect sub function's rollback failure. If one step in rollback procedure fails, following steps will be skipped, and the error message will be appended to errp. Signed-off-by: Wenchao Xia Reviewed-by: Max Reitz --- block/qcow2-snapshot.c | 37

[Qemu-devel] [PATCH V11 8/8] qemu-iotests: add test for qcow2 snapshot

2014-02-10 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 Reviewed-by: Max Reitz --- tests/qemu-iotests/075 | 216 +++

Re: [Qemu-devel] [PATCH v2 11/35] target-arm: Split cpreg access checks out from read/write functions

2014-02-10 Thread Peter Crosthwaite
On Sun, Feb 9, 2014 at 10:02 PM, Peter Maydell wrote: > On 9 February 2014 02:50, Peter Crosthwaite > wrote: >> On Sat, Feb 1, 2014 at 1:45 AM, Peter Maydell >> wrote: >>> +typedef enum CPAccessResult { >>> +/* Access is permitted */ >>> +CP_ACCESS_OK = 0, >>> +/* Access fails due t

Re: [Qemu-devel] [PATCH v2 11/35] target-arm: Split cpreg access checks out from read/write functions

2014-02-10 Thread Peter Crosthwaite
On Sat, Feb 1, 2014 at 1:45 AM, Peter Maydell wrote: > Several of the system registers handled via the ARMCPRegInfo > mechanism have access trap control bits controlling whether the > registers are accessible to lower privilege levels. Replace > the existing mechanism (allowing the read and write

Re: [Qemu-devel] [PATCH v2 00/35] AArch64 system mode: system register rework

2014-02-10 Thread Peter Crosthwaite
On Sat, Feb 1, 2014 at 1:45 AM, Peter Maydell wrote: > This is version two of a patchset which makes a start on AArch64 > system emulation by tackling system registers. > > The major changes here since v1 are that I've added a set of > patches which rework the reginfo struct to use a separate acce

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

2014-02-10 Thread Wenchao Xia
Test for inherit and complex union. Signed-off-by: Wenchao Xia --- tests/qapi-schema/qapi-schema-test.json | 22 ++ tests/qapi-schema/qapi-schema-test.out |9 +++ tests/test-qmp-input-visitor.c | 93 + tests/test-qmp-output-visitor.c | 116 +

[Qemu-devel] [PATCH V6 07/10] qapi: convert BlockdevOptions to use enum discriminator

2014-02-10 Thread Wenchao Xia
After this patch, hidden enum type BlockdevOptionsKind will not be generated, and other API can use enum BlockdevDriver. Signed-off-by: Wenchao Xia --- qapi-schema.json | 14 +- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json inde

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

2014-02-10 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 Reviewed-by: Eric Blake --- include/qapi/qmp/qerror.h |2 +- scripts/qapi.py | 26 +++--- target-i386/cpu

[Qemu-devel] [PATCH V6 08/10] qapi script: do not allow string discriminator

2014-02-10 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- docs/qapi-code-gen.txt |8 +++- scripts/qapi-visit.py |6 ++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt index a2e7921..c92add9 100644 --- a/docs/qapi-code-gen.txt +++ b/docs/qapi-co

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

2014-02-10 Thread Wenchao Xia
It will check whether the values specified are written correctly, and whether all enum values are covered, when discriminator is a pre-defined enum type Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- scripts/qapi-visit.py | 17 + scripts/qapi.py | 31 ++

[Qemu-devel] [PATCH V6 06/10] qapi script: support pre-defined enum type as discriminator in union

2014-02-10 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 co

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

2014-02-10 Thread Wenchao Xia
Prior to this patch, qapi-visit.py used custom code to generate enum names used for handling a qapi union. Fix it to instead reuse common code, with identical generated results, and allowing future updates to generation to only need to touch one place. Signed-off-by: Wenchao Xia Reviewed-by: Eric

[Qemu-devel] [PATCH V6 00/10] qapi script: support enum as discriminator and better enum name

2014-02-10 Thread Wenchao Xia
This series address two issues: 1. support using enum as discriminator in union. For example, if we have following define in qapi schema: { 'enum': 'EnumOne', 'data': [ 'value1', 'value2', 'value3' ] } { 'type': 'UserDefBase0', 'data': { 'base-string0': 'str', 'base-enum0': 'EnumOne' } } Bef

[Qemu-devel] [PATCH V6 01/10] qapi script: remember enum values

2014-02-10 Thread Wenchao Xia
Later other scripts will need to check the enum values. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- scripts/qapi.py| 18 ++ tests/qapi-schema/comments.out |2 +- tests/qapi-schema/qapi-schema-test.out |4 +++- 3 files changed,

[Qemu-devel] [PATCH V6 02/10] qapi script: add check for duplicated key

2014-02-10 Thread Wenchao Xia
It is bad that same key was specified twice, especially when a union have two branches with same condition. This patch can prevent it. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake --- scripts/qapi.py |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/scripts/qapi.py

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

2014-02-10 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 Reviewed-by: Eric Blake --- scripts/qapi-types.py | 10 -- scripts/qapi.py | 10 ++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/s

Re: [Qemu-devel] [PATCH V5 00/10] qapi script: support enum as discriminator and better enum name

2014-02-10 Thread Wenchao Xia
于 2014/1/29 0:02, Luiz Capitulino 写道: > On Wed, 22 Jan 2014 11:07:24 -0500 > Luiz Capitulino wrote: > >> On Fri, 20 Dec 2013 13:23:06 +0800 >> Wenchao Xia wrote: >> >>> This series address two issues: >>> >>> 1. support using enum as discriminator in union. >>> For example, if we have following

Re: [Qemu-devel] [PATCH] virtio-net: remove function calls from assert

2014-02-10 Thread Michael S. Tsirkin
On Tue, Feb 11, 2014 at 07:03:17AM +0200, Michael S. Tsirkin wrote: > On Tue, Feb 11, 2014 at 10:42:02AM +1030, Joel Stanley wrote: > > peer_{de,at}tach were called from inside assert(). This will be a > > problem for virtio-net if built with NDEBUG. > > > > Signed-off-by: Joel Stanley > > Thank

Re: [Qemu-devel] [PATCH] virtio-net: remove function calls from assert

2014-02-10 Thread Michael S. Tsirkin
On Tue, Feb 11, 2014 at 10:42:02AM +1030, Joel Stanley wrote: > peer_{de,at}tach were called from inside assert(). This will be a > problem for virtio-net if built with NDEBUG. > > Signed-off-by: Joel Stanley Thanks, applied. > --- > hw/net/virtio-net.c | 7 +-- > 1 file changed, 5 inserti

[Qemu-devel] [PATCH v2 4/5] vmdk: Implement .bdrv_get_info()

2014-02-10 Thread Fam Zheng
This will return cluster_size and is_compressed to caller, if all the extents has the same value (or there's only one extent). Otherwise return -ENOTSUP. Signed-off-by: Fam Zheng --- block/vmdk.c | 19 +++ tests/qemu-iotests/059.out | 4 2 files changed, 23 in

[Qemu-devel] [PATCH v2 3/5] block: Change BlockDriverInfo.cluster_size to 64 bits

2014-02-10 Thread Fam Zheng
VMDK could have big cluster_size for monolithicFlat. It implements .bdrv_get_info now, a 32 bit field is likely to overflow. Signed-off-by: Fam Zheng --- include/block/block.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/block/block.h b/include/block/block.h index

[Qemu-devel] [PATCH v2 2/5] vmdk: Implement .bdrv_write_compressed

2014-02-10 Thread Fam Zheng
Add a wrapper function to support "compressed" path in qemu-img convert. Only support streamOptimized subformat case for now (num_extents == 1 and extent compression is true). Signed-off-by: Fam Zheng --- block/vmdk.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/block/vmdk

[Qemu-devel] [PATCH v2 1/5] qemu-img: Convert by cluster size if target is compressed

2014-02-10 Thread Fam Zheng
If target block driver forces compression (bdi.is_compressed == true), qemu-img convert needs to write by cluster size as well as "-c" option. Particularly, this applies for converting to VMDK streamOptimized format. Signed-off-by: Fam Zheng --- include/block/block.h | 1 + qemu-img.c

[Qemu-devel] [PATCH v2 0/5] Fix conversion from ISO to VMDK streamOptimized

2014-02-10 Thread Fam Zheng
Previouly, conversion from ISO to VMDK with subformat=streamOptimized fails: $ ./qemu-img convert -O vmdk -o subformat=streamOptimized foo.iso bar.vmdk VMDK: can't write to allocated cluster for streamOptimized qemu-img: error while writing sector 64: Input/output error Current code i

[Qemu-devel] [PATCH v2 5/5] mirror: Check for bdrv_get_info result

2014-02-10 Thread Fam Zheng
bdrv_get_info could fail. Add check before using the returned value. Signed-off-by: Fam Zheng --- block/mirror.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/mirror.c b/block/mirror.c index 2a43334..bd3010b 100644 --- a/block/mirror.c +++ b/block/mirror.c @@ -325

Re: [Qemu-devel] [PATCH v8 13/13] dump: add 'query-dump-guest-memory-capability' command

2014-02-10 Thread Qiao Nuohan
On 02/11/2014 10:47 AM, Luiz Capitulino wrote: On Tue, 11 Feb 2014 00:34:37 +0100 Paolo Bonzini wrote: Il 11/02/2014 00:30, Laszlo Ersek ha scritto: However, I don't see the point in having the "format-option" field. What about: -> { "execute": "query-dump-guest-memory-capabilities" } <- {

Re: [Qemu-devel] [PATCH v8 13/13] dump: add 'query-dump-guest-memory-capability' command

2014-02-10 Thread Luiz Capitulino
On Tue, 11 Feb 2014 00:34:37 +0100 Paolo Bonzini wrote: > Il 11/02/2014 00:30, Laszlo Ersek ha scritto: > >> > However, I don't see the point in having the "format-option" field. What > >> > about: > >> > > >> > -> { "execute": "query-dump-guest-memory-capabilities" } > >> > <- { "return": { "for

Re: [Qemu-devel] [PATCH V7 0/5] Send the gratuitous by guest

2014-02-10 Thread Jason Wang
- Original Message - > Hi, > Has anybody here work on this subject and update a newer patch? > Thanks in advance. > > Yongan Liu > > Hi, I will continue work on this. Just FYI, based on the discussions on past version, I plan to send a v8 just for virtio-net. Thanks > ---

Re: [Qemu-devel] [PATCH v8 13/13] dump: add 'query-dump-guest-memory-capability' command

2014-02-10 Thread Qiao Nuohan
On 02/11/2014 08:22 AM, Laszlo Ersek wrote: On 02/11/14 00:34, Paolo Bonzini wrote: Luiz, can you apply patches 1-12 for now? I agree with Laszlo that, no matter how unfortunate this is, the "unused" warnings are a necessary evil and one that can be worked around easily when bisecting. Thank

Re: [Qemu-devel] [PATCH] hw/9pfs/virtio_9p_device: use virtio wrappers to access headers.

2014-02-10 Thread Alexey Kardashevskiy
Is anyone going to pull this series anywhere? Thanks! On Tue, Nov 26, 2013 at 1:56 AM, Greg Kurz wrote: > Note that st*_raw and ld*_raw are effectively replaced by st*_p and ld*_p. > > Signed-off-by: Greg Kurz > --- > hw/9pfs/virtio-9p-device.c |3 ++- > 1 file changed, 2 insertions(+), 1

Re: [Qemu-devel] [PATCH] QMP: allow JSON dict arguments in qmp-shell

2014-02-10 Thread Fam Zheng
On Wed, 01/29 12:17, Stefan Hajnoczi wrote: > qmp-shell hides the QMP wire protocol JSON encoding from the user. Most > of the time this is helpful and makes the command-line human-friendly. > > Some QMP commands take a dict as an argument. In order to express this > we need to revert back to JS

Re: [Qemu-devel] [PATCH] Use error_is_set() only when necessary

2014-02-10 Thread Fam Zheng
On Mon, 02/10 15:54, Luiz Capitulino wrote: > > @@ -875,13 +875,13 @@ DriveInfo *drive_init(QemuOpts *all_opts, > > BlockInterfaceType block_default_type) > > /* Actual block device init: Functionality shared with blockdev-add */ > > dinfo = blockdev_init(filename, bs_opts, type, &local_

[Qemu-devel] [Bug 1042388] Re: qemu: Unsupported syscall: 257 (timer_create)

2014-02-10 Thread Erik de Castro Lopo
The fix that was commited to the Qemu git tree fixed the original test case I had. @pittit then found another test case that fails and I intend to fix that when I find a good chunk of free time. Problem is I only work on Wemu sporadically and it takes me quite a bit of time to get up to speed when

Re: [Qemu-devel] [PATCH v4 2/5] qapi: add qapi-introspect.py code generator

2014-02-10 Thread Eric Blake
On 02/03/2014 05:15 PM, Eric Blake wrote: > On 01/23/2014 07:46 AM, Amos Kong wrote: >> This is a code generator for qapi introspection. It will parse >> qapi-schema.json, extend schema definitions and generate a schema >> table with metadata, it references to the new structs which we used >> to de

Re: [Qemu-devel] [PATCH] ahci: fix sysbus support

2014-02-10 Thread Peter Maydell
On 10 February 2014 23:02, Rob Herring wrote: > From: Rob Herring > > Non-PCI AHCI support is broken due to assertion failures when trying > to convert AHCIState to a PCIDevice pointer as AHCIState can have > different container structs. Fix this by using the non-asserting object > cast and check

Re: [Qemu-devel] [PATCH v8 13/13] dump: add 'query-dump-guest-memory-capability' command

2014-02-10 Thread Laszlo Ersek
On 02/11/14 00:34, Paolo Bonzini wrote: > Luiz, can you apply patches 1-12 for now? I agree with Laszlo that, no > matter how unfortunate this is, the "unused" warnings are a necessary > evil and one that can be worked around easily when bisecting. Thanks, Paolo! In addition, Luiz, please consi

Re: [Qemu-devel] [PATCH v4 00/22] Steps towards per CPU address-spaces

2014-02-10 Thread Edgar E. Iglesias
On Mon, Feb 10, 2014 at 11:42:35PM +, Peter Maydell wrote: > On 10 February 2014 23:10, Edgar E. Iglesias wrote: > > My thinking was in terms of trying to minimize the amount of > > AS structures we create in cases were the nr of master outnumber > > the nr of ASs. But there might be ways to a

Re: [Qemu-devel] [PATCH v4 00/22] Steps towards per CPU address-spaces

2014-02-10 Thread Peter Maydell
On 10 February 2014 23:10, Edgar E. Iglesias wrote: > My thinking was in terms of trying to minimize the amount of > AS structures we create in cases were the nr of master outnumber > the nr of ASs. But there might be ways to achieve being light > even if we dont explicitely pass AS refs around. W

Re: [Qemu-devel] [PATCH v8 13/13] dump: add 'query-dump-guest-memory-capability' command

2014-02-10 Thread Paolo Bonzini
Il 11/02/2014 00:30, Laszlo Ersek ha scritto: > However, I don't see the point in having the "format-option" field. What > about: > > -> { "execute": "query-dump-guest-memory-capabilities" } > <- { "return": { "formats": > ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] } Technicall

Re: [Qemu-devel] [PATCH] Human Monitor: migrate command (without -d) now blocks correctly

2014-02-10 Thread Soramichi AKIYAMA
On Mon, 10 Feb 2014 15:18:03 -0500 Luiz Capitulino wrote: > On Mon, 10 Feb 2014 21:16:30 +0100 > Andreas Färber wrote: > > > Hi Soramichi-san, > > > > Am 27.01.2014 11:46, schrieb Soramichi AKIYAMA: > > > This patch fixes a timing issue that migrate command (without -d) does > > > not block i

Re: [Qemu-devel] [PATCH v8 13/13] dump: add 'query-dump-guest-memory-capability' command

2014-02-10 Thread Laszlo Ersek
On 02/11/14 00:09, Paolo Bonzini wrote: > Il 10/02/2014 23:02, Laszlo Ersek ha scritto: >> On 02/10/14 20:10, Luiz Capitulino wrote: >>> On Tue, 28 Jan 2014 14:22:06 +0800 >>> qiaonuohan wrote: >>> 'query-dump-guest-memory-capability' is used to query whether option 'format' is avai

Re: [Qemu-devel] [PATCH v8 03/13] dump: add API to write header of flatten format

2014-02-10 Thread Laszlo Ersek
On 02/10/14 23:48, Luiz Capitulino wrote: > On Mon, 10 Feb 2014 22:57:15 +0100 > Laszlo Ersek wrote: >> In short, -Werror and bisection don't mix. They already don't, and we >> shouldn't expect them to. > > I understand what you're saying, and I don't want people to do needless and > endless res

Re: [Qemu-devel] [PATCH v4 00/22] Steps towards per CPU address-spaces

2014-02-10 Thread Edgar E. Iglesias
On Sun, Feb 09, 2014 at 02:21:31PM +, Peter Maydell wrote: > On 9 February 2014 13:31, Andreas Färber wrote: > > Paolo, > > > > Am 03.02.2014 10:44, schrieb Edgar E. Iglesias: > >> Edgar E. Iglesias (22): > >> exec: Make tb_invalidate_phys_addr input an AS > >> exec: Make iotlb_to_region i

Re: [Qemu-devel] [PATCH v8 13/13] dump: add 'query-dump-guest-memory-capability' command

2014-02-10 Thread Paolo Bonzini
Il 10/02/2014 23:02, Laszlo Ersek ha scritto: On 02/10/14 20:10, Luiz Capitulino wrote: On Tue, 28 Jan 2014 14:22:06 +0800 qiaonuohan wrote: 'query-dump-guest-memory-capability' is used to query whether option 'format' is available for 'dump-guest-memory' and the available format. The output

Re: [Qemu-devel] [PATCH v8 13/13] dump: add 'query-dump-guest-memory-capability' command

2014-02-10 Thread Paolo Bonzini
Il 10/02/2014 23:02, Laszlo Ersek ha scritto: On 02/10/14 20:10, Luiz Capitulino wrote: On Tue, 28 Jan 2014 14:22:06 +0800 qiaonuohan wrote: 'query-dump-guest-memory-capability' is used to query whether option 'format' is available for 'dump-guest-memory' and the available format. The output

[Qemu-devel] [PATCH] ahci: fix sysbus support

2014-02-10 Thread Rob Herring
From: Rob Herring Non-PCI AHCI support is broken due to assertion failures when trying to convert AHCIState to a PCIDevice pointer as AHCIState can have different container structs. Fix this by using the non-asserting object cast and checking the returned pointer is not NULL. The AddressSpace po

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 09/10] raven: fix PCI bus accesses with size > 1

2014-02-10 Thread Mark Cave-Ayland
On 10/02/14 22:46, Artyom Tarasenko wrote: On Tue, Nov 5, 2013 at 12:09 AM, Hervé Poussineau wrote: Signed-off-by: Hervé Poussineau Without this patch PReP is broken really bad. Was going to submit the same fix, and then found that the bug was already fixed 4 months ago. Hope it helps getti

Re: [Qemu-devel] [PATCH v8 03/13] dump: add API to write header of flatten format

2014-02-10 Thread Luiz Capitulino
On Mon, 10 Feb 2014 22:57:15 +0100 Laszlo Ersek wrote: > On 02/10/14 20:35, Luiz Capitulino wrote: > > On Tue, 28 Jan 2014 14:21:56 +0800 > > qiaonuohan wrote: > > > >> flatten format will be used when writing kdump-compressed format. The > >> format is > >> also used by makedumpfile, you can

Re: [Qemu-devel] [PATCH v3 09/10] raven: fix PCI bus accesses with size > 1

2014-02-10 Thread Artyom Tarasenko
On Tue, Nov 5, 2013 at 12:09 AM, Hervé Poussineau wrote: > Signed-off-by: Hervé Poussineau Without this patch PReP is broken really bad. Was going to submit the same fix, and then found that the bug was already fixed 4 months ago. Hope it helps getting it closer to master: Tested-by: Artyom Ta

Re: [Qemu-devel] [qom-cpu PATCH 7/7 v9] target-i386: CPU model subclasses

2014-02-10 Thread Andreas Färber
Am 10.02.2014 11:21, schrieb Eduardo Habkost: > +static const TypeInfo x86_cpu_host_type_info = { > +.name = CPU_CLASS_NAME("host"), > +.parent = TYPE_X86_CPU, > +.instance_size = sizeof(X86CPU), > +.instance_init = x86_cpu_instance_init_host, > +.abstract = false, > +.class

Re: [Qemu-devel] [PATCH v3 0/1] Detect arch for dump compressed header.

2014-02-10 Thread Laszlo Ersek
On 02/10/14 22:23, Luiz Capitulino wrote: > On Fri, 31 Jan 2014 18:14:01 +0100 > Laszlo Ersek wrote: > >> On 01/31/14 16:04, Ekaterina Tumanova wrote: >>> True! Fixed. Tested. >>> >>> Can you please put it into push-queue? >>> >>> Thanks, >>> Kate. >>> >>> Ekaterina Tumanova (1): >>> Define the

Re: [Qemu-devel] [PATCH v8 13/13] dump: add 'query-dump-guest-memory-capability' command

2014-02-10 Thread Laszlo Ersek
On 02/10/14 20:10, Luiz Capitulino wrote: > On Tue, 28 Jan 2014 14:22:06 +0800 > qiaonuohan wrote: > >> 'query-dump-guest-memory-capability' is used to query whether option 'format' >> is available for 'dump-guest-memory' and the available format. The output >> of the command will be like: >> >>

Re: [Qemu-devel] [PULL 00/14] Cleanup qdev legacy properties

2014-02-10 Thread Paolo Bonzini
Il 10/02/2014 19:40, Peter Maydell ha scritto: > Since Peter has not pulled yet, I'll pull or apply into my tree to check > if anything collides. Just to be clear, that means I should not apply this pull request, correct? Yes, Andreas added it to qom-next. Andreas, are you fine with having th

Re: [Qemu-devel] qmp_* functions into 'kvm-all.c'

2014-02-10 Thread Paolo Bonzini
Il 10/02/2014 19:18, Vincent KHERBACHE ha scritto: I just created a new QMP command following the 'writing-qmp-commands.txt' howto. It's works well by adding the corresponding function into 'qmp.c', but when I want to insert the function in 'kvm-all.c' (which is my goal) I get an 'undefined ref

Re: [Qemu-devel] [PATCH v8 03/13] dump: add API to write header of flatten format

2014-02-10 Thread Laszlo Ersek
On 02/10/14 20:35, Luiz Capitulino wrote: > On Tue, 28 Jan 2014 14:21:56 +0800 > qiaonuohan wrote: > >> flatten format will be used when writing kdump-compressed format. The format >> is >> also used by makedumpfile, you can refer to the following URL to get more >> detailed information about fl

[Qemu-devel] [FIX V2] Fix broken external snapshots

2014-02-10 Thread Benoît Canet
This is a more cleaner version of the patch repairing the externals snapshots broken after the introduction of block filters snapshots. It's based on the presence of the authorization table in the filters. Forget the first post I was just ashamed an wanted to repair the damage asap. Best regards

[Qemu-devel] [FIX V2] block: Fix device snapshots broken by the block filter snapshots patchset.

2014-02-10 Thread Benoît Canet
Take into account the fact that a block filter like quorum will be in bs->file while a regular block driver device is really on the top level. Signed-off-by: Benoit Canet --- block.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/block.c b/block.c index 07ac50

Re: [Qemu-devel] [PATCH v3] qmp: expose list of supported character device backends

2014-02-10 Thread Eric Blake
On 02/10/2014 02:16 PM, Luiz Capitulino wrote: > On Sat, 1 Feb 2014 12:52:42 +0100 > Martin Kletzander wrote: > >> Introduce 'query-chardev-backends' QMP command which lists all >> supported character device backends. >> >> Signed-off-by: Martin Kletzander >> --- >> +## >> +{ 'type': 'ChardevB

Re: [Qemu-devel] [PATCH 7/8] softfloat: Support halving the result of muladd operation

2014-02-10 Thread Peter Maydell
On 10 February 2014 20:15, Richard Henderson wrote: > On 02/07/2014 01:49 PM, Peter Maydell wrote: >> /* Zero plus something non-zero : just return the something */ >> +if (flags & float_muladd_halve_result) { >> +if (cExp == 0) { >> +shift32RightJammin

Re: [Qemu-devel] [PATCH v2 2/2] qapi: Add a primitive to include other files from a QAPI schema file

2014-02-10 Thread Eric Blake
On 02/10/2014 12:58 PM, Lluís Vilanova wrote: > Adds the "include(...)" primitive to the syntax of QAPI schema files. > > Signed-off-by: Lluís Vilanova > --- > scripts/qapi.py | 24 ++-- > 1 file changed, 22 insertions(+), 2 deletions(-) > > +elif self.tok ==

Re: [Qemu-devel] [PATCH] monitor: Add device_add type argument completion.

2014-02-10 Thread Luiz Capitulino
On Mon, 10 Feb 2014 22:23:02 +0100 Hani Benhabiles wrote: > Hi Luiz, > > Thanks for taking a look at it. > > On Mon, Feb 10, 2014 at 02:49:13PM -0500, Luiz Capitulino wrote: > > On Fri, 24 Jan 2014 23:27:55 +0100 > > Hani Benhabiles wrote: > > > > > Signed-off-by: Hani Benhabiles > > > --- >

  1   2   3   4   >