Re: [Qemu-devel] Wiki vandalism

2013-09-13 Thread Stefan Weil
Am 13.09.2013 07:57, schrieb Michal Privoznik: So I've just got another trivial patch ACKed. Yay! So I wanted to check it out in the next-trivial branch. Therefore I went on the qemu-trivial wiki and found two things: 1) Plenty of wiki vandalism (tracked down to user Jennypear [2]), e.g.

Re: [Qemu-devel] [PATCH 1/5] hw: arm_gic: Fix gic_set_irq handling

2013-09-13 Thread Christoffer Dall
On Fri, Sep 06, 2013 at 02:59:08PM +0100, Peter Maydell wrote: On 23 August 2013 21:10, Christoffer Dall christoffer.d...@linaro.org wrote: For some reason only edge-triggered or enabled level-triggered interrupts would set the pending state of a raised IRQ. This is not in compliance with

Re: [Qemu-devel] [PATCH 2/5] hw: arm_gic: Introduce GIC_SET_PRIORITY macro

2013-09-13 Thread Christoffer Dall
On Sun, Aug 25, 2013 at 04:37:44PM +0100, Alexander Graf wrote: On 23.08.2013, at 21:10, Christoffer Dall wrote: To make the code slightly cleaner to look at and make the save/restore code easier to understand, introduce this macro to set the priority of interrupts. Signed-off-by:

Re: [Qemu-devel] [RFC] O_EXCL or not open block device

2013-09-13 Thread Paolo Bonzini
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Il 13/09/2013 00:48, NeilBrown ha scritto: I'm not sure why O_EXCL would be correct on generic block devices when it's wrong on CD-ROMs. I think it's in fact more likely that other devices are shared, as backing files. O_EXCL make sense if you

Re: [Qemu-devel] [PULL 33/42] block: return BDRV_BLOCK_ZERO past end of backing file

2013-09-13 Thread Peter Lieven
On 06.09.2013 17:39, Stefan Hajnoczi wrote: From: Paolo Bonzini pbonz...@redhat.com If the sectors are unallocated and we are past the end of the backing file, they will read as zero. Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com ---

[Qemu-devel] [RFC v3 1/2] include/qemu: introduce sizes.h

2013-09-13 Thread Antony Pavlov
The header file sizes.h is used in linux kernel, barebox bootloader and u-boot bootloader. It provides the short and easy-to-read names for power-of-two numbers. The numbers like this are othen used for memory range sizes. Signed-off-by: Antony Pavlov antonynpav...@gmail.com ---

[Qemu-devel] [RFC v3 0/2] use sizes.h macros for power-of-two sizes

2013-09-13 Thread Antony Pavlov
Changes since v2: * commit messages: drop ALL 'Reviewed-by' tags. Drop Aurelien Jarno's tag because the patchseries was completely reworked, so it need additional review. Changes since v1: * include/sizes.h - include/qemu/sizes.h * fix copyright header; * fix formatting: drop tabs; * use

[Qemu-devel] Tracking down a bug in CIL + tcg + kernel = 3.2

2013-09-13 Thread Gabriel Kerneis
Dear all, I am using CIL [1] to compile QEMU. CIL is a wrapper around gcc which can be used to analyse C code. As explained recently on this list, the ultimate goal is to check coroutine_fn annotations statically [2]. When CIL compiles C code, it performs a number of simplifications, which are

[Qemu-devel] [RFC v3 2/2] hw/mips: use sizes.h macros

2013-09-13 Thread Antony Pavlov
Signed-off-by: Antony Pavlov antonynpav...@gmail.com --- hw/mips/mips_malta.c | 25 + include/hw/mips/bios.h | 3 ++- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index 05c8771..604832f 100644 ---

Re: [Qemu-devel] [PULL 39/42] block: look for zero blocks in bs-file

2013-09-13 Thread Peter Lieven
On 06.09.2013 17:39, Stefan Hajnoczi wrote: From: Paolo Bonzini pbonz...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- block.c | 16 +++- 1 file changed, 15

Re: [Qemu-devel] [PULL 30/42] block: define get_block_status return value

2013-09-13 Thread Peter Lieven
On 06.09.2013 17:39, Stefan Hajnoczi wrote: From: Paolo Bonzini pbonz...@redhat.com Define the return value of get_block_status. Bits 0, 1, 2 and 9-62 are valid; bit 63 (the sign bit) is reserved for errors. Bits 3-8 are left for future extensions. The return code is compatible with the old

Re: [Qemu-devel] [PULL 33/42] block: return BDRV_BLOCK_ZERO past end of backing file

2013-09-13 Thread Paolo Bonzini
Il 13/09/2013 09:33, Peter Lieven ha scritto: On 06.09.2013 17:39, Stefan Hajnoczi wrote: From: Paolo Bonzini pbonz...@redhat.com If the sectors are unallocated and we are past the end of the backing file, they will read as zero. Signed-off-by: Paolo Bonzini pbonz...@redhat.com

Re: [Qemu-devel] [PULL 30/42] block: define get_block_status return value

2013-09-13 Thread Paolo Bonzini
Il 13/09/2013 10:04, Peter Lieven ha scritto: On 06.09.2013 17:39, Stefan Hajnoczi wrote: From: Paolo Bonzini pbonz...@redhat.com Define the return value of get_block_status. Bits 0, 1, 2 and 9-62 are valid; bit 63 (the sign bit) is reserved for errors. Bits 3-8 are left for future

[Qemu-devel] [PATCH] qemu-iotests: Fix test 038

2013-09-13 Thread Max Reitz
Test 038 uses asynchronous I/O, resulting (potentially) in a different output for every run (regarding the order of the I/O accesses). This can be fixed by simply sorting the I/O access messages, since their order is irrelevant anyway (for this asynchonous I/O). Signed-off-by: Max Reitz

[Qemu-devel] [PATCH v8 0/9] Shared Library Module Support

2013-09-13 Thread Fam Zheng
This series implements feature of shared object building as described in: http://wiki.qemu.org/Features/Modules The main idea behind modules is to isolate dependencies on third party libraries from qemu executables, such as libglusterfs or librbd, so that the end users can install core qemu

[Qemu-devel] [PATCH v8 1/9] ui/Makefile.objs: delete unnecessary cocoa.o dependency

2013-09-13 Thread Fam Zheng
From: Peter Maydell peter.mayd...@linaro.org Delete an unnecessary dependency for cocoa.o; we already have a general rule that tells Make that we can build a .o file from a .m source using an ObjC compiler, so this specific rule is unnecessary. Further, it is using the dubious construct

[Qemu-devel] [PATCH v8 3/9] rule.mak: allow per object cflags and libs

2013-09-13 Thread Fam Zheng
Adds extract-libs in LINK to expand any per object libs, the syntax to define such a libs options is like: foo.o-libs := $(CURL_LIBS) in block/Makefile.objs. Similarly, foo.o-cflags := $(FOO_CFLAGS) is also supported. foo.o must be listed a nested var (e.g. common-obj-y) to

[Qemu-devel] [PATCH v8 2/9] make.rule: fix $(obj) to a real relative path

2013-09-13 Thread Fam Zheng
Makefile.target includes rule.mak and unnested common-obj-y, then prefix them with '../', this will ignore object specific QEMU_CFLAGS in subdir Makefile.objs: $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS) Because $(obj) here is './block', instead of '../block'. This doesn't hurt compiling

[Qemu-devel] [PATCH v8 7/9] Makefile: install modules with make install

2013-09-13 Thread Fam Zheng
Install all the subdirs for modules under configure option moddir. Signed-off-by: Fam Zheng f...@redhat.com --- Makefile | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index ef76967..044f4ce 100644 --- a/Makefile +++ b/Makefile @@ -360,6 +360,12 @@ install-datadir

[Qemu-devel] [PATCH v8 4/9] build-sys: introduce common-obj-m and block-obj-m for DSO

2013-09-13 Thread Fam Zheng
Add necessary rules and flags for shared object generation. $(common-obj-m) will include $(block-obj-m), like $(common-obj-y) does for $(block-obj-y). The new rules introduced here are: 0) For all %.so compiling: QEMU_CFLAGS += -fPIC 1) %.o in $(common-obj-m) is compiled to %.o, then linked

[Qemu-devel] [PATCH v8 5/9] module: implement module loading function

2013-09-13 Thread Fam Zheng
Added three types of modules: typedef enum { MODULE_LOAD_BLOCK = 0, MODULE_LOAD_UI, MODULE_LOAD_NET, MODULE_LOAD_MAX, } module_load_type; and their loading function: void module_load(module_load_type). which loads all .so files in a subdir under

[Qemu-devel] [PATCH v8 6/9] module: add configurable module whitelist

2013-09-13 Thread Fam Zheng
Accept configure option --enable-modules=L, to restrict qemu to only load whitelisted modules. Signed-off-by: Fam Zheng f...@redhat.com --- configure | 12 +++- rules.mak | 7 ++- scripts/create_config | 7 +++ util/module.c | 16

[Qemu-devel] [PATCH v8 8/9] .gitignore: ignore module related files (dll, so, mo)

2013-09-13 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index d2c5c2f..4d0ac09 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,9 @@ fsdev/virtfs-proxy-helper.pod *.cp *.dvi *.exe +*.dll +*.so +*.mo *.fn *.ky

[Qemu-devel] [PATCH v8 9/9] block: convert block drivers linked with libs to modules

2013-09-13 Thread Fam Zheng
The converted block drivers are: curl iscsi rbd ssh glusterfs no longer adds flags and libs for them to global variables, instead create config-host.mak variables like FOO_CFLAGS and FOO_LIBS, which is used as per object cflags and libs. Signed-off-by: Fam Zheng

[Qemu-devel] [PATCH] trace-events: Clean up with scripts/cleanup-trace-events.pl again

2013-09-13 Thread armbru
From: Markus Armbruster arm...@redhat.com Event qxl_render_blit_guest_primary_initialized is unused since commit c58c7b9, drop it. Commit 42e5b4c moved hw/ppc/xics.c to hw/intc/xics.c without updating the comment in trace-events. scripts/cleanup-trace-events.pl trace-events | diff trace-events

Re: [Qemu-devel] [PULL 30/42] block: define get_block_status return value

2013-09-13 Thread Peter Lieven
On 13.09.2013 10:26, Paolo Bonzini wrote: Il 13/09/2013 10:04, Peter Lieven ha scritto: On 06.09.2013 17:39, Stefan Hajnoczi wrote: From: Paolo Bonzini pbonz...@redhat.com Define the return value of get_block_status. Bits 0, 1, 2 and 9-62 are valid; bit 63 (the sign bit) is reserved for

Re: [Qemu-devel] [PATCH v8 6/9] module: add configurable module whitelist

2013-09-13 Thread Daniel P. Berrange
On Fri, Sep 13, 2013 at 04:38:51PM +0800, Fam Zheng wrote: Accept configure option --enable-modules=L, to restrict qemu to only load whitelisted modules. Signed-off-by: Fam Zheng f...@redhat.com --- configure | 12 +++- rules.mak | 7 ++-

Re: [Qemu-devel] [PULL 39/42] block: look for zero blocks in bs-file

2013-09-13 Thread Peter Lieven
On 13.09.2013 10:00, Peter Lieven wrote: On 06.09.2013 17:39, Stefan Hajnoczi wrote: From: Paolo Bonzini pbonz...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- block.c | 16

Re: [Qemu-devel] [PULL 39/42] block: look for zero blocks in bs-file

2013-09-13 Thread Paolo Bonzini
Il 13/09/2013 11:08, Peter Lieven ha scritto: On 13.09.2013 10:00, Peter Lieven wrote: On 06.09.2013 17:39, Stefan Hajnoczi wrote: From: Paolo Bonzini pbonz...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Stefan

Re: [Qemu-devel] [PULL 39/42] block: look for zero blocks in bs-file

2013-09-13 Thread Peter Lieven
On 13.09.2013 11:10, Paolo Bonzini wrote: Il 13/09/2013 11:08, Peter Lieven ha scritto: On 13.09.2013 10:00, Peter Lieven wrote: On 06.09.2013 17:39, Stefan Hajnoczi wrote: From: Paolo Bonzini pbonz...@redhat.com Reviewed-by: Eric Blake ebl...@redhat.com Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PULL 39/42] block: look for zero blocks in bs-file

2013-09-13 Thread Paolo Bonzini
Il 13/09/2013 11:14, Peter Lieven ha scritto: On 13.09.2013 11:10, Paolo Bonzini wrote: Il 13/09/2013 11:08, Peter Lieven ha scritto: On 13.09.2013 10:00, Peter Lieven wrote: On 06.09.2013 17:39, Stefan Hajnoczi wrote: From: Paolo Bonzini pbonz...@redhat.com Reviewed-by: Eric Blake

Re: [Qemu-devel] [PULL 39/42] block: look for zero blocks in bs-file

2013-09-13 Thread Peter Lieven
On 13.09.2013 11:17, Paolo Bonzini wrote: Il 13/09/2013 11:14, Peter Lieven ha scritto: On 13.09.2013 11:10, Paolo Bonzini wrote: Il 13/09/2013 11:08, Peter Lieven ha scritto: On 13.09.2013 10:00, Peter Lieven wrote: On 06.09.2013 17:39, Stefan Hajnoczi wrote: From: Paolo Bonzini

[Qemu-devel] arm mach-virt kernel doesn't initialize clocks from device tree (was Re: [PATCH v7 0/3] hw/arm: Add 'virt' platform)

2013-09-13 Thread Peter Maydell
[Will suggested I add arm-linux-kernel to this discussion since it's moved into what the right fix is for mach-virt doesn't initialize clocks from the device tree.] On 12 September 2013 17:29, Christoffer Dall christoffer.d...@linaro.org wrote: On Thu, Sep 12, 2013 at 11:17:50AM +0100, Peter

Re: [Qemu-devel] [PATCH v8 5/9] module: implement module loading function

2013-09-13 Thread Alex Bligh
On 13 Sep 2013, at 09:38, Fam Zheng wrote: Added three types of modules: typedef enum { MODULE_LOAD_BLOCK = 0, MODULE_LOAD_UI, MODULE_LOAD_NET, MODULE_LOAD_MAX, } module_load_type; and their loading function: What is the advantage of this enum and

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

2013-09-13 Thread Kevin Wolf
Am 12.09.2013 um 17:24 hat Max Reitz geschrieben: On 2013-09-12 16:57, Eric Blake wrote: Also, is there a way to tune the set of checks used at runtime, or are we stuck with the compiled-in default? That is, can a user opt in to more expensive tests for robustness, or opt out of default tests

Re: [Qemu-devel] [PATCH v8 6/9] module: add configurable module whitelist

2013-09-13 Thread Fam Zheng
On Fri, 09/13 10:03, Daniel P. Berrange wrote: On Fri, Sep 13, 2013 at 04:38:51PM +0800, Fam Zheng wrote: Accept configure option --enable-modules=L, to restrict qemu to only load whitelisted modules. Signed-off-by: Fam Zheng f...@redhat.com --- configure | 12

[Qemu-devel] [PATCH v9 0/8] Shared Library Module Support

2013-09-13 Thread Fam Zheng
This series implements feature of shared object building as described in: http://wiki.qemu.org/Features/Modules The main idea behind modules is to isolate dependencies on third party libraries from qemu executables, such as libglusterfs or librbd, so that the end users can install core qemu

[Qemu-devel] [PATCH v9 1/8] ui/Makefile.objs: delete unnecessary cocoa.o dependency

2013-09-13 Thread Fam Zheng
From: Peter Maydell peter.mayd...@linaro.org Delete an unnecessary dependency for cocoa.o; we already have a general rule that tells Make that we can build a .o file from a .m source using an ObjC compiler, so this specific rule is unnecessary. Further, it is using the dubious construct

[Qemu-devel] [PATCH v9 3/8] rule.mak: allow per object cflags and libs

2013-09-13 Thread Fam Zheng
Adds extract-libs in LINK to expand any per object libs, the syntax to define such a libs options is like: foo.o-libs := $(CURL_LIBS) in block/Makefile.objs. Similarly, foo.o-cflags := $(FOO_CFLAGS) is also supported. foo.o must be listed a nested var (e.g. common-obj-y) to

[Qemu-devel] [PATCH v9 2/8] make.rule: fix $(obj) to a real relative path

2013-09-13 Thread Fam Zheng
Makefile.target includes rule.mak and unnested common-obj-y, then prefix them with '../', this will ignore object specific QEMU_CFLAGS in subdir Makefile.objs: $(obj)/curl.o: QEMU_CFLAGS += $(CURL_CFLAGS) Because $(obj) here is './block', instead of '../block'. This doesn't hurt compiling

[Qemu-devel] [PATCH v9 4/8] build-sys: introduce common-obj-m and block-obj-m for DSO

2013-09-13 Thread Fam Zheng
Add necessary rules and flags for shared object generation. $(common-obj-m) will include $(block-obj-m), like $(common-obj-y) does for $(block-obj-y). The new rules introduced here are: 0) For all %.so compiling: QEMU_CFLAGS += -fPIC 1) %.o in $(common-obj-m) is compiled to %.o, then linked

Re: [Qemu-devel] [PATCH v8 5/9] module: implement module loading function

2013-09-13 Thread Paolo Bonzini
Il 13/09/2013 11:56, Alex Bligh ha scritto: On 13 Sep 2013, at 09:38, Fam Zheng wrote: Added three types of modules: typedef enum { MODULE_LOAD_BLOCK = 0, MODULE_LOAD_UI, MODULE_LOAD_NET, MODULE_LOAD_MAX, } module_load_type; and their loading

[Qemu-devel] [PATCH v9 6/8] Makefile: install modules with make install

2013-09-13 Thread Fam Zheng
Install all the subdirs for modules under configure option moddir. Signed-off-by: Fam Zheng f...@redhat.com --- Makefile | 6 ++ 1 file changed, 6 insertions(+) diff --git a/Makefile b/Makefile index 766b309..72addda 100644 --- a/Makefile +++ b/Makefile @@ -363,6 +363,12 @@ install-datadir

Re: [Qemu-devel] [PATCH v8 5/9] module: implement module loading function

2013-09-13 Thread Fam Zheng
On Fri, 09/13 10:56, Alex Bligh wrote: On 13 Sep 2013, at 09:38, Fam Zheng wrote: Added three types of modules: typedef enum { MODULE_LOAD_BLOCK = 0, MODULE_LOAD_UI, MODULE_LOAD_NET, MODULE_LOAD_MAX, } module_load_type; and their loading

Re: [Qemu-devel] [PATCH] qemu-iotests: Fix test 038

2013-09-13 Thread Kevin Wolf
Am 13.09.2013 um 10:37 hat Max Reitz geschrieben: Test 038 uses asynchronous I/O, resulting (potentially) in a different output for every run (regarding the order of the I/O accesses). This can be fixed by simply sorting the I/O access messages, since their order is irrelevant anyway (for this

Re: [Qemu-devel] [PATCH v4 04/12] spapr vfio: add vfio_container_spapr_get_info()

2013-09-13 Thread Alexey Kardashevskiy
On 09/11/2013 08:11 AM, Alex Williamson wrote: On Tue, 2013-09-10 at 18:36 +1000, Alexey Kardashevskiy wrote: On 09/06/2013 05:01 AM, Alex Williamson wrote: On Fri, 2013-08-30 at 20:15 +1000, Alexey Kardashevskiy wrote: As sPAPR platform supports DMA windows on a PCI bus, the information

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

2013-09-13 Thread Max Reitz
On 2013-09-13 11:57, Kevin Wolf wrote: […] Am 12.09.2013 um 17:24 hat Max Reitz geschrieben: On the other hand, we could replace QCOW2_OL_DEFAULT manually everywhere by s-default_overlap_check; or, we change the macro to take s as a parameter. Either way, I see three answers to your question:

[Qemu-devel] [PATCH 01/12] block: make BdrvRequestFlags public

2013-09-13 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block.c |5 - include/block/block.h |5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index a325efc..878f365 100644 --- a/block.c +++ b/block.c @@ -51,11 +51,6 @@ #define NOT_DONE

[Qemu-devel] [PATCH 00/12] block: logical block provisioning enhancements

2013-09-13 Thread Peter Lieven
this patch adds the ability for targets to stay sparse during block migration (if the zero_blocks capability is set) and qemu-img convert even if the target does not have has_zero_init = 1. the series was especially developed for iSCSI, but it should also work with other drivers with little or no

[Qemu-devel] [PATCH 02/12] block: add flags to bdrv_*_write_zeroes

2013-09-13 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block-migration.c |2 +- block.c | 20 +++- block/backup.c|3 ++- block/qcow2.c |2 +- block/qed.c |3 ++- block/raw_bsd.c |5 +++--

[Qemu-devel] [PATCH 03/12] block: introduce BDRV_REQ_MAY_UNMAP in bdrv_co_write_zeroes

2013-09-13 Thread Peter Lieven
the BDRV_REQ_MAY_UNMAP flag is used to indicate that block driver is allowed to optimze a write zeroes request by unmapping (discarding) blocks if it is guaranteed that the result will read back as zeroes. the flag is only passed to the driver if the block device is opened with BDRV_O_UNMAP.

[Qemu-devel] [PATCH 07/12] block: introduce bdrv_zeroize

2013-09-13 Thread Peter Lieven
this patch adds a call to completely zero out a block device. the operation is speed up by checking the block status and only writing zeroes to the device if they currently do not return zeroes. optionally the zero writing can be speed up by setting the flag BDRV_REQ_MAY_UNMAP to emulate the zero

[Qemu-devel] [PATCH 04/12] iscsi: add .bdrv_co_write_zeroes

2013-09-13 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 78 + 1 file changed, 78 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index 68f99d3..3d7961d 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -56,6 +56,7 @@ typedef

[Qemu-devel] [PATCH 05/12] block: add logical block provisioning information to BlockDriverInfo

2013-09-13 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- include/block/block.h |9 + 1 file changed, 9 insertions(+) diff --git a/include/block/block.h b/include/block/block.h index 599de7d..ee17048 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -18,6 +18,15 @@ typedef struct

[Qemu-devel] [PATCH 06/12] iscsi: add .bdrv_get_info

2013-09-13 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block/iscsi.c | 24 1 file changed, 24 insertions(+) diff --git a/block/iscsi.c b/block/iscsi.c index 3d7961d..438d45e 100644 --- a/block/iscsi.c +++ b/block/iscsi.c @@ -1577,6 +1577,29 @@ out: return ret; } +static

[Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert

2013-09-13 Thread Peter Lieven
if the target has_zero_init = 0, but supports efficiently writing zeroes by unmapping we call bdrv_zeroize to avoid fully allocating the target. this currently is designed especially for iscsi. Signed-off-by: Peter Lieven p...@kamp.de --- qemu-img.c | 22 -- 1 file changed,

[Qemu-devel] [PATCH 11/12] block/get_block_status: avoid redundant callouts on raw devices

2013-09-13 Thread Peter Lieven
if a raw device like an iscsi target or host device is used the current implementation makes a second call out to get the block status of bs-file. however, the raw driver already has called bdrv_get_block_status on bs-file. Signed-off-by: Peter Lieven p...@kamp.de --- block.c |3 ++- 1 file

[Qemu-devel] [PATCH 09/12] block/get_block_status: set *pnum = 0 on error

2013-09-13 Thread Peter Lieven
if the call is invoked through bdrv_is_allocated the caller might expect *pnum = 0 on error. however, a new implementation of bdrv_get_block_status might only return a negative exit value on error while keeping *pnum untouched. Signed-off-by: Peter Lieven p...@kamp.de --- block.c |1 + 1

[Qemu-devel] [PATCH 10/12] block/get_block_status: avoid segfault if there is no backing_hd

2013-09-13 Thread Peter Lieven
Signed-off-by: Peter Lieven p...@kamp.de --- block.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block.c b/block.c index 4922fb9..cf9db62 100644 --- a/block.c +++ b/block.c @@ -3156,7 +3156,7 @@ static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs,

[Qemu-devel] [PATCH 12/12] block/get_block_status: fix BDRV_BLOCK_ZERO for unallocated blocks

2013-09-13 Thread Peter Lieven
this patch does 2 things: a) only do additional call outs if BDRV_BLOCK_ZERO is not already set. b) use bdi.discard_zeroes to return the zero state of an unallocated block. the callout to bdrv_has_zero_init() is only valid right after bdrv_create. Signed-off-by: Peter Lieven p...@kamp.de ---

Re: [Qemu-devel] [PATCH 05/12] block: add logical block provisioning information to BlockDriverInfo

2013-09-13 Thread Paolo Bonzini
Il 13/09/2013 12:25, Peter Lieven ha scritto: +/* maximum number of sectors that can be discarded at once */ +int max_discard; +/* maximum number of sectors that can zeroized at once */ +int max_write_zeroes; These should not be needed outside the driver. If you want to make

Re: [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert

2013-09-13 Thread Paolo Bonzini
Il 13/09/2013 12:25, Peter Lieven ha scritto: if the target has_zero_init = 0, but supports efficiently writing zeroes by unmapping we call bdrv_zeroize to avoid fully allocating the target. this currently is designed especially for iscsi. Signed-off-by: Peter Lieven p...@kamp.de ---

Re: [Qemu-devel] [PATCH v8 5/9] module: implement module loading function

2013-09-13 Thread Alex Bligh
On 13 Sep 2013, at 11:02, Paolo Bonzini wrote: Seems like an overcomplication. At least block have to be separate, since qemu-img and friends do not have the symbols needed by ui, network and hardware modules. But don't we know what the available modules are at load time? So qemu-img

[Qemu-devel] [PATCH v9 5/8] module: implement module loading

2013-09-13 Thread Fam Zheng
Added three types of modules: typedef enum { MODULE_LOAD_BLOCK = 0, MODULE_LOAD_UI, MODULE_LOAD_NET, MODULE_LOAD_MAX, } module_load_type; and their loading function: void module_load(module_load_type). which loads whitelisted .so files in a subdir

[Qemu-devel] [PATCH v9 7/8] .gitignore: ignore module related files (dll, so, mo)

2013-09-13 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index d2c5c2f..4d0ac09 100644 --- a/.gitignore +++ b/.gitignore @@ -63,6 +63,9 @@ fsdev/virtfs-proxy-helper.pod *.cp *.dvi *.exe +*.dll +*.so +*.mo *.fn *.ky

Re: [Qemu-devel] [PATCH 05/12] block: add logical block provisioning information to BlockDriverInfo

2013-09-13 Thread Peter Lieven
On 13.09.2013 12:34, Paolo Bonzini wrote: Il 13/09/2013 12:25, Peter Lieven ha scritto: +/* maximum number of sectors that can be discarded at once */ +int max_discard; +/* maximum number of sectors that can zeroized at once */ +int max_write_zeroes; These should not be needed

Re: [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert

2013-09-13 Thread Peter Lieven
On 13.09.2013 12:36, Paolo Bonzini wrote: Il 13/09/2013 12:25, Peter Lieven ha scritto: if the target has_zero_init = 0, but supports efficiently writing zeroes by unmapping we call bdrv_zeroize to avoid fully allocating the target. this currently is designed especially for iscsi.

Re: [Qemu-devel] [PATCH 07/12] block: introduce bdrv_zeroize

2013-09-13 Thread Peter Lieven
On 13.09.2013 12:25, Peter Lieven wrote: this patch adds a call to completely zero out a block device. the operation is speed up by checking the block status and only writing zeroes to the device if they currently do not return zeroes. optionally the zero writing can be speed up by setting the

[Qemu-devel] [PATCH] chardev: handle qmp_chardev_add(KIND_MUX) failure

2013-09-13 Thread Gerd Hoffmann
Cc: Markus Armbruster arm...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com --- qemu-char.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index f7f5464..2ca34cd 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -3271,7 +3271,12 @@

[Qemu-devel] [PATCH v9 8/8] block: convert block drivers linked with libs to modules

2013-09-13 Thread Fam Zheng
The converted block drivers are: curl iscsi rbd ssh glusterfs no longer adds flags and libs for them to global variables, instead create config-host.mak variables like FOO_CFLAGS and FOO_LIBS, which is used as per object cflags and libs. Signed-off-by: Fam Zheng

Re: [Qemu-devel] [PATCH] chardev: handle qmp_chardev_add(KIND_MUX) failure

2013-09-13 Thread Markus Armbruster
Gerd Hoffmann kra...@redhat.com writes: Cc: Markus Armbruster arm...@redhat.com Signed-off-by: Gerd Hoffmann kra...@redhat.com Reviewed-by: Markus Armbruster arm...@redhat.com

Re: [Qemu-devel] [PATCH v9 0/8] Shared Library Module Support

2013-09-13 Thread Peter Maydell
On 13 September 2013 10:59, Fam Zheng f...@redhat.com wrote: This series implements feature of shared object building as described in: http://wiki.qemu.org/Features/Modules This doesn't seem to apply to master: cam-vm-266:precise:qemu$ patches apply

Re: [Qemu-devel] [PATCH v4 11/12] spapr vfio: enable for spapr

2013-09-13 Thread Alexey Kardashevskiy
On 09/11/2013 08:13 AM, Alex Williamson wrote: On Tue, 2013-09-10 at 19:00 +1000, Alexey Kardashevskiy wrote: On 09/06/2013 05:05 AM, Alex Williamson wrote: On Fri, 2013-08-30 at 20:15 +1000, Alexey Kardashevskiy wrote: This turns the sPAPR support on and enables VFIO container use in the

Re: [Qemu-devel] [PATCH 08/12] qemu-img: conditionally zero out target on convert

2013-09-13 Thread Paolo Bonzini
Il 13/09/2013 12:46, Peter Lieven ha scritto: -flags = BDRV_O_RDWR; +flags = BDRV_O_RDWR | BDRV_O_UNMAP; I think this should be a new command-line flag. In an earlier version there where no objections. I think it would make the usage of qemu-img convert more complicated. For most

Re: [Qemu-devel] Tracking down a bug in CIL + tcg + kernel = 3.2

2013-09-13 Thread Gabriel Kerneis
On Fri, Sep 13, 2013 at 08:38:58AM +0100, Gabriel Kerneis wrote: So CIL introduces a bug in TCG which prevents = 3.2 kernels from booting with the above error message, but I have absolutely no clue which files of QEMU's code might be involved. Some more bisections later, it's somewhere in

Re: [Qemu-devel] [PATCH 05/12] block: add logical block provisioning information to BlockDriverInfo

2013-09-13 Thread Paolo Bonzini
Il 13/09/2013 12:44, Peter Lieven ha scritto: On 13.09.2013 12:34, Paolo Bonzini wrote: Il 13/09/2013 12:25, Peter Lieven ha scritto: +/* maximum number of sectors that can be discarded at once */ +int max_discard; +/* maximum number of sectors that can zeroized at once */ +

[Qemu-devel] [PULL 08/33] qcow2: Implement bdrv_amend_options

2013-09-13 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com Implement bdrv_amend_options for compat, size, backing_file, backing_fmt and lazy_refcounts. Downgrading images from compat=1.1 to compat=0.10 is achieved through handling all incompatible flags accordingly, clearing all compatible and autoclear flags and

[Qemu-devel] [PULL 00/33] Block patches

2013-09-13 Thread Kevin Wolf
The following changes since commit 2d1fe1873a984d1c2c89ffa3d12949cafc718551: Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20130910' into staging (2013-09-11 14:46:52 -0500) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony for you to fetch

[Qemu-devel] [PULL 05/33] qcow2-cache: Empty cache

2013-09-13 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com Add a function for emptying a cache, i.e., flushing it and marking all elements invalid. Signed-off-by: Max Reitz mre...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- block/qcow2-cache.c | 18 ++ block/qcow2.h | 2 ++ 2 files

[Qemu-devel] [PULL 03/33] raw-win32.c: Fix incorrect handling behaviour of small block files

2013-09-13 Thread Kevin Wolf
From: Tal Kain tal.k...@ravellosystems.com It is a valid case that the read data's size is smaller than the requested size since there could be files that are smaller than the minimum block size (For ex. when a VMDK disk descriptor file) Signed-off-by: Tal Kain tal.k...@ravellosystems.com

[Qemu-devel] [PULL 04/33] block: Image file option amendment

2013-09-13 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com This patch adds the amend option to qemu-img which allows changing image options on existing image files. It also adds the generic bdrv implementation which is basically just a wrapper for the image format specific function. Signed-off-by: Max Reitz

[Qemu-devel] [PULL 01/33] qcow2: Pass discard type to qcow2_discard_clusters()

2013-09-13 Thread Kevin Wolf
The function will be used internally instead of only being called for guest discard requests. Signed-off-by: Kevin Wolf kw...@redhat.com Reviewed-by: Max Reitz mre...@redhat.com --- block/qcow2-cluster.c | 8 block/qcow2.c | 2 +- block/qcow2.h | 2 +- 3 files changed, 6

[Qemu-devel] [PULL 13/33] qemu-iotests: New test case in 061

2013-09-13 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com Add one test case for zero cluster expansion on qcow2 version downgrade in shared L2 tables (i.e., L2 tables with a refcount 1) and one for zero expansion on backed clusters in shared L2 tables. Signed-off-by: Max Reitz mre...@redhat.com Signed-off-by: Kevin

[Qemu-devel] [PULL 18/33] qmp: add interface blockdev-snapshot-delete-internal-sync

2013-09-13 Thread Kevin Wolf
From: Wenchao Xia xiaw...@linux.vnet.ibm.com This interface use id and name as optional parameters, to handle the case that one image contain multiple snapshots with same name which may be '', but with different id. Adding parameter id is for historical compatiability reason, and that case is

[Qemu-devel] [PULL 07/33] qcow2: Save refcount order in BDRVQcowState

2013-09-13 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com Save the image refcount order in BDRVQcowState. This will be relevant for future code supporting different refcount orders than four and also for code that needs to verify a certain refcount order for an opened image. Signed-off-by: Max Reitz mre...@redhat.com

[Qemu-devel] [PULL 14/33] snapshot: new function bdrv_snapshot_find_by_id_and_name()

2013-09-13 Thread Kevin Wolf
From: Wenchao Xia xiaw...@linux.vnet.ibm.com To make it clear about id and name in searching, add this API to distinguish them. Caller can choose to search by id or name, *errp will be set only for exception. Some code are modified based on Pavel's patch. Signed-off-by: Wenchao Xia

[Qemu-devel] [PULL 11/33] qemu-iotests: add infrastructure of fd passing via SCM

2013-09-13 Thread Kevin Wolf
From: Wenchao Xia xiaw...@linux.vnet.ibm.com This patch make use of the compiled scm helper program to transfer fd via unix socket at runtime. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com ---

[Qemu-devel] [PULL 17/33] qmp: add interface blockdev-snapshot-internal-sync

2013-09-13 Thread Kevin Wolf
From: Wenchao Xia xiaw...@linux.vnet.ibm.com Snapshot ID can't be specified in this interface. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Signed-off-by: Kevin Wolf kw...@redhat.com --- blockdev.c | 13 + qapi-schema.json | 20 qmp-commands.hx |

[Qemu-devel] [PULL 09/33] qemu-iotest: qcow2 image option amendment

2013-09-13 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com Add tests for qemu-img amend on qcow2 image files. Signed-off-by: Max Reitz mre...@redhat.com Signed-off-by: Kevin Wolf kw...@redhat.com --- tests/qemu-iotests/061 | 178 +++ tests/qemu-iotests/061.out | 349

[Qemu-devel] [PULL 10/33] qemu-iotests: add unix socket help program

2013-09-13 Thread Kevin Wolf
From: Wenchao Xia xiaw...@linux.vnet.ibm.com This program can do a sendmsg call to transfer fd with unix socket, which is not supported in python2. The built binary will not be deleted in clean, but it is a existing issue in ./tests, which should be solved in another patch. Signed-off-by:

[Qemu-devel] [PULL 12/33] qemu-iotests: add tests for runtime fd passing via SCM rights

2013-09-13 Thread Kevin Wolf
From: Wenchao Xia xiaw...@linux.vnet.ibm.com This case will test whether the monitor can receive fd at runtime. To verify better, additional monitor is created to see if qemu can handler two monitor instances correctly. Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Reviewed-by: Stefan

[Qemu-devel] [PULL 22/33] bdrv: Use Error for opening images

2013-09-13 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com Add an Error ** parameter to BlockDriver.bdrv_open and BlockDriver.bdrv_file_open to allow more specific error messages. Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 4 ++-- block/blkdebug.c | 3 ++- block/blkverify.c

[Qemu-devel] [PULL 23/33] bdrv: Use Error for creating images

2013-09-13 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com Add an Error ** parameter to BlockDriver.bdrv_create to allow more specific error messages. Signed-off-by: Max Reitz mre...@redhat.com --- block.c | 2 +- block/cow.c | 3 ++- block/gluster.c | 2 +- block/iscsi.c

[Qemu-devel] [PULL 15/33] snapshot: distinguish id and name in snapshot delete

2013-09-13 Thread Kevin Wolf
From: Wenchao Xia xiaw...@linux.vnet.ibm.com Snapshot creation actually already distinguish id and name since it take a structured parameter *sn, but delete can't. Later an accurate delete is needed in qmp_transaction abort and blockdev-snapshot-delete-sync, so change its prototype. Also *errp is

Re: [Qemu-devel] [PATCH v4] libxl: usb2 and usb3 controller support for upstream qemu

2013-09-13 Thread Ian Campbell
On Mon, 2013-07-15 at 11:11 +0200, Fabio Fantoni wrote: Stefano or Anthony -- your input as qemu-xen types would be appreciated here on this patch. +case 2: +flexarray_vappend(dm_args, -device,ich9-usb-ehci1,id=usb, +

[Qemu-devel] [PULL 29/33] coroutine: add ./configure --disable-coroutine-pool

2013-09-13 Thread Kevin Wolf
From: Stefan Hajnoczi stefa...@redhat.com The 'gthread' coroutine backend was written before the freelist (aka pool) existed in qemu-coroutine.c. This means that every thread is expected to exit when its coroutine terminates. It is not possible to reuse threads from a pool. This patch

[Qemu-devel] [PULL 26/33] qemu-img create: Emit filename on error

2013-09-13 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com bdrv_img_create generally does not emit the target filename, although this is pretty important information. Therefore, prepend its error message with the output filename (if an error occurs). Signed-off-by: Max Reitz mre...@redhat.com --- qemu-img.c | 2 +- 1

[Qemu-devel] [PULL 16/33] qmp: add internal snapshot support in qmp_transaction

2013-09-13 Thread Kevin Wolf
From: Wenchao Xia xiaw...@linux.vnet.ibm.com Unlike savevm, the qmp_transaction interface will not generate snapshot name automatically, saving trouble to return information of the new created snapshot. Although qcow2 support storing multiple snapshots with same name but different ID, here it

[Qemu-devel] [PULL 19/33] hmp: add interface hmp_snapshot_blkdev_internal

2013-09-13 Thread Kevin Wolf
From: Wenchao Xia xiaw...@linux.vnet.ibm.com Signed-off-by: Wenchao Xia xiaw...@linux.vnet.ibm.com Signed-off-by: Kevin Wolf kw...@redhat.com --- hmp-commands.hx | 19 +-- hmp.c | 10 ++ hmp.h | 1 + 3 files changed, 28 insertions(+), 2 deletions(-)

[Qemu-devel] [PULL 32/33] block: Assert validity of BdrvActionOps

2013-09-13 Thread Kevin Wolf
From: Max Reitz mre...@redhat.com In qmp_transaction, assert that the BdrvActionOps to be used is actually valid. This assertion failing is very improbable, however, it might happen, if a new TransactionActionKind is introduced out of order and the actions[] array is not updated. Signed-off-by:

  1   2   3   >