Re: [Qemu-devel] KVM call agenda for 2014-04-28

2014-04-29 Thread Daniel P. Berrange
On Tue, Apr 29, 2014 at 02:33:58PM +0200, Markus Armbruster wrote: Peter Maydell peter.mayd...@linaro.org writes: On 29 April 2014 11:09, Michael S. Tsirkin m...@redhat.com wrote: Let's just make clear how to contact us securely, when to contact that list, and what we'll do with the info.

Re: [Qemu-devel] [PATCH v2 2/2] qapi: Allow setting default values for optional parameters

2014-04-29 Thread Eric Blake
On 04/29/2014 03:44 AM, Fam Zheng wrote: In command definition, 'defaults' is now parsed as a dict of default values. Only optional parameters will have effect in generated code. 'str' and 'int' are supported. In generated code, 'str' will be converted to g_strdup'ed string pointer, 'int'

Re: [Qemu-devel] KVM call agenda for 2014-04-28

2014-04-29 Thread Stefan Hajnoczi
On Tue, Apr 29, 2014 at 12:09 PM, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Apr 29, 2014 at 09:56:19AM +0100, Peter Maydell wrote: On 29 April 2014 06:51, Michael S. Tsirkin m...@redhat.com wrote: If not too late, I'd like to discuss our security process. Do we as the project

Re: [Qemu-devel] [PATCH v3 1/5] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests

2014-04-29 Thread Kevin Wolf
Am 10.04.2014 um 22:47 hat Jeff Cody geschrieben: This creates some common functions for bash language qemu-iotests to control, and communicate with, a running QEMU process. 4 functions are introduced: 1. _launch_qemu() This launches the QEMU process(es), and sets up the file

Re: [Qemu-devel] [PATCH 1/3] virtio: Introduce VirtIODevice.broken

2014-04-29 Thread Paolo Bonzini
Il 28/04/2014 04:59, Michael S. Tsirkin ha scritto: All in all, it seems like a lot of work. But I think I see a nice elegant solution : stop the VM when some device detects an internal error and becomes broken. This should be a general event telling management that this happened - similar to

Re: [Qemu-devel] KVM call agenda for 2014-04-28

2014-04-29 Thread Markus Armbruster
Daniel P. Berrange berra...@redhat.com writes: On Tue, Apr 29, 2014 at 02:33:58PM +0200, Markus Armbruster wrote: Peter Maydell peter.mayd...@linaro.org writes: On 29 April 2014 11:09, Michael S. Tsirkin m...@redhat.com wrote: Let's just make clear how to contact us securely, when to

[Qemu-devel] [PATCH v3] PortioList: Store PortioList in device state

2014-04-29 Thread Kirill Batuzov
PortioList is an abstraction used for construction of MemoryRegionPortioList from MemoryRegionPortio. It can be used later to unmap created memory regions. It also requires proper cleanup because some of the memory inside is allocated dynamically. By moving PortioList ot device state we make it

Re: [Qemu-devel] [PATCH V3 0/5] remove QEMUMachine indirection from MachineClass

2014-04-29 Thread Paolo Bonzini
Il 27/04/2014 11:08, Marcel Apfelbaum ha scritto: Also, how do we proceed with getting rid of registration path 1 elsewhere? If we leave it around, experience shows that people will copy the wrong of two possible ways for implementing new things. Well, the problem here is not the code

Re: [Qemu-devel] [PATCH v3 00/12] target-i386: Support check/enforce flags -cpu host in TCG mode, too

2014-04-29 Thread Paolo Bonzini
Il 23/04/2014 22:37, Eduardo Habkost ha scritto: On Wed, Apr 23, 2014 at 05:29:28PM -0300, Eduardo Habkost wrote: This removes some duplication in the CPU feature checking and filtering code in cpu.c, and as a nice side-effect, will make the check and enforce flags work in TCG mode too. The

[Qemu-devel] [PATCH 0/3] kvm/s390x/ppc: kvm_enable_cap helpers

2014-04-29 Thread Cornelia Huck
Hi, here's the introduction of some convenience helpers for enabling kvm capabilities and the conversion of the existing callers. I kept this separate for s390x and ppc, as I can't test the ppc part. The helper functions are now macros so that I can use __VA_ARGS__ for argument checking.

[Qemu-devel] [PATCH 3/3] ppc: use kvm_enable_cap_vcpu()

2014-04-29 Thread Cornelia Huck
Convert existing users of KVM_ENABLE_CAP to new helper. Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/intc/openpic_kvm.c |8 ++-- hw/intc/xics_kvm.c|8 ++-- target-ppc/kvm.c | 21 - 3

[Qemu-devel] [PATCH 2/3] s390x: use kvm_enable_cap_vcpu()

2014-04-29 Thread Cornelia Huck
Make kvm_s390_enable_css_support() use new interface. Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- target-s390x/kvm.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c

[Qemu-devel] [PATCH 1/3] kvm: add kvm_enable_cap_{vm,vcpu}

2014-04-29 Thread Cornelia Huck
Provide helper functions for enabling capabilities (on a vcpu and on a vm). Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- include/sysemu/kvm.h | 28 1 file changed, 28 insertions(+) diff --git

Re: [Qemu-devel] KVM call agenda for 2014-04-28

