[Qemu-devel] [PATCH for QEMU v3] sheepdog: add discard/trim support for sheepdog

2013-04-13 Thread Liu Yuan
From: Liu Yuan The 'TRIM' command from VM that is to release underlying data storage for better thin-provision is already supported by the Sheepdog. This patch adds the TRIM support at QEMU part. For older Sheepdog that doesn't support it, we return EIO to upper layer. Cc: MORITA Kazutaka Cc:

[Qemu-devel] [PATCH for QEMU v2] sheepdog: add discard/trim support for sheepdog

2013-04-13 Thread Liu Yuan
From: Liu Yuan The 'TRIM' command from VM that is to release underlying data storage for better thin-provision is already supported by the Sheepdog. This patch adds the TRIM support at QEMU part. For older Sheepdog that doesn't support, we return EIO to upper layer. Cc: MORITA Kazutaka Cc: Ke

[Qemu-devel] [Bug 1168733] [NEW] reserved identifier violation

2013-04-13 Thread Markus Elfring
Public bug reported: I would like to point out that identifiers like the following do not fit to the expected naming convention of the C language standard. - __COMMAND_H__ http://git.qemu.org/?p=qemu.git;a=blob;f=cmd.h;hb=64b85a8f2359ca3a995499afaf3c87d8e036e030#l17 - _QEMU_OPTIONS_H_ http

[Qemu-devel] [PATCH] w64: Fix compiler warnings (wrong format specifier)

2013-04-13 Thread Stefan Weil
GetLastError() returns a DWORD value which is unsigned long, so the correct format specifier is %lu. Signed-off-by: Stefan Weil --- Debian's w32 cross compiler does not complain about the wrong specifiers, but the w64 cross compiler does. I'm sorry that I did not notice this before sending the

Re: [Qemu-devel] [PATCH 0/4] Fix JSON string formatter

2013-04-13 Thread Blue Swirl
Thanks, applied all. On Thu, Apr 11, 2013 at 4:07 PM, Markus Armbruster wrote: > This should unbreak "make check" on machines where char is unsigned. > Blue, please give it a whirl. > > The JSON parser is still as broken as ever. Left for another day. > > v2: > - Rebased, trivial conflicts in PA

[Qemu-devel] [Bug 1095857] Re: incorrect handling of [r32] address (long mode)

2013-04-13 Thread Aurelien Jarno
You are correct about what the instruction is supposed to do. That said the behaviour you describe is not reproducible. Which version of QEMU are you using? Could you please send a testcase? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to Q

Re: [Qemu-devel] [PATCH] fpu: Correct edgecase in float64_muladd

2013-04-13 Thread Aurelien Jarno
On Fri, Apr 12, 2013 at 04:37:52PM +0100, Peter Maydell wrote: > In handling float64_muladd, if we end up doing a subtraction of the > product and c, and the 128 bit result of this subtraction happens to > have its most significant bit in bit 63, we weren't handling this > correctly when attempting

Re: [Qemu-devel] [PATCH 01/10] target-ppc: optimize fabs, fnabs, fneg

2013-04-13 Thread Peter Maydell
On 13 April 2013 13:47, Aurelien Jarno wrote: > fabs, fnabs and fneg are just flipping the bit sign of an FP register, > this can be implemented in TCG instead of using softfloat. > +tcg_gen_andi_i64(cpu_fpr[rD(ctx->opcode)], cpu_fpr[rB(ctx->opcode)], > + ~(1LL << 63)); "1

Re: [Qemu-devel] [PATCH V2 18/20] virtio-net: multiqueue support

2013-04-13 Thread Aurelien Jarno
On Fri, Jan 25, 2013 at 06:35:41PM +0800, Jason Wang wrote: > This patch implements both userspace and vhost support for multiple queue > virtio-net (VIRTIO_NET_F_MQ). This is done by introducing an array of > VirtIONetQueue to VirtIONet. > > Signed-off-by: Jason Wang > --- > hw/virtio-net.c |

[Qemu-devel] [PATCH 10/10] target-ppc: add support for extended mtfsf/mtfsfi forms

2013-04-13 Thread Aurelien Jarno
Power ISA 2.05 adds support for extended mtfsf/mtfsfi form, with a new W field to select the upper part of the FPCSR register. For that the helper is changed to handle 64-bit input values and mask with up to 16 bits. The mtfsf/mtfsfi instructions do not have the W bit marked as invalid anymore. In

[Qemu-devel] [PATCH 07/10] target-ppc: emulate lfiwax instruction

2013-04-13 Thread Aurelien Jarno
Needed for Power ISA version 2.05 compliance. Cc: Alexander Graf Signed-off-by: Aurelien Jarno --- target-ppc/translate.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index e928f6b..647c31f 100644 --- a

[Qemu-devel] [PATCH 09/10] target-ppc: emulate store doubleword pair instructions

2013-04-13 Thread Aurelien Jarno
Needed for Power ISA version 2.05 compliance. Cc: Alexander Graf Signed-off-by: Aurelien Jarno --- target-ppc/translate.c | 48 1 file changed, 48 insertions(+) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 248e8ca..4ea701

[Qemu-devel] [PATCH 01/10] target-ppc: optimize fabs, fnabs, fneg

2013-04-13 Thread Aurelien Jarno
fabs, fnabs and fneg are just flipping the bit sign of an FP register, this can be implemented in TCG instead of using softfloat. Cc: Alexander Graf Signed-off-by: Aurelien Jarno --- target-ppc/fpu_helper.c | 31 --- target-ppc/helper.h |3 --- target-ppc/t

[Qemu-devel] [PATCH 05/10] target-ppc: emulate prtyw and prtyd instructions

2013-04-13 Thread Aurelien Jarno
Needed for Power ISA version 2.05 compliance. Cc: Alexander Graf Signed-off-by: Aurelien Jarno --- target-ppc/translate.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 80b7111..1286ad2 100644 -

[Qemu-devel] [PATCH 03/10] target-ppc: add instruction flags for Book I 2.05

2013-04-13 Thread Aurelien Jarno
.. and enable it on POWER7 CPU. Cc: Alexander Graf Signed-off-by: Aurelien Jarno --- target-ppc/cpu.h|4 +++- target-ppc/translate_init.c |2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/target-ppc/cpu.h b/target-ppc/cpu.h index 42c36e2..8b0b651 100644 -

[Qemu-devel] [PATCH 06/10] target-ppc: emulate fcpsgn instruction

2013-04-13 Thread Aurelien Jarno
Needed for Power ISA version 2.05 compliance. Cc: Alexander Graf Signed-off-by: Aurelien Jarno --- target-ppc/translate.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 1286ad2..e928f6b 100644 --- a/target-ppc/translat

[Qemu-devel] [PATCH 04/10] target-ppc: emulate cmpb instruction

2013-04-13 Thread Aurelien Jarno
Needed for Power ISA version 2.05 compliance. Cc: Alexander Graf Signed-off-by: Aurelien Jarno --- target-ppc/helper.h |1 + target-ppc/int_helper.c | 15 +++ target-ppc/translate.c |8 3 files changed, 24 insertions(+) diff --git a/target-ppc/helper.h b/tar

[Qemu-devel] [PATCH 08/10] target-ppc: emulate load doubleword pair instructions

2013-04-13 Thread Aurelien Jarno
Needed for Power ISA version 2.05 compliance. Cc: Alexander Graf Signed-off-by: Aurelien Jarno --- target-ppc/translate.c | 48 1 file changed, 48 insertions(+) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 647c31f..248e8c

[Qemu-devel] [PATCH 00/10] target-ppc: emulate Power ISA 2.05 instructions

2013-04-13 Thread Aurelien Jarno
qemu-system-ppc64 -M pseries clamis to emulate a POWER7 CPU, corresponding to an ISA 2.06 compliant CPU, while QEMU emulates something like an ISA 2.04 CPU. Given that glibc and GCC start to use some instructions like cmpb and fcpsgn, this starts to be problematic. This patches series improves th

[Qemu-devel] [PATCH 02/10] disas: Disassemble all ppc insns for the guest

2013-04-13 Thread Aurelien Jarno
Cc: Alexander Graf Signed-off-by: Aurelien Jarno --- disas.c |1 + 1 file changed, 1 insertion(+) diff --git a/disas.c b/disas.c index 74d3ba0..89c8890 100644 --- a/disas.c +++ b/disas.c @@ -227,6 +227,7 @@ void target_disas(FILE *out, CPUArchState *env, target_ulong code, s.info.

Re: [Qemu-devel] [PATCH qom-cpu 2/2] sh7750: Change cpu field type to SuperHCPU

2013-04-13 Thread Aurelien Jarno
On Tue, Apr 09, 2013 at 07:10:29PM +0200, Andreas Färber wrote: > Am 09.04.2013 17:29, schrieb Peter Maydell: > > On 9 April 2013 15:51, Andreas Färber wrote: > >> This brings us a step closer to QOM'ified SH7750 SoC and > >> fixes b350ab75 (target-sh4: Move PVR/PRR/CVR into SuperHCPUClass) > >> a

Re: [Qemu-devel] [PULL 0/4] MinGW patches for QEMU

2013-04-13 Thread Aurelien Jarno
On Fri, Apr 12, 2013 at 06:34:42PM +0200, Stefan Weil wrote: > Hello Anthony, > > please pull these patches for QEMU git master. > All of them were reviewed on qemu-devel. > > Thanks, > Stefan W. > > The following changes since commit 93b48c201eb6c0404d15550a0eaa3c0f7937e35e: > > virtio-9p: F

Re: [Qemu-devel] [PULL v2 0/4] Trivial patches for 6 to 12 April 2013

2013-04-13 Thread Aurelien Jarno
On Fri, Apr 12, 2013 at 04:38:18PM +0200, Stefan Hajnoczi wrote: > v2: > * Andreas Färber noticed my patch scripts aren't unicode safe, fix his name > > The following changes since commit 93b48c201eb6c0404d15550a0eaa3c0f7937e35e: > > virtio-9p: Fix virtio-9p no longer building after hw-dirs br

Re: [Qemu-devel] [PULL] Fixes and minor improvements to TCI

2013-04-13 Thread Aurelien Jarno
On Thu, Apr 11, 2013 at 08:15:39PM +0200, Stefan Weil wrote: > Hello Anthony, > > please pull these five patches for TCI. They fix a regression caused > by commit 378df4b23753a11be650af7664ca76bc75cb9f01 and include > some improvements. > > Thanks, > > Stefan Weil > > > The following changes s

Re: [Qemu-devel] [PULL v2 00/13] tcg-s390 updates

2013-04-13 Thread Aurelien Jarno
On Fri, Apr 05, 2013 at 01:47:28PM -0500, Richard Henderson wrote: > Here's the latest set of tcg-s390 updates. The only real change > from v1 is the addition of the last patch. This is able to run > the i386-softmmu nbench test, and boot both arm and sparc32 kernels. > > I tried to look at addr

Re: [Qemu-devel] [PATCH v4 17/33] tcg-ppc64: Streamline qemu_ld/st insn selection

2013-04-13 Thread Aurelien Jarno
On Thu, Apr 04, 2013 at 05:56:10PM -0500, Richard Henderson wrote: > Using a table to look up insns of the right width and sign. > Include support for the Power 2.06 LDBRX and STDBRX insns. > > Signed-off-by: Richard Henderson > --- > tcg/ppc64/tcg-target.c | 166 > +

Re: [Qemu-devel] [PATCH v4 16/33] tcg-ppc64: Use automatic implementation of ext32u_i64

2013-04-13 Thread Aurelien Jarno
On Thu, Apr 04, 2013 at 05:56:09PM -0500, Richard Henderson wrote: > The enhancements to and immediate obviate this. > > Signed-off-by: Richard Henderson > --- > tcg/ppc64/tcg-target.c | 5 - > tcg/ppc64/tcg-target.h | 6 +++--- > 2 files changed, 3 insertions(+), 8 deletions(-) > > diff --

Re: [Qemu-devel] [PATCH v4 15/33] tcg-ppc64: Improve and_i64 with constant

2013-04-13 Thread Aurelien Jarno
On Thu, Apr 04, 2013 at 05:56:08PM -0500, Richard Henderson wrote: > Use RLDICL and RLDICR. > > Signed-off-by: Richard Henderson > --- > tcg/ppc64/tcg-target.c | 64 > +++--- > 1 file changed, 50 insertions(+), 14 deletions(-) > > diff --git a/tcg/pp

Re: [Qemu-devel] [PATCH v4 00/33] Modernize tcg/ppc64

2013-04-13 Thread Aurelien Jarno
On Thu, Apr 04, 2013 at 05:55:53PM -0500, Richard Henderson wrote: > Changes v3-v4: > > There were two problems, both related to the setcond opcode: > > * The first was pre-existing: the current code gets 32-bit NE wrong, > failing to ignore the high 32-bits of the register. This problem >

Re: [Qemu-devel] [PATCH v3 16/27] tcg-ppc64: Implement bswap16 and bswap32

2013-04-13 Thread Aurelien Jarno
On Mon, Apr 01, 2013 at 09:23:19PM -0700, Richard Henderson wrote: > Signed-off-by: Richard Henderson > --- > tcg/ppc64/tcg-target.c | 43 +++ > tcg/ppc64/tcg-target.h | 18 ++ > 2 files changed, 53 insertions(+), 8 deletions(-) > > diff --

Re: [Qemu-devel] [PATCH v3 25/27] tcg-ppc64: Use getauxval for ISA detection

2013-04-13 Thread Aurelien Jarno
On Mon, Apr 01, 2013 at 09:23:28PM -0700, Richard Henderson wrote: > Glibc 2.16 includes an easy way to get feature bits previously > buried in /proc or the program startup auxiliary vector. Use it. > > Signed-off-by: Richard Henderson > --- > configure | 18 ++ > t

Re: [Qemu-devel] [PATCH v3 14/27] tcg-ppc64: Streamline qemu_ld/st insn selection

2013-04-13 Thread Aurelien Jarno
On Mon, Apr 01, 2013 at 09:23:17PM -0700, Richard Henderson wrote: > Using a table to look up insns of the right width and sign. > Include support for the Power 2.05 LDBRX and STDBRX insns > included in e.g. Power6. > > Signed-off-by: Richard Henderson > --- > tcg/ppc64/tcg-target.c | 166 > +++

Re: [Qemu-devel] [PATCH v3 13/27] tcg-ppc64: Improve and_i64 with constant

2013-04-13 Thread Aurelien Jarno
On Mon, Apr 01, 2013 at 09:23:16PM -0700, Richard Henderson wrote: > Use RLDICL and RLDICR. > > Signed-off-by: Richard Henderson > --- > tcg/ppc64/tcg-target.c | 64 > +++--- > 1 file changed, 50 insertions(+), 14 deletions(-) > > diff --git a/tcg/pp

Re: [Qemu-devel] [PATCH v3 00/27] Modernize tcg/ppc64

2013-04-13 Thread Aurelien Jarno
On Mon, Apr 01, 2013 at 09:23:03PM -0700, Richard Henderson wrote: > Changes v2-v3: > * Incorporated feedback from Aurelien's review. > > Tree updated at > > git://github.com/rth7680/qemu.git tcg-ppc64 > > r~ > > > > Richard Henderson (27): > disas: Disassemble all ppc insns for the hos

[Qemu-devel] [PATCH for QEMU] sheepdog: add discard/trim support for sheepdog

2013-04-13 Thread Liu Yuan
From: Liu Yuan The 'TRIM' command from VM that is to release underlying data storage for better thin-provision is already supported by the Sheepdog. This patch adds the TRIM support at QEMU part. For older Sheepdog that doesn't support, we return EIO to upper layer. Cc: MORITA Kazutaka Cc: Ke

[Qemu-devel] [PATCH 3/3] tests: add 058 to test discard/trim

2013-04-13 Thread Liu Yuan
From: Liu Yuan Signed-off-by: Liu Yuan --- tests/058 | 30 ++ tests/058.out | 44 tests/group |1 + 3 files changed, 75 insertions(+) create mode 100755 tests/058 create mode 100644 tests/058.out diff --gi

[Qemu-devel] [PATCH 2/3] sheep: teach sheep to discard unused objects

2013-04-13 Thread Liu Yuan
From: Liu Yuan Signed-off-by: Liu Yuan --- include/sheepdog_proto.h |1 + sheep/ops.c | 20 2 files changed, 21 insertions(+) diff --git a/include/sheepdog_proto.h b/include/sheepdog_proto.h index f3d69e1..99a6627 100644 --- a/include/sheepdog_proto.h ++

[Qemu-devel] [PATCH 1/3] sheep: remove unused 'flags' in remove_object()

2013-04-13 Thread Liu Yuan
From: Liu Yuan Signed-off-by: Liu Yuan --- sheep/object_cache.c |2 +- sheep/sheep_priv.h |4 ++-- sheep/store.c|6 +++--- sheep/vdi.c | 16 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/sheep/object_cache.c b/sheep/object_cac

[Qemu-devel] [PATCH For SD and QEMU] Add discard/trim support for Sheepdog

2013-04-13 Thread Liu Yuan
From: Liu Yuan Trim/discard is a command that allows VM to inform underlying storage system to release unused space. Sheepdog takes use of this command to release unused objects for better thin-provision. This patch set aims to add trim/discard support to both Sheepdog and QEMU's Sheepdog block

[Qemu-devel] [PATCH V2 3/5] block: package committing code in qmp_transaction()

2013-04-13 Thread Wenchao Xia
The code is simply moved into a separate function. Signed-off-by: Wenchao Xia --- blockdev.c | 20 +--- 1 files changed, 13 insertions(+), 7 deletions(-) diff --git a/blockdev.c b/blockdev.c index 8d1faf8..38cb7d5 100644 --- a/blockdev.c +++ b/blockdev.c @@ -877,6 +877,18 @@

[Qemu-devel] [PATCH V2 4/5] block: package rolling back code in qmp_transaction()

2013-04-13 Thread Wenchao Xia
Signed-off-by: Wenchao Xia --- blockdev.c | 12 +--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 38cb7d5..3e69569 100644 --- a/blockdev.c +++ b/blockdev.c @@ -889,6 +889,14 @@ static void external_snapshot_commit(BlockdevAction *action,

[Qemu-devel] [PATCH V2 2/5] block: move input parsing code in qmp_transaction()

2013-04-13 Thread Wenchao Xia
The code is moved into preparation function, and is changed a bit to tip more clearly what it is doing. Signed-off-by: Wenchao Xia --- blockdev.c | 38 +++--- 1 files changed, 19 insertions(+), 19 deletions(-) diff --git a/blockdev.c b/blockdev.c index e01906

[Qemu-devel] [PATCH V2 1/5] block: package preparation code in qmp_transaction()

2013-04-13 Thread Wenchao Xia
The code before really committing is moved into a function. Most code are simply moved from qmp_transaction()i, except fail handling label is changed from "delete_and_fail" to "fail". Other code such as input parsing is not touched, to make it easier in review. Signed-off-by: Wenchao Xia --- b

[Qemu-devel] [PATCH V2 5/5] block: make all steps in qmp_transaction() as callback

2013-04-13 Thread Wenchao Xia
Now qmp_transaction() can be extended with other operation, external snapshot or backing chain creation, is just one case it. Signed-off-by: Wenchao Xia --- blockdev.c | 68 +++ 1 files changed, 58 insertions(+), 10 deletions(-) diff -

[Qemu-devel] [PATCH V2 0/5] block: make qmp_transaction extendable

2013-04-13 Thread Wenchao Xia
This serial will package backing chain snapshot code as one case, to make it possible adding more operations later. v2: Address Kevin's comments: Use the same prototype prepare, commit, rollback model in original code, commit should never fail. Wenchao Xia (5): block: package preparation

[Qemu-devel] [PATCH V12 02/18] block: distinguish id and name in bdrv_find_snapshot()

2013-04-13 Thread Wenchao Xia
To make it clear about id and name in searching, the API is changed a bit to distinguish them, and caller can choose to search by id or name. Searching will be done with higher priority of id. This function also returns negative value from bdrv_snapshot_list() instead of -ENOENT on error now. N

[Qemu-devel] [PATCH V12 10/18] qmp: add interface query-snapshots

2013-04-13 Thread Wenchao Xia
This interface returns info of valid internal snapshots for whole vm. Signed-off-by: Wenchao Xia --- block/qapi.c | 17 +++ qapi-schema.json | 14 + qmp-commands.hx | 58 ++ 3 files changed, 89 insertions(+)

[Qemu-devel] [PATCH V12 18/18] hmp: add parameters device and -v for info block

2013-04-13 Thread Wenchao Xia
With these parameters, user can choose the information to be showed, to avoid message flood in the monitor. Signed-off-by: Wenchao Xia Reviewed-by: Kevin Wolf --- hmp.c | 23 +++ monitor.c |7 --- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git

[Qemu-devel] [PATCH V12 16/18] hmp: switch snapshot info function to qmp based one

2013-04-13 Thread Wenchao Xia
This patch using new added function in last commit which retrieve info from qmp for snapshot info. Signed-off-by: Wenchao Xia Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake --- monitor.c |2 +- savevm.c | 65 - 2 files chang

[Qemu-devel] [PATCH V12 17/18] hmp: show ImageInfo in 'info block'

2013-04-13 Thread Wenchao Xia
Now human monitor can show image details, include internal snapshot and backing chain info for every block device. Signed-off-by: Wenchao Xia --- hmp.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hmp.c b/hmp.c index cef5eee..1d13030 100644 --- a/hmp.c +

[Qemu-devel] [PATCH V12 15/18] hmp: add function hmp_info_snapshots()

2013-04-13 Thread Wenchao Xia
This function will simply call qmp interface qmp_query_snapshots() added in last commit and then dump information in monitor console. To get snapshot info, Now qemu and qemu-img both call block layer function bdrv_query_snapshot_info_list() in their calling path, and then they just translate th

[Qemu-devel] [PATCH V12 01/18] block: move bdrv_snapshot_find() to block/snapshot.c

2013-04-13 Thread Wenchao Xia
This patch adds block/snapshot.c and then moves the function there. It also fixes small code style errors reported by check script. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- block/Makefile.objs |1 + block/snapshot.c | 48 ++

[Qemu-devel] [PATCH V12 11/18] qmp: add recursive member in ImageInfo

2013-04-13 Thread Wenchao Xia
New member *backing-image is added to reflect the backing chain status. Signed-off-by: Wenchao Xia --- block/qapi.c | 18 +- qapi-schema.json |5 - 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/block/qapi.c b/block/qapi.c index 13c7860..2f33a05 1

[Qemu-devel] [PATCH V12 14/18] block: dump to monitor for bdrv_snapshot_dump() and bdrv_image_info_dump()

2013-04-13 Thread Wenchao Xia
This patch introduce a new print function, which will output message to monitor when it present. With it, bdrv_snapshot_dump() need no more buffer and can avoid string truncation, bdrv_image_info_dump() can also be used by hmp code later, besides qemu-img code. Signed-off-by: Wenchao Xia --- b

[Qemu-devel] [PATCH V12 12/18] qmp: add ImageInfo in BlockDeviceInfo used by query-block

2013-04-13 Thread Wenchao Xia
Now image info will be retrieved as an embbed json object inside BlockDeviceInfo, backing chain info and all related internal snapshot info can be got in the enhanced recursive structure of ImageInfo. Signed-off-by: Wenchao Xia --- block/qapi.c | 40 ++-- incl

[Qemu-devel] [PATCH V12 07/18] block: change VM snapshot checking logic

2013-04-13 Thread Wenchao Xia
Original logic is different with load_vmstate(), this patch change it to be exactly the same with load_vmstate(), so any VM snapshot shown in qmp/hmp should succeed in load_vmstate(). Note that, runtime snapshot info maybe different with what is got in "qemu-img info" as static snapshot info, a

[Qemu-devel] [PATCH V12 13/18] block: move bdrv_snapshot_dump() and dump_human_image_info() to block/qapi.c

2013-04-13 Thread Wenchao Xia
They are needed later in hmp command, dump_human_image_info() is renamed to bdrv_image_info_dump(). Signed-off-by: Wenchao Xia Reviewed-by: Kevin Wolf --- block.c | 33 block/qapi.c | 100 + include/blo

[Qemu-devel] [PATCH V12 06/18] block: add check for VM snapshot in bdrv_query_snapshot_info_list()

2013-04-13 Thread Wenchao Xia
This patch adds a parameter to tell whether return valid snapshots for whole VM only. Note that the snapshot check logic is copied from do_info_snapshots(), which is different with load_vmstate() and will be changed in next patch. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake Reviewed-b

[Qemu-devel] [PATCH V12 05/18] block: add snapshot info query function bdrv_query_snapshot_info_list()

2013-04-13 Thread Wenchao Xia
This patch adds function bdrv_query_snapshot_info_list(), which will retrieve snapshot info of an image in qmp object format. The implementation is based on the code moved from qemu-img.c with modification to fit more for qmp based block layer API. Signed-off-by: Wenchao Xia Reviewed-by: Eric B

[Qemu-devel] [PATCH V12 08/18] block: add image info query function bdrv_query_image_info()

2013-04-13 Thread Wenchao Xia
This patch adds function bdrv_query_image_info(), which will retrieve image info in qmp object format. The implementation is based on the code moved from qemu-img.c, but uses block layer function to get snapshot info. Signed-off-by: Wenchao Xia --- block/qapi.c | 37 +

[Qemu-devel] [PATCH V12 09/18] block: move qmp_query_block() and bdrv_query_info() to block/qapi.c

2013-04-13 Thread Wenchao Xia
This is a code move patch, except in qmp_query_block bdrv_next(bs) is used instead of direct traverse of global array 'bdrv_states'. This patch also fix code style error reported by check script. Signed-off-by: Wenchao Xia Reviewed-by: Kevin Wolf Reviewed-by: Eric Blake --- block.c

[Qemu-devel] [PATCH V12 04/18] block: move collect_snapshots() and collect_image_info() to block/qapi.c

2013-04-13 Thread Wenchao Xia
This patch adds block/qapi.c and moves the functions there. To avoid conflict and tip better, macro in header file is BLOCK_QAPI_H instead of QAPI_H. The moving is for making review easier, those functions will be modified and renamed later. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake R

[Qemu-devel] [PATCH V12 03/18] qemu-img: remove unused parameter in collect_image_info()

2013-04-13 Thread Wenchao Xia
Parameter *fmt was not used, so remove it. Signed-off-by: Wenchao Xia Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- qemu-img.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 31627b0..937ec01 100644 --- a/qemu-img.c +++ b/qemu-

[Qemu-devel] [PATCH V12 00/18] qmp/hmp interfaces for internal snapshot info

2013-04-13 Thread Wenchao Xia
This serial let qmp interface show info for internal snapshot/backing chain on all block device at runtime, it helps management stack to find the correct image to merge when qemu is running, and retrieve exactly the same info of what qemu saws, avoiding async trouble if management stack use qemu-