Re: [Qemu-devel] [Qemu-trivial] [PATCH] libcacard: g_malloc cleanups

2014-05-17 Thread Michael Tokarev
08.05.2014 19:54, Michael Tokarev wrote: > This patch replaces g_malloc() in libcacard into g_new() > or g_new0() where appropriate (removing some init-to-zero > surrounding code), g_malloc+memcpy into g_memdup() and the > like. Applied to trivial-patches qeue, thanks! /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] arch_init: Simplify code for load_xbzrle()

2014-05-17 Thread Michael Tokarev
10.05.2014 16:51, Chen Gang wrote: > For xbzrle_decode_buffer(), when decoding contents will exceed writing > buffer, it will return -1, so need not check the return value whether > large than writing buffer. > > And when failure occurs within load_xbzrle(), it always return -1 > without any resou

Re: [Qemu-devel] [Qemu-trivial] [PATCH] iohandler.c: Properly initialize sigaction struct

2014-05-17 Thread Michael Tokarev
16.05.2014 17:00, Peter Maydell wrote: > The code in qemu_init_child_watch() wasn't clearing the 'struct > sigaction' before passing it to sigaction(); this meant that we > would block a random set of signals while executing the SIGCHLD > handler. Initialize properly by using memset() on the struct

Re: [Qemu-devel] [Qemu-trivial] [PATCH 1/2] nbd: Close socket on negotiation failure.

2014-05-17 Thread Michael Tokarev
13.05.2014 03:35, Hani Benhabiles wrote: > Otherwise, the nbd client may hang waiting for the server response. Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH 2/2] nbd: Miscellaneous typo fixes.

2014-05-17 Thread Michael Tokarev
Applied to -trivial, thanks! /mjt

[Qemu-devel] [PATCH] w32: Fix regression caused by new g_poll implementation

2014-05-17 Thread Stefan Weil
Commit 5a007547df76446ab891df93ebc55749716609bf tried to fix a performance degradation caused by bad handling of small timeouts in the original implementation of g_poll. Since that commit, hard disk I/O no longer works. Instead of rewriting the g_poll implementation, this patch simply copies the

Re: [Qemu-devel] [PATCH v2] Add remove_boot_device_path() function for hot-unplug device

2014-05-17 Thread Jun Li
On 05/15/2014 11:07 PM, Michael S. Tsirkin wrote: On Wed, Apr 16, 2014 at 10:20:57PM +0800, Jun Li wrote: Add remove_boot_device_path() function to remove bootindex when hot-unplug a device. This patch fixed virtio-blk/virtio-net/scsi-disk/scsi-generic device. So it has fixed bug1086603, ref: h

Re: [Qemu-devel] [PATCH v3] snapshot: fixed bdrv_get_full_backing_filename can not get correct full_backing_filename

2014-05-17 Thread Jun Li
On 05/14/2014 09:05 PM, Fam Zheng wrote: On Wed, 05/14 14:40, Stefan Hajnoczi wrote: On Sun, May 11, 2014 at 12:35:57AM +0800, Jun Li wrote: From: Jun Li This patch fixed the following bug: https://bugzilla.redhat.com/show_bug.cgi?id=1084302 . path_combine can not calculate the correct full

Re: [Qemu-devel] [PATCH v2] qcow2: Patch for shrinking qcow2 disk image

2014-05-17 Thread Jun Li
On 05/15/2014 08:36 AM, Max Reitz wrote: On 09.05.2014 17:20, Jun Li wrote: As the realization of raw shrinking, so when do qcow2 shrinking, do not *when doing check l1 entries. When resize to size1(size1 < "disk size"), the custemer *customer Sorry ~ :-) knows this will destory the da

[Qemu-devel] [PATCH] configure: Automatically select GTK+ 3.0 if GTK+ 2.0 is unavailable

2014-05-17 Thread Stefan Weil
The configure option --with-gtkabi=3.0 is still supported, but no longer needed when GTK+-2.0 is missing. When no GTK+ ABI is selected by the user, configure first tries 2.0, then 3.0. For some platforms (e.g. Windows) newer binaries of GTK+ are only available for GTK+ 3.0. Now building on these p

Re: [Qemu-devel] [PATCH 1/2] target-mips: pass CPUMIPSState to gen_mfc0/mtc0/dmfc0/dmtc0

2014-05-17 Thread Richard Henderson
On 05/16/2014 11:13 AM, Petar Jovanovic wrote: > > -static void gen_mfc0(DisasContext *ctx, TCGv arg, int reg, int sel) > +static void gen_mfc0(CPUMIPSState *env, DisasContext *ctx, > + You should not be passing around env within the translator, at all. You should be able to get everything

Re: [Qemu-devel] [PATCH 2/2] target-mips: implement UserLocal Register

2014-05-17 Thread Richard Henderson
On 05/16/2014 11:13 AM, Petar Jovanovic wrote: > +target_ulong helper_rdhwr_ul(CPUMIPSState *env) > +{ > +if ((env->hflags & MIPS_HFLAG_CP0) || > +(env->CP0_HWREna & (1 << 29))) { > +return env->CP0_UserLocal; > +} else { > +helper_raise_exception(env, EXCP_RI); > +

Re: [Qemu-devel] [PULL 0/1] virtio update

2014-05-17 Thread Michael S. Tsirkin
On Thu, May 15, 2014 at 06:35:05PM +0100, Peter Maydell wrote: > On 15 May 2014 17:33, Michael S. Tsirkin wrote: > > On Thu, May 15, 2014 at 05:32:05PM +0100, Peter Maydell wrote: > >> On 14 May 2014 04:53, Michael S. Tsirkin wrote: > >> > > >> > Resending: same as previous pull request but with

Re: [Qemu-devel] [PATCH RFC 1/8] virtio: add subsections to the migration stream

2014-05-17 Thread Michael S. Tsirkin
On Thu, May 15, 2014 at 09:04:49AM +0200, Greg Kurz wrote: > On Thu, 15 May 2014 12:16:35 +0530 > Amit Shah wrote: > > On (Thu) 15 May 2014 [09:23:51], Michael S. Tsirkin wrote: > > > On Thu, May 15, 2014 at 11:34:25AM +0530, Amit Shah wrote: > > > > On (Wed) 14 May 2014 [17:41:38], Greg Kurz wrot

[Qemu-devel] [PATCHv5 1/3] util: add qemu_iovec_is_zero

2014-05-17 Thread Peter Lieven
Signed-off-by: Peter Lieven --- include/qemu-common.h |1 + util/iov.c| 21 + 2 files changed, 22 insertions(+) diff --git a/include/qemu-common.h b/include/qemu-common.h index 3f3fd60..66ceceb 100644 --- a/include/qemu-common.h +++ b/include/qemu-common.h @

[Qemu-devel] [PATCHv5 3/3] block: optimize zero writes with bdrv_write_zeroes

2014-05-17 Thread Peter Lieven
this patch tries to optimize zero write requests by automatically using bdrv_write_zeroes if it is supported by the format. This significantly speeds up file system initialization and should speed zero write test used to test backend storage performance. I ran the following 2 tests on my internal

[Qemu-devel] [PATCHv5 2/3] blockdev: add a function to parse enum ids from strings

2014-05-17 Thread Peter Lieven
this adds a generic function to recover the enum id of a parameter given as a string. Signed-off-by: Peter Lieven --- blockdev.c | 17 + 1 file changed, 17 insertions(+) diff --git a/blockdev.c b/blockdev.c index 7810e9f..8358aa2 100644 --- a/blockdev.c +++ b/blockdev.c @@ -28

[Qemu-devel] [PATCHv5 0/3] block: optimize zero writes with bdrv_write_zeroes

2014-05-17 Thread Peter Lieven
this series tries to optimize zero write requests by automatically using bdrv_write_zeroes if it is supported by the format. More details can be found in the commit message to patch 3. Changes: v4->v5: - split patch into 3 separate patches [Kevin, Eric] - use QEMU_ALIGN_DOWN in qemu_iovec_

[Qemu-devel] [PATCH v3 00/16] Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Add QEMU_DPRINTF to substitute debug printfs and use the same format through the codebase. Marc Marí (16): include/qemu-common.h: Add QEMU_DPRINTF macro x86: Convert debug printfs to QEMU_DPRINTF s390: Convert debug printfs to QEMU_DPRINTF scsi: Convert debug printfs to QEMU_DPRINTF high

[Qemu-devel] [PATCH v3 02/16] x86: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. Signed-off-by: Marc Marí --- hw/i386/kvm/pci-assign.c | 11 ++- hw/i386/multiboot.c |7 +-- target-i386/kvm.c|9 + xen-hvm.c|9 +++

[Qemu-devel] [PATCH v3 10/16] i8257: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. As the debug printf is always put in code, some formats had to be changed to avoid warnings treated as errors at compile time. Signed-off-by: Marc Marí --- hw/dma/i8257.c | 14 --

[Qemu-devel] [PATCH v3 03/16] s390: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. Signed-off-by: Marc Marí --- hw/s390x/s390-virtio-bus.c |9 + hw/s390x/s390-virtio.c |9 + target-s390x/helper.c | 23 +++ target-s390x/kv

[Qemu-devel] [PATCH v3 01/16] include/qemu-common.h: Add QEMU_DPRINTF macro

2014-05-17 Thread Marc Marí
Create this macro to let debug macros to have the same format through the codebase and use regular ifs instead of ifdef. Signed-off-by: Marc Marí --- include/qemu-common.h |7 +++ 1 file changed, 7 insertions(+) diff --git a/include/qemu-common.h b/include/qemu-common.h index 3f3fd60..a

[Qemu-devel] [PATCH v3 07/16] spapr: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. Signed-off-by: Marc Marí Acked-by: Alexander Graf --- hw/net/spapr_llan.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/net/spapr_llan.c b/hw/net/spapr_llan.c

[Qemu-devel] [PATCH v3 12/16] sd: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. Signed-off-by: Marc Marí --- hw/sd/sd.c |8 +--- hw/sd/ssi-sd.c | 19 --- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c

[Qemu-devel] [PATCH v3 05/16] highbank: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. Remove header and __func__ in debug printfs, to avoid duplicated messages. Signed-off-by: Marc Marí --- hw/net/xgmac.c | 27 +++ 1 file changed, 15 insertions(+), 12

[Qemu-devel] [PATCH v3 04/16] scsi: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. As the debug printf is always put in code, some warnings appeared because of non-existing (old) variables, which were removed. Signed-off-by: Marc Marí --- hw/scsi/lsi53c895a.c | 22 ++

[Qemu-devel] [PATCH v3 09/16] i82374: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. As the QEMU_DPRINTF already writes the function name, remove the __func__ to avoid writing the function name two times. Signed-off-by: Marc Marí --- hw/dma/i82374.c | 31

[Qemu-devel] [PATCH v3 08/16] stellaris: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. Signed-off-by: Marc Marí --- hw/net/stellaris_enet.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/hw/net/stellaris_enet.c b/hw/net/stellaris_enet

[Qemu-devel] [PATCH v3 06/16] xilinx: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. As QEMU_DPRINTF adds a header to the message, when the message is not in a new line, printf has to be used. Signed-off-by: Marc Marí --- hw/net/cadence_gem.c | 24 1

[Qemu-devel] [PATCH v3 14/16] lan9118: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. As the debug printf is always put in code, some formats had to be changed to avoid warnings treated as errors at compile time. Signed-off-by: Marc Marí --- hw/net/lan9118.c | 29

[Qemu-devel] [PATCH v3 13/16] isa: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. As the debug printf is always put in code, some formats had to be changed to avoid warnings treated as errors at compile time.. Signed-off-by: Marc Marí --- hw/isa/vt82c686.c | 12 --

[Qemu-devel] [PATCH v3 16/16] common: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. Signed-off-by: Marc Marí --- migration-rdma.c | 31 +-- page_cache.c | 11 +++ 2 files changed, 24 insertions(+), 18 deletions(-) diff --git a/migra

[Qemu-devel] [PATCH v3 11/16] rc4030: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. Change the output of debug messages from stdout to stderr. Remove header in debug printfs, as QEMU_DPRINTF already adds it. Signed-off-by: Marc Marí --- hw/dma/rc4030.c | 29 +++

[Qemu-devel] [PATCH v3 15/16] pci-host: Convert debug printfs to QEMU_DPRINTF

2014-05-17 Thread Marc Marí
Modify debug macros to have the same format through the codebase and use regular ifs instead of ifdef. As the debug printf is always put in code, some formats had to be changed to avoid warnings treated as errors at compile time. As QEMU_DPRINTF already puts the function name as the header, __fun

[Qemu-devel] OS X compile fix

2014-05-17 Thread Peter Bartoli
At the recommendation of Mark Cave-Ayland, I'm sending this patch in to remedy a long-time Mac OS X compile issue. The offsets are a way off in this diff, but it still works. -peter --- block/raw-posix.c.orig 2012-12-03 11:37:05.0 -0800 +++ block/raw-posix.c 2012-12-03 18:24:47

Re: [Qemu-devel] [PATCH v2] hw/display/pxa2xx_lcd: Fix 16bpp+alpha and 18bpp+alpha palette formats

2014-05-17 Thread Peter Crosthwaite
On Fri, May 16, 2014 at 7:51 PM, Peter Maydell wrote: > The pxa2xx palette entry "16bpp plus transparency" format is > xxxTR000GG00B000, and "18bpp plus transparency" is > xxxTRR00GG00BB00. > > Correct errors in the code for reading these and converting > them to th

Re: [Qemu-devel] [PATCH qom-next 0/4] qom: HMP commands to replace info qtree

2014-05-17 Thread Peter Crosthwaite
On Fri, May 9, 2014 at 12:21 AM, Andreas Färber wrote: > Hello, > > The main patch of this series is an HMP command "info qom-composition", qom-composition is a mouthful. Can it be shortened? Although I suggest alternative that obsoletes it anyways further down. > which displays the machine comp

Re: [Qemu-devel] [Bug 1320360] [NEW] usb passthrough not working anymore

2014-05-17 Thread Gonglei (Arei)
Hi, From qemu-1.7 release version, the old usb-host(host-linux.c) had been removed, re-implemented by libusbx. So you should build qemu with --enable-libusb, then you can use usb pass-through capacity. BTW, Gerd, should we enable libusb by default now? Thanks. Best regards, -Gonglei > -O