2014-04-29 Thread Michael S. Tsirkin
On Tue, Apr 29, 2014 at 03:31:32PM +0200, Markus Armbruster wrote: Daniel P. Berrange berra...@redhat.com writes: On Tue, Apr 29, 2014 at 02:33:58PM +0200, Markus Armbruster wrote: Peter Maydell peter.mayd...@linaro.org writes: On 29 April 2014 11:09, Michael S. Tsirkin

Re: [Qemu-devel] [PATCH V3 0/5] remove QEMUMachine indirection from MachineClass

2014-04-29 Thread Marcel Apfelbaum
On Tue, 2014-04-29 at 15:41 +0200, Paolo Bonzini wrote: Il 27/04/2014 11:08, Marcel Apfelbaum ha scritto: Also, how do we proceed with getting rid of registration path 1 elsewhere? If we leave it around, experience shows that people will copy the wrong of two possible ways for

Re: [Qemu-devel] [PATCH v3] PortioList: Store PortioList in device state

2014-04-29 Thread Paolo Bonzini
Il 29/04/2014 15:38, Kirill Batuzov ha scritto: PortioList is an abstraction used for construction of MemoryRegionPortioList from MemoryRegionPortio. It can be used later to unmap created memory regions. It also requires proper cleanup because some of the memory inside is allocated dynamically.

[Qemu-devel] [Bug 1314211] [NEW] symbol lookup error: qemu-system-x86_64: undefined symbol: libusb_get_port_numbers

2014-04-29 Thread DEnis
Public bug reported: If I compile with --enable-libusb : # qemu-system-x86_64 --help qemu-system-x86_64: symbol lookup error: qemu-system-x86_64: undefined symbol: libusb_get_port_numbers Ubuntu 12.10, Kernel 3.10.38 libusb 1.0.18-1 (compiled from libusb.org) If I configure with options

Re: [Qemu-devel] [PATCH 0/2] unset RAMBlock idstr when unregistering

2014-04-29 Thread Paolo Bonzini
Il 02/04/2014 09:13, Hu Tao ha scritto: When hotplug an memdev that was previously plugged and unplugged, RAMBlock idstr is not cleared and triggers an assert error in qemu_ram_set_idstr(). This series fixes it. Hu Tao (2): exec: introduce qemu_ram_unset_idstr() to unset RAMBlock idstr

Re: [Qemu-devel] [PATCH v3 1/5] block: qemu-iotests - add common.qemu, for bash-controlled qemu tests

2014-04-29 Thread Jeff Cody
On Tue, Apr 29, 2014 at 03:26:55PM +0200, Kevin Wolf wrote: Am 10.04.2014 um 22:47 hat Jeff Cody geschrieben: This creates some common functions for bash language qemu-iotests to control, and communicate with, a running QEMU process. 4 functions are introduced: 1. _launch_qemu()

Re: [Qemu-devel] [PATCH v2] configure: make source tree build more robust

2014-04-29 Thread Paolo Bonzini
Il 28/04/2014 16:23, Michael S. Tsirkin ha scritto: When source directory can be arrived at by two paths, configure might misdetect an out of tree build. The simplest way to trigger the problem is running configure using a full path. E.g. (firstpath refers to qemu source tree): ln -s

[Qemu-devel] [PATCH 1/2] qcow2: Fix discard

2014-04-29 Thread Max Reitz
discard_single_l2() should not implement its own version of qcow2_get_cluster_type(), but rather rely on this already existing function. By doing so, it will work for compressed clusters as well (which it did not so far). Also, rename old_offset to old_l2_entry, as both are quite different (and

[Qemu-devel] [PATCH 0/2] qcow2: Fix discard

2014-04-29 Thread Max Reitz
Currently, qcow2's discard implementation does not work very well for compressed clusters. This series fixes this and adds appropriate tests. Max Reitz (2): qcow2: Fix discard iotests: Discarding compressed clusters on qcow2 block/qcow2-cluster.c | 26 ++--

Re: [Qemu-devel] [PATCH] Makefile: Fix per-object variables for Makefile.target

2014-04-29 Thread Paolo Bonzini
Il 29/04/2014 09:28, Fam Zheng ha scritto: What about this instead, does it do the same? Yes, it's better! Ok, I'll take care of this patch then. Paolo

[Qemu-devel] [PATCH 2/2] iotests: Discarding compressed clusters on qcow2

2014-04-29 Thread Max Reitz
Add a test which discards a compressed cluster on qcow2. This should work without any problems. Signed-off-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/090 | 61 ++ tests/qemu-iotests/090.out | 12 + tests/qemu-iotests/group |

Re: [Qemu-devel] [PATCH 1/3] kvm: add kvm_enable_cap_{vm,vcpu}

2014-04-29 Thread Alexander Graf
On 29.04.14 15:52, Cornelia Huck wrote: Provide helper functions for enabling capabilities (on a vcpu and on a vm). Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- include/sysemu/kvm.h | 28 1 file

[Qemu-devel] [PATCH 1/5] util/qemu-openpty: fix build with musl libc by include termios.h as fallback

2014-04-29 Thread Natanael Copa
Include termios.h as POSIX fallback when not glibc, bsd or solaris. POSIX says that termios.h should define struct termios and TCAFLUSH. http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/termios.h.html This fixes the following compile errors with musl libc: util/qemu-openpty.c: In

[Qemu-devel] [PATCH 0/5] fix building with musl libc

2014-04-29 Thread Natanael Copa
In addition to the previoiusly sent linux-user: avoid using glibc internals in _syscall5 and in definition of target_sigevent struct, those are needed for making qemu build with musl libc on Alpine Linux. There is still 2 missing fcntl.h definitions (F_EXLCK and F_SHLCK) but those should probably

[Qemu-devel] [PATCH 2/5] xen: replace ffsl with ctzl

2014-04-29 Thread Natanael Copa
ffsl is a GNU extension and not available in musl libc. See also commit fbeadf50 (bitops: unify bitops_ffsl with the one in host-utils.h, call it bitops_ctzl) on why ctzl should be used instead of ffsl. Signed-off-by: Natanael Copa nc...@alpinelinux.org --- xen-all.c | 2 +- 1 file changed, 1

Re: [Qemu-devel] [PATCH v3 3/5] block: qemu-iotests - test for live migration

2014-04-29 Thread Kevin Wolf
Am 10.04.2014 um 22:47 hat Jeff Cody geschrieben: This is an initial, simple live migration test from one running VM to another, using monitor commands. This is also an example on using the new common.qemu functions for controlling multiple running qemu instances, for tests that need a live

[Qemu-devel] [PATCH 4/5] exec: replace ffsl with ctzl

2014-04-29 Thread Natanael Copa
See commit fbeadf50 (bitops: unify bitops_ffsl with the one in host-utils.h, call it bitops_ctzl) on why ctzl should be used instead of ffsl. This is also needed for musl libc which does not implement ffsl. Signed-off-by: Natanael Copa nc...@alpinelinux.org --- include/exec/ram_addr.h | 2 +- 1

[Qemu-devel] [PATCH 3/5] vhost: replace ffsl with ctzl

2014-04-29 Thread Natanael Copa
Avoid using the GNU extesion ffsl which is not implemented in musl libc. The atomic_xchg() means we know that vhost_log_chunk_t will never be larger than the 'long' type, so ctzl() is always sufficient. See also commit fbeadf50 (bitops: unify bitops_ffsl with the one in host-utils.h, call it

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/4] dump: Make DumpState and endian conversion routines available for arch-specific dump code

2014-04-29 Thread Greg Kurz
On Tue, 29 Apr 2014 11:35:46 +0200 Alexander Graf ag...@suse.de wrote: On 29.04.14 11:29, Greg Kurz wrote: On Tue, 29 Apr 2014 11:16:51 +0200 Alexander Graf ag...@suse.de wrote: On 28.04.14 13:29, Greg Kurz wrote: From: Bharata B Rao bhar...@linux.vnet.ibm.com Make DumpState and

Re: [Qemu-devel] [PATCH v3 05/16] tcg: Define tcg_insn_unit for codepointerss

2014-04-29 Thread Richard Henderson
On 04/29/2014 03:38 AM, Alex Bennée wrote: @@ -2653,7 +2683,8 @@ static inline int tcg_gen_code_common(TCGContext *s, uint8_t *gen_code_buf, } args += def-nb_args; next: -if (search_pc = 0 search_pc s-code_ptr - gen_code_buf) { +if (search_pc = 0 +

[Qemu-devel] [PATCH 5/5] linux-user/signal.c: define __SIGRTMIN/MAX for non-GNU platforms

2014-04-29 Thread Natanael Copa
The __SIGRTMIN and __SIGRTMAX are glibc internals and are not available on all platforms, so we define those if they are missing. This is needed for musl libc. Signed-off-by: Natanael Copa nc...@alpinelinux.org --- linux-user/signal.c | 7 +++ 1 file changed, 7 insertions(+) diff --git

Re: [Qemu-devel] [PATCH v3 0/5] Add common QEMU control functionality to qemu-iotests

2014-04-29 Thread Kevin Wolf
Am 10.04.2014 um 22:47 hat Jeff Cody geschrieben: Changes from v2: Updated Reviewed-by for Fam and Benoit (Benoit's from the v1 patch, I forgot to add those to v2) Patch 1: * updated commit message (Thanks Fam) * Addded '-machine accel=qtest' to qemu launch args (Thanks

Re: [Qemu-devel] [PATCH v3 00/12] target-i386: Support check/enforce flags -cpu host in TCG mode, too

2014-04-29 Thread Eduardo Habkost
On Tue, Apr 29, 2014 at 03:51:17PM +0200, Paolo Bonzini wrote: Il 23/04/2014 22:37, Eduardo Habkost ha scritto: On Wed, Apr 23, 2014 at 05:29:28PM -0300, Eduardo Habkost wrote: This removes some duplication in the CPU feature checking and filtering code in cpu.c, and as a nice side-effect,

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/4] dump: Make DumpState and endian conversion routines available for arch-specific dump code

2014-04-29 Thread Greg Kurz
On Tue, 29 Apr 2014 15:51:07 +0530 Bharata B Rao bharata@gmail.com wrote: On Tue, Apr 29, 2014 at 2:59 PM, Greg Kurz gk...@linux.vnet.ibm.com wrote: On Tue, 29 Apr 2014 11:16:51 +0200 Alexander Graf ag...@suse.de wrote: On 28.04.14 13:29, Greg Kurz wrote: From: Bharata B Rao

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/4] dump: Make DumpState and endian conversion routines available for arch-specific dump code

2014-04-29 Thread Alexander Graf
On 29.04.14 16:20, Greg Kurz wrote: On Tue, 29 Apr 2014 11:35:46 +0200 Alexander Graf ag...@suse.de wrote: On 29.04.14 11:29, Greg Kurz wrote: On Tue, 29 Apr 2014 11:16:51 +0200 Alexander Graf ag...@suse.de wrote: On 28.04.14 13:29, Greg Kurz wrote: From: Bharata B Rao

Re: [Qemu-devel] [PATCH v3 06/16] tcg-i386: DefineTCG_TARGET_INSN_UNIT_SIZEE

2014-04-29 Thread Richard Henderson
On 04/29/2014 04:12 AM, Alex Bennée wrote: Richard Henderson r...@twiddle.net writes: And use tcg pointer differencing functions as appropriate. Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Richard Henderson r...@twiddle.net snip -static void

Re: [Qemu-devel] [PATCH 5/5] linux-user/signal.c: define __SIGRTMIN/MAX for non-GNU platforms

2014-04-29 Thread Eric Blake
On 04/29/2014 08:17 AM, Natanael Copa wrote: The __SIGRTMIN and __SIGRTMAX are glibc internals and are not available on all platforms, so we define those if they are missing. This is needed for musl libc. Signed-off-by: Natanael Copa nc...@alpinelinux.org --- linux-user/signal.c | 7

Re: [Qemu-devel] [patch 2/2] target-i386: block migration and savevm if invariant tsc is exposed

2014-04-29 Thread Eduardo Habkost
On Tue, Apr 29, 2014 at 08:22:36AM +0200, Paolo Bonzini wrote: Il 28/04/2014 21:23, Eduardo Habkost ha scritto: Makes sense. Basically -cpu host,migratable=yes is close to libvirt's host-model and Alex Graf's proposed -cpu best. Should we call it -cpu best and drop migratability of -cpu

Re: [Qemu-devel] [PATCH v3 07/16] tcg-ppc64: DefineTCG_TARGET_INSN_UNIT_SIZEE

2014-04-29 Thread Richard Henderson
On 04/29/2014 04:25 AM, Alex Bennée wrote: +static void reloc_pc24(tcg_insn_unit *pc, tcg_insn_unit *target) { -*(uint32_t *)pc = (*(uint32_t *)pc ~0x3fc) -| reloc_pc24_val(pc, target); +*pc = (*pc ~0x3fc) | reloc_pc24_val(pc, target); } Should 0x3fc be a

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] target-ppc: ppc can be either endian

2014-04-29 Thread Greg Kurz
On Tue, 29 Apr 2014 11:22:38 +0200 Alexander Graf ag...@suse.de wrote: On 29.04.14 11:15, Greg Kurz wrote: POWER7, POWER7+ and POWER8 families use the ILE bit of the LPCR special purpose register to decide the endianness to use when entering interrupt handlers. When running a Linux guest,

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] target-ppc: ppc can be either endian

2014-04-29 Thread Alexander Graf
On 29.04.14 16:30, Greg Kurz wrote: On Tue, 29 Apr 2014 11:22:38 +0200 Alexander Graf ag...@suse.de wrote: On 29.04.14 11:15, Greg Kurz wrote: POWER7, POWER7+ and POWER8 families use the ILE bit of the LPCR special purpose register to decide the endianness to use when entering interrupt

Re: [Qemu-devel] [PATCH 0/2] qcow2: Fix discard

2014-04-29 Thread Kevin Wolf
Am 29.04.2014 um 16:12 hat Max Reitz geschrieben: Currently, qcow2's discard implementation does not work very well for compressed clusters. This series fixes this and adds appropriate tests. Max Reitz (2): qcow2: Fix discard iotests: Discarding compressed clusters on qcow2 Thanks,

Re: [Qemu-devel] [PATCH 5/5] linux-user/signal.c: define __SIGRTMIN/MAX for non-GNU platforms

2014-04-29 Thread Natanael Copa
On Tue, 29 Apr 2014 08:28:29 -0600 Eric Blake ebl...@redhat.com wrote: On 04/29/2014 08:17 AM, Natanael Copa wrote: The __SIGRTMIN and __SIGRTMAX are glibc internals and are not available on all platforms, so we define those if they are missing. This is needed for musl libc.

Re: [Qemu-devel] [PATCH V3 0/5] remove QEMUMachine indirection from MachineClass

2014-04-29 Thread Andreas Färber
Am 27.04.2014 11:08, schrieb Marcel Apfelbaum: On Sat, 2014-04-26 at 00:30 +0200, Andreas Färber wrote: Am 09.04.2014 19:34, schrieb Marcel Apfelbaum: Next steps: - Replace QemuOpts queries by MachineState fields. - Follow Paolo's suggestions to get rid of QEMUMachineInitArgs. Another

Re: [Qemu-devel] [PATCH 06/16] pci-assign: propagate Error from check_irqchip_in_kernel()

2014-04-29 Thread Eric Blake
On 04/10/2014 02:24 AM, Laszlo Ersek wrote: Rename check_irqchip_in_kernel() to verify_irqchip_in_kernel(), so that the name reflects our expectation better. Rather than returning a bool, make it do nothing or set an Error. Signed-off-by: Laszlo Ersek ler...@redhat.com ---

Re: [Qemu-devel] [PATCH 5/5] linux-user/signal.c: define __SIGRTMIN/MAX for non-GNU platforms

2014-04-29 Thread Eric Blake
On 04/29/2014 08:53 AM, Natanael Copa wrote: On Tue, 29 Apr 2014 08:28:29 -0600 Eric Blake ebl...@redhat.com wrote: On 04/29/2014 08:17 AM, Natanael Copa wrote: The __SIGRTMIN and __SIGRTMAX are glibc internals and are not available on all platforms, so we define those if they are missing.

[Qemu-devel] [PATCH 1/8] curl: Fix long line

2014-04-29 Thread Matthew Booth
Signed-off-by: Matthew Booth mbo...@redhat.com --- block/curl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/block/curl.c b/block/curl.c index 6731d28..0404dbd 100644 --- a/block/curl.c +++ b/block/curl.c @@ -256,7 +256,8 @@ static void curl_multi_read(BDRVCURLState *s)

[Qemu-devel] [PATCH 0/8] curl: Fix hang reading from slow connections

2014-04-29 Thread Matthew Booth
[PATCH 1/8] curl: Fix long line [PATCH 2/8] curl: Remove unnecessary use of goto [PATCH 3/8] curl: Fix return from curl_read_cb with invalid state [PATCH 4/8] curl: Remove erroneous sleep waiting for curl completion [PATCH 5/8] curl: Remove unnecessary explicit calls to internal event [PATCH 6/8]

[Qemu-devel] [PATCH 4/8] curl: Remove erroneous sleep waiting for curl completion

2014-04-29 Thread Matthew Booth
The driver will not start more than a fixed number of curl sessions. If it needs more, it must wait for the completion of an existing one. The driver was sleeping, which will prevent the main loop from running, and therefore the event it's waiting on. It was also directly calling its internal

[Qemu-devel] [PATCH 6/8] curl: Eliminate unnecessary use of curl_multi_socket_all

2014-04-29 Thread Matthew Booth
curl_multi_socket_all is a deprecated catch-all which checks for activities on all open curl sockets. We have enough information from the event loop to check only the sockets with activity. This change removes use of curl_multi_socket_all in favour of curl_multi_socket_action called with the

[Qemu-devel] [PATCH 3/8] curl: Fix return from curl_read_cb with invalid state

2014-04-29 Thread Matthew Booth
A curl write callback is supposed to return the number of bytes it handled. curl_read_cb would have erroneously reported it had handled all bytes in the event that the internal curl state was invalid. Signed-off-by: Matthew Booth mbo...@redhat.com --- block/curl.c | 3 +-- 1 file changed, 1

[Qemu-devel] [PATCH v6 01/14] qcow2: Allow full discard

2014-04-29 Thread Max Reitz
Normally, discarded sectors should read back as zero. However, there are cases in which a sector (or rather cluster) should be discarded as if they were never written in the first place, that is, reading them should fall through to the backing file again. Signed-off-by: Max Reitz

[Qemu-devel] [PATCH v6 00/14] qemu-img: Implement commit like QMP

2014-04-29 Thread Max Reitz
qemu-img should use QMP commands whenever possible in order to ensure feature completeness of both online and offline image operations. For the commit command, this is relatively easy, so implement it first (in the hope that indeed others will follow). As qemu-img does not have access to QMP (due

[Qemu-devel] [PATCH v6 09/14] qemu-img: Enable progress output for commit

2014-04-29 Thread Max Reitz
Implement progress output for the commit command by querying the progress of the block job. Signed-off-by: Max Reitz mre...@redhat.com --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 24 ++-- qemu-img.texi| 2 +- 3 files changed, 25 insertions(+), 5 deletions(-) diff

[Qemu-devel] [PATCH v6 07/14] qemu-img: Implement commit like QMP

2014-04-29 Thread Max Reitz
qemu-img should use QMP commands whenever possible in order to ensure feature completeness of both online and offline image operations. As qemu-img itself has no access to QMP (since this would basically require just everything being linked into qemu-img), imitate QMP's implementation of

[Qemu-devel] [PATCH v6 06/14] block/mirror: Improve progress report

2014-04-29 Thread Max Reitz
Instead of taking the total length of the block device as the block job's length, use the number of dirty sectors. The progress is now the number of sectors mirrored to the target block device. Note that this may result in the job's length increasing during operation, which is however in fact

[Qemu-devel] [PATCH 5/8] curl: Remove unnecessary explicit calls to internal event handler

2014-04-29 Thread Matthew Booth
Remove calls to curl_multi_do where the relevant handles are already registered to the event loop. Ensure that we kick off socket handling with CURL_SOCKET_TIMEOUT after adding a new handle. Signed-off-by: Matthew Booth mbo...@redhat.com --- block/curl.c | 5 +++-- 1 file changed, 3

[Qemu-devel] [PATCH v2 1/3] kvm: add kvm_{vm,vcpu}_enable_cap

2014-04-29 Thread Cornelia Huck
Provide helper functions for enabling capabilities (on a vcpu and on a vm). Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- include/sysemu/kvm.h | 30 ++ 1 file changed, 30 insertions(+) diff --git

[Qemu-devel] [PATCH v6 11/14] iotests: Add _filter_qemu_img_map

2014-04-29 Thread Max Reitz
As different image formats most probably map guest addresses to different host addresses, add a filter to filter the host addresses out; also, the image filename should be filtered. Signed-off-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/common.filter | 7 +++ 1 file changed, 7

[Qemu-devel] [PATCH v6 12/14] iotests: Add test for backing-chain commits

2014-04-29 Thread Max Reitz
Add a test for qemu-img commit on backing chains with more than two images. This test also checks whether the images above the base image are emptied and does therefore not work for qed and vmdk which requires it to be separate from 020. Signed-off-by: Max Reitz mre...@redhat.com ---

[Qemu-devel] [PATCH v6 13/14] iotests: Add test for qcow2's bdrv_make_empty

2014-04-29 Thread Max Reitz
Add a test for qcow2's fast bdrv_make_empty implementation on images without internal snapshots. Signed-off-by: Max Reitz mre...@redhat.com --- tests/qemu-iotests/093 | 72 ++ tests/qemu-iotests/093.out | 26 +

[Qemu-devel] [PATCH v6 14/14] iotests: Omit length/offset test in 040 and 041

2014-04-29 Thread Max Reitz
As the length of a mirror block job no longer directly depends on the size of the block device, drop those checks from this test. Instead, just check whether the final offset equals the block job length. As 041 uses the wait_until_completed function from iotests.py, the same applies there as well

[Qemu-devel] [PATCH 2/8] curl: Remove unnecessary use of goto

2014-04-29 Thread Matthew Booth
This isn't any of the usually acceptable uses of goto. Signed-off-by: Matthew Booth mbo...@redhat.com --- block/curl.c | 55 +++ 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/block/curl.c b/block/curl.c index 0404dbd..e97f449

Re: [Qemu-devel] [PATCH] tci: Optimize saving of TCG code address

2014-04-29 Thread Richard Henderson
On 04/28/2014 10:57 PM, Stefan Weil wrote: -static tcg_target_ulong tci_reg[TCG_TARGET_NB_REGS]; +static inline void save_tb_ptr(void *tb_ptr) +{ +#ifdef CONFIG_SOFTMMU +tci_tb_ptr = (uintptr_t)tb_ptr; +#endif +} Wouldn't it be better to save this always? I'm a bit confused about

[Qemu-devel] KVM call minutes for 2014-04-29

2014-04-29 Thread Juan Quintela
2014-04-29 -- - security (CVE) New group to handle that issues responsible. Mail is still not encrypted, wolud be. mst writing a wiki page about it what is the criteria to request (not) for a CVE number Look at http://wiki.qemu.org/SecurityProcess - hot [un]plug for

[Qemu-devel] [PATCH 1/3] gtk: zap scrolled_window

2014-04-29 Thread Gerd Hoffmann
The vte widget implements the scrollable interface, placing it into a scrolled window is pointless and creates a bunch of strange effects. Zap it. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/gtk.c | 19 ++- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git

[Qemu-devel] [PATCH 3/3] gtk: cleanup CONFIG_VTE ifdef a bit.

2014-04-29 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/gtk.c | 45 ++--- 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 776e72d..068a39b 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -108,8 +108,8 @@ static const int

[Qemu-devel] [PATCH 2/3] gtk: zap vte size requests

2014-04-29 Thread Gerd Hoffmann
The vte tabs simply get the size of the vga tab then, with whatever cols and lines are fitting in. I find this bahavior more useful than resizing the qemu window all day long. YMMV. Comments are welcome. Signed-off-by: Gerd Hoffmann kra...@redhat.com --- ui/gtk.c | 14 -- 1 file

[Qemu-devel] [PATCH 0/3] gtk: cleanups continued.

2014-04-29 Thread Gerd Hoffmann
Hi, Some more gtk cleanups and fixes. cheers, Gerd Gerd Hoffmann (3): gtk: zap scrolled_window gtk: zap vte size requests gtk: cleanup CONFIG_VTE ifdef a bit. ui/gtk.c | 78 +++- 1 file changed, 28 insertions(+), 50

Re: [Qemu-devel] [PATCH 1/6] block: Create bdrv_inherited_flags()

2014-04-29 Thread Max Reitz
On 25.04.2014 19:51, Kevin Wolf wrote: Instead of having bdrv_open_flags() as a function that creates flags for several unrelated places and then adding open-coded flags on top, create a new function that derives the flags for bs-file from the flags for bs. Signed-off-by: Kevin Wolf

Re: [Qemu-devel] [PATCH v3 07/16] tcg-ppc64: DefineTCG_TARGET_INSN_UNIT_SIZEE

2014-04-29 Thread Alex Bennée
Richard Henderson r...@twiddle.net writes: On 04/29/2014 04:25 AM, Alex Bennée wrote: +static void reloc_pc24(tcg_insn_unit *pc, tcg_insn_unit *target) { -*(uint32_t *)pc = (*(uint32_t *)pc ~0x3fc) -| reloc_pc24_val(pc, target); +*pc = (*pc ~0x3fc) |

Re: [Qemu-devel] [PATCH v6 08/14] qemu-img: Empty image after commit

2014-04-29 Thread Eric Blake
On 04/29/2014 09:07 AM, Max Reitz wrote: After the top image has been committed, it should be emptied unless specified otherwise. Signed-off-by: Max Reitz mre...@redhat.com --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 34 +++--- qemu-img.texi| 6

Re: [Qemu-devel] [PATCH 2/6] block: Create bdrv_backing_flags()

2014-04-29 Thread Max Reitz
On 25.04.2014 19:51, Kevin Wolf wrote: Instead of manipulation flags inline, move the derivation of the flags of a backing file into a new function next to the existing functions that derive flags for bs-file and for the block driver open function. Signed-off-by: Kevin Wolf kw...@redhat.com ---

Re: [Qemu-devel] [PATCH 3/6] block: Remove BDRV_O_COPY_ON_READ for bs-file

2014-04-29 Thread Max Reitz
On 25.04.2014 19:51, Kevin Wolf wrote: Copy on Read makes sense on the format level where backing files are implemented, but it's not required on the protocol level. While it shouldn't actively break anything to have COR enabled on both layers, needless serialisation and allocation checks may

[Qemu-devel] [PATCH v6 02/14] qcow2: Implement bdrv_make_empty()

2014-04-29 Thread Max Reitz
Implement this function by making all clusters in the image file fall through to the backing file (by using the recently extended discard). Signed-off-by: Max Reitz mre...@redhat.com --- block/qcow2.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/block/qcow2.c

Re: [Qemu-devel] [PATCH V26 00/32] replace QEMUOptionParameter with QemuOpts

2014-04-29 Thread Leandro Dorileo
Hi Chunyan, I haven't found enough time the last versions you've sent for review. I've buit your patch series and the final result builds nicely, but it fails the test 061, I haven't had the time to investigate it yet. I'm leaving on vacation next Friday so I'll try to review all you patches

[Qemu-devel] [PATCH v6 10/14] qemu-img: Specify backing file for commit

2014-04-29 Thread Max Reitz
Introduce a new parameter for qemu-img commit which may be used to explicitly specify the backing file into which an image should be committed if the backing chain has more than a single layer. Signed-off-by: Max Reitz mre...@redhat.com --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 24

[Qemu-devel] [PATCH v2 0/3] kvm/s390x/ppc: kvm_enable_cap helpers

2014-04-29 Thread Cornelia Huck
Here's the next version of the kvm capability helpers, again on https://github.com/cohuck/qemu.git kvm-cap-helpers Changes v1-v2: - add cap.flags parameter - function word ordering Cornelia Huck (3): kvm: add kvm_{vm,vcpu}_enable_cap s390x: use kvm_vcpu_enable_cap() ppc: use

[Qemu-devel] [Bug 1314211] Re: symbol lookup error: qemu-system-x86_64: undefined symbol: libusb_get_port_numbers

2014-04-29 Thread Michael Tokarev
This is a local libusb error. Libusb headers and build-time library does not match libusb which is used at runtime. ** Changed in: qemu Status: New = Invalid -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

Re: [Qemu-devel] [PATCH 4/6] block: Unlink temporary files in raw-posix/win32

2014-04-29 Thread Max Reitz
On 25.04.2014 19:51, Kevin Wolf wrote: Instead of having unlink() calls in the generic block layer, where we aren't even guarateed to have a file name, move them to those block drivers that are actually used and that always have a filename. Gets us rid of some #ifdefs as well. The patch also

[Qemu-devel] [PATCH v2 3/3] ppc: use kvm_vcpu_enable_cap()

2014-04-29 Thread Cornelia Huck
Convert existing users of KVM_ENABLE_CAP to new helper. Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- hw/intc/openpic_kvm.c |8 ++-- hw/intc/xics_kvm.c|8 ++-- target-ppc/kvm.c | 21 - 3

[Qemu-devel] [PATCH 7/8] curl: Ensure all informationals are checked for completion

2014-04-29 Thread Matthew Booth
According to the documentation, the correct way to ensure all informationals have been returned by curl_multi_info_read is to loop until it returns NULL. Signed-off-by: Matthew Booth mbo...@redhat.com --- block/curl.c | 53 +++-- 1 file changed, 23

[Qemu-devel] [PATCH v6 04/14] blockjob: Introduce block_job_complete_sync()

2014-04-29 Thread Max Reitz
Implement block_job_complete_sync() by doing the exact same thing as block_job_cancel_sync() does, only with calling block_job_complete() instead of block_job_cancel(). Signed-off-by: Max Reitz mre...@redhat.com Reviewed-by: Kevin Wolf kw...@redhat.com --- blockjob.c | 39

[Qemu-devel] [PATCH 8/8] curl: Fix hang reading from slow connections

2014-04-29 Thread Matthew Booth
When receiving a new aio read request, we first look for an existing transaction whose range will cover the read request by the time it completes. However, we weren't checking that the existing transaction was still active. If it had timed out, we were adding the request to a transaction which

[Qemu-devel] [PATCH v6 03/14] qcow2: Optimize bdrv_make_empty()

2014-04-29 Thread Max Reitz
bdrv_make_empty() is currently only called if the current image represents an external snapshot that has been committed to its base image; it is therefore unlikely to have internal snapshots. In this case, bdrv_make_empty() can be greatly sped up by creating an empty L1 table and dropping all data

Re: [Qemu-devel] [PATCH 5/6] Revert block: another bdrv_append fix

2014-04-29 Thread Max Reitz
On 25.04.2014 19:51, Kevin Wolf wrote: This reverts commit 3a389e7926750cba5c83f662b1941888b2bebc04. The commit was wrong and what it tried to fix just works today without any change. What the commit tried to fix: When creating live snapshots, the new image file is opened with

Re: [Qemu-devel] [PATCH 4/5] libcacard: replace qemu thread primitives with glib ones

2014-04-29 Thread Michael Tokarev
29.04.2014 13:11, Paolo Bonzini wrote: Il 29/04/2014 10:42, Michael Tokarev ha scritto: Also replace single instance pstrcpy() in vcard_emul_nss.c to strncpy(). This reverts commit 2e679780ae86c6ca8. An alternative would be to use g_strlcpy which guarantees nul-termination. Yes,

Re: [Qemu-devel] [PATCH 6/6] block: Fix open_flags in bdrv_reopen()

2014-04-29 Thread Max Reitz
On 25.04.2014 19:51, Kevin Wolf wrote: Use the same function as bdrv_open() for determining what the right flags for bs-file are. Without doing this, a reopen means that bs-file loses BDRV_O_CACHE_WB or BDRV_O_UNMAP if bs doesn't have it as well. Signed-off-by: Kevin Wolf kw...@redhat.com ---

[Qemu-devel] [PATCH v2 2/3] s390x: use kvm_vcpu_enable_cap()

2014-04-29 Thread Cornelia Huck
Make kvm_s390_enable_css_support() use new interface. Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com --- target-s390x/kvm.c |4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/target-s390x/kvm.c b/target-s390x/kvm.c

Re: [Qemu-devel] [PATCH V26 03/32] QemuOpts: repurpose qemu_opts_print to replace print_option_parameters

2014-04-29 Thread Eric Blake
On 04/29/2014 03:10 AM, Chunyan Liu wrote: Currently this function is not used anywhere. In later patches, it will replace print_option_parameters. To avoid print info changes, change qemu_opts_print from fprintf stderr to printf to keep consistent with print_option_parameters, remove last

Re: [Qemu-devel] [PATCH] build-sys: simplify Makefile.target a bit, use just one rule for softmmu

2014-04-29 Thread Paolo Bonzini
Il 28/04/2014 09:03, Michael Tokarev ha scritto: On win*, we build QEMU_PROGW (GUI) and create a console app QEMU_PROG from it, while on non-win*, we make only QEMU_PROG using the same rules as used for QEMU_PROGW on win*. Make just one rule for building main executable, and an additional rule

[Qemu-devel] [PATCH] block: Use error_abort in bdrv_image_info_specific_dump()

2014-04-29 Thread Max Reitz
Currently, bdrv_image_info_specific_dump() uses an error variable for visit_type_ImageInfoSpecific, but ignores the result. As this function is used here with an output visitor to transform the ImageInfoSpecific object to a generic QDict, an error should actually be impossible. It is however

Re: [Qemu-devel] [PATCH V26 02/32] QemuOpts: add def_value_str to QemuOptDesc

2014-04-29 Thread Eric Blake
On 04/29/2014 03:10 AM, Chunyan Liu wrote: Add def_value_str (default value) to QemuOptDesc, to replace function of the default value in QEMUOptionParameter. Improve qemu_opts_get_* functions: if find opt, return opt-str; otherwise, if desc-def_value_str is set, return desc-def_value_str;

Re: [Qemu-devel] [PATCH v6 08/14] qemu-img: Empty image after commit

2014-04-29 Thread Max Reitz
On 29.04.2014 17:41, Eric Blake wrote: On 04/29/2014 09:07 AM, Max Reitz wrote: After the top image has been committed, it should be emptied unless specified otherwise. Signed-off-by: Max Reitz mre...@redhat.com --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 34

[Qemu-devel] [PATCH v6 08/14] qemu-img: Empty image after commit

2014-04-29 Thread Max Reitz
After the top image has been committed, it should be emptied unless specified otherwise. Signed-off-by: Max Reitz mre...@redhat.com --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 34 +++--- qemu-img.texi| 6 +- 3 files changed, 38 insertions(+), 6

Re: [Qemu-devel] [PATCH V26 04/32] qapi: output def_value_str when query command line options

2014-04-29 Thread Eric Blake
On 04/29/2014 03:10 AM, Chunyan Liu wrote: Change qapi interfaces to output the newly added def_value_str when querying command line options. Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com Signed-off-by: Chunyan Liu cy...@suse.com --- Changes to V25: * update @default

[Qemu-devel] [PATCH v6 05/14] blockjob: Add ready field

2014-04-29 Thread Max Reitz
When a block job signals readiness, this is currently reported only through QMP. If qemu wants to use block jobs for internal tasks, there needs to be another way to correctly detect when a block job may be completed. For this reason, introduce a bool ready which is set when the block job may be

<    1   2   3   4   >