[Qemu-devel] [PATCH v2 1/2] xen-pt: fix Negative array index read

2015-02-09 Thread arei.gonglei
From: Gonglei Coverity spot: Function xen_pt_bar_offset_to_index() may returns a negative number (-1) value index, which as an index to array d->io_regions. Let's directly and simply pass index as an argument to xen_pt_bar_reg_parse(). Signed-off-by: Gonglei Acked-by: Stefano Stabellini ---

[Qemu-devel] [PATCH v2 2/2] xen-pt: fix Out-of-bounds read

2015-02-09 Thread arei.gonglei
From: Gonglei The array length of s->real_device.io_regions[] is "PCI_NUM_REGIONS - 1". Signed-off-by: Gonglei --- hw/xen/xen_pt_config_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/xen/xen_pt_config_init.c b/hw/xen/xen_pt_config_init.c index 710fe50..d99c22e 10

[Qemu-devel] [PULL 30/46] Fix name error in migration stream analyzation script

2015-02-09 Thread Michael Tokarev
From: Greg Kurz It fixes the following error: Traceback (most recent call last): File "./scripts/analyze-migration.py", line 584, in dump.read(dump_memory = args.memory) File "./scripts/analyze-migration.py", line 528, in read self.sections[section_id].read() File "./scripts/analy

[Qemu-devel] [PULL 32/46] rtl8139: g_malloc() can't fail, bury dead error handling

2015-02-09 Thread Michael Tokarev
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Gonglei Signed-off-by: Michael Tokarev --- hw/net/rtl8139.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/hw/net/rtl8139.c b/hw/net/rtl8139.c index b7b87a6..2d1be06 100644 --- a

[Qemu-devel] [PULL 28/46] util/uri: URI member path can be null, compare more carfully

2015-02-09 Thread Michael Tokarev
From: Markus Armbruster uri_resolve_relative() calls strcmp(bas->path, ref->path). However, either argument could be null! Evidence: the code checks for null after the comparison. Spotted by Coverity. I suspect this was screwed up when we stole the code from libxml2. There the conditional rea

[Qemu-devel] [PATCH v2 0/2] xen_pt: fix two Coverity defects

2015-02-09 Thread arei.gonglei
From: Gonglei v2 -> v1: - change the method of check in patch 2.(Stefano) - add ACK of Stefano in patch 1. Gonglei (2): xen-pt: fix Negative array index read xen-pt: fix Out-of-bounds read hw/xen/xen_pt_config_init.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) -- 1.7.

[Qemu-devel] [PULL 19/46] qemu-sockets: Fix buffer overflow in inet_parse()

2015-02-09 Thread Michael Tokarev
From: Kevin Wolf The size of the stack allocated host[] array didn't account for the terminating '\0' byte that sscanf() writes. Fix the array size. Signed-off-by: Kevin Wolf Reviewed-by: John Snow Signed-off-by: Michael Tokarev --- util/qemu-sockets.c | 2 +- 1 file changed, 1 insertion(+),

[Qemu-devel] [PULL 03/46] Add tracing to xenfb.

2015-02-09 Thread Michael Tokarev
From: Don Koch Signed-off-by: Don Koch Signed-off-by: Michael Tokarev --- hw/display/xenfb.c | 5 + trace-events | 4 2 files changed, 9 insertions(+) diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index 8a61e95..5e324ef 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xe

[Qemu-devel] [PULL 24/46] spapr_vio: Pair g_malloc() with g_free(), not free()

2015-02-09 Thread Michael Tokarev
From: Markus Armbruster Spotted by Coverity with preview checker ALLOC_FREE_MISMATCH enabled and my "coverity: Model g_free() isn't necessarily free()" model patch applied. Signed-off-by: Markus Armbruster Reviewed-by: Gonglei Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- hw/pp

Re: [Qemu-devel] Status IGD pass-through with QEMU/KVM

2015-02-09 Thread Jan Kiszka
On 2015-01-28 16:43, Jan Kiszka wrote: > On 2015-01-28 16:36, Alex Williamson wrote: >> On Wed, 2015-01-28 at 16:02 +0100, Jan Kiszka wrote: >>> Hi Alex, >>> >>> before getting dirty fingers in vain: what is the current status of >>> handing an IGD GPU to a KVM guest, specifically Windows? I found

Re: [Qemu-devel] [PULL 00/46] Trivial patches for 2015-02-10

2015-02-09 Thread Michael Tokarev
10.02.2015 10:14, Peter Maydell wrote: >> The following changes since commit 89db21771782fd6050335e73542064f1187c9ced: >> >> qmp: unbreak build for non-vnc configuration (2015-02-09 22:36:04 +) >> >> are available in the git repository at: >> >> git://git.corpit.ru/qemu.git tags/pull-trivia

[Qemu-devel] [PULL 17/46] aes: remove a dead return statement

2015-02-09 Thread Michael Tokarev
From: Paolo Bonzini bits is checked to be 128, 192 or 256 at the beginning of the function. Signed-off-by: Paolo Bonzini Signed-off-by: Michael Tokarev --- util/aes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/aes.c b/util/aes.c index 6058f19..3d7c4be 100644 ---

Re: [Qemu-devel] [PATCH 2/2] xen-pt: fix Out-of-bounds read

2015-02-09 Thread Gonglei
On 2015/2/10 15:00, Stefano Stabellini wrote: > On Tue, 10 Feb 2015, Gonglei wrote: >> On 2015/2/10 14:39, Stefano Stabellini wrote: >>> On Sat, 31 Jan 2015, arei.gong...@huawei.com wrote: From: Gonglei The array length of s->real_device.io_regions[] is "PCI_NUM_REGIONS - 1". A

[Qemu-devel] [PATCH v2] nbd: fix the co_queue multi-adding bug

2015-02-09 Thread Bin Wu
From: Bin Wu When we tested the VM migartion between different hosts with NBD devices, we found if we sent a cancel command after the drive_mirror was just started, a coroutine re-enter error would occur. The stack was as follow: (gdb) bt 00) 0x7fdfc744d885 in raise () from /lib64/libc.so.6

[Qemu-devel] [RFC v3 05/10] pcie_aer: expose pcie_aer_msg() interface

2015-02-09 Thread Chen Fan
For vfio device, we need to propagate the aer error to Guest OS. we use the pcie_aer_msg() to send aer error to guest. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 2 +- include/hw/pci/pcie_aer.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci/pcie_aer.c b/

[Qemu-devel] [PULL 43/46] spice: Add missing 'static' attribute

2015-02-09 Thread Michael Tokarev
From: Stefan Weil Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- spice-qemu-char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spice-qemu-char.c b/spice-qemu-char.c index 7e0d300..a4f4e57 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -158,7 +1

Re: [Qemu-devel] [PULL 00/46] Trivial patches for 2015-02-10

2015-02-09 Thread Peter Maydell
On 10 February 2015 at 06:33, Michael Tokarev wrote: > This is another pull request for trivial-patches tree. > This time it is sort of huge, consisting of 46 patches in total. > There are several patches and series which aren't applied to > -trivial but should -- I decided I'll send a pull reques

[Qemu-devel] [RFC v3 04/10] vfio: add pcie extanded capability support

2015-02-09 Thread Chen Fan
when we detect extanded capability in vfio device, then we should initialize the vfio device corresponding feature register bits. so guest OS can find it and set those bits as needed. and initialize aer capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 85 ++

[Qemu-devel] [PULL 10/46] linux-user/syscall.c: Fix typo issue for using target_vec[i].iov_len instead of target_vec[i].iov_base

2015-02-09 Thread Michael Tokarev
From: Chen Gang S It is only a typo issue, need use tswapal(target_vec[i].iov_len) for the len. Signed-off-by: Chen Gang Reviewed-by: Peter Maydell Signed-off-by: Michael Tokarev --- linux-user/syscall.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/syscall.c

[Qemu-devel] [PULL 09/46] linux-user/syscall.c: lock_iovec: unlock vec[i] in failure processing code block

2015-02-09 Thread Michael Tokarev
From: Chen Gang S When failure occurs during locking of vec[i], we also need to unlock all already locked vec[i] in failure processing code block before return. Code in unlock_user() checks vec[i].iov_base for NULL, so there's no need not check it . If error is EFAULT when "i == 0", vec[i].iov_

[Qemu-devel] [RFC v3 08/10] vfio-pci: add VFIO_FEATURE_ENABLE_AER_CAP feature

2015-02-09 Thread Chen Fan
add a new "aercap" feature in vfio device, for controlling whether expose aer capability. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index bf314a1..c21b40b 100644 --- a/hw/vfio/pci.c +++ b

[Qemu-devel] [RFC v3 09/10] vfio-pci: pass the aer error to guest

2015-02-09 Thread Chen Fan
when the vfio device encounters an uncorrectable error in host, the vfio_pci driver will signal the eventfd registered by this vfio device, the results in the qemu eventfd handler getting invoked. this patch is to pass the error to guest and have the guest driver recover from the error. Signed-of

[Qemu-devel] [PULL 18/46] vl.c: fix memory leak spotted by valgrind

2015-02-09 Thread Michael Tokarev
From: Christian Borntraeger valgrind complains about: ==42062== 16 bytes in 1 blocks are definitely lost in loss record 387 of 1,048 ==42062==at 0x402DCB2: malloc (vg_replace_malloc.c:299) ==42062==by 0x40C1BE3: g_malloc (in /usr/lib64/libglib-2.0.so.0.3800.2) ==42062==by 0x40DA133: g

[Qemu-devel] [RFC v3 10/10] pcie_aer: fix a trivial typo in PCIEAERMsg comments

2015-02-09 Thread Chen Fan
Signed-off-by: Chen Fan --- include/hw/pci/pcie_aer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/pci/pcie_aer.h b/include/hw/pci/pcie_aer.h index 15ede17..227427e 100644 --- a/include/hw/pci/pcie_aer.h +++ b/include/hw/pci/pcie_aer.h @@ -51,7 +51,7 @@ struct PC

[Qemu-devel] [RFC v3 07/10] vfio_pci: change vfio device features bit macro to enum definition

2015-02-09 Thread Chen Fan
Introduce an independent enum structure to define the features bitmap, it would be good for adding new features definition. Signed-off-by: Chen Fan --- hw/vfio/pci.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 75c932b..bf314a1 1

[Qemu-devel] [RFC v3 06/10] piix: disable all vfio device aercap property

2015-02-09 Thread Chen Fan
because at i440FX platform, all pcie device don't support aer capability, so for all vfio device, we don't need to expose the aer capability. Signed-off-by: Chen Fan --- hw/i386/pc_piix.c | 16 1 file changed, 16 insertions(+) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c

[Qemu-devel] [PULL 25/46] usb: Pair g_malloc() with g_free(), not free()

2015-02-09 Thread Michael Tokarev
From: Markus Armbruster Spotted by Coverity with preview checker ALLOC_FREE_MISMATCH enabled and my "coverity: Model g_free() isn't necessarily free()" model patch applied. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- hw/usb/desc-msos.c | 2 +-

[Qemu-devel] [RFC v3 03/10] aer: introduce pcie_aer_setup to setup aer related bits

2015-02-09 Thread Chen Fan
because function pcie_aer_init() is for adding a new aer capability, but for vfio device, we only need to capture the aer capability from vfio device configuration space, so here we introduce pcie_aer_setup() to init all raw devices. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 63 +++

[Qemu-devel] [RFC v3 02/10] aer: fix a wrong init PCI_ERR_COR_STATUS w1cmask type register

2015-02-09 Thread Chen Fan
>From pcie spec, the bits attributes are RW1CS in Correctable Error Status Register, so this patch fix a wrong definition for PCI_ERR_COR_STATUS register with w1cmask type. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/pci/pc

[Qemu-devel] [RFC v3 00/10] pass aer error to guest for vfio device

2015-02-09 Thread Chen Fan
For now, for vfio pci passthough devices when qemu receives an error from host aer report, there just terminate the guest, but usually user want to know what error occurred but stop the guest, so this patches add aer capability support for vfio device, and pass the error to guest, and have guest dr

[Qemu-devel] [RFC v3 01/10] pcie_aer: fix typos in pcie_aer_inject_error comment

2015-02-09 Thread Chen Fan
Refer to "PCI Express Base Spec3.0", this comments can't fit the description in spec, so we should fix them. Signed-off-by: Chen Fan --- hw/pci/pcie_aer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/pci/pcie_aer.c b/hw/pci/pcie_aer.c index 1f4be16..7ca077a 100644

Re: [Qemu-devel] [PATCH 2/2] xen-pt: fix Out-of-bounds read

2015-02-09 Thread Stefano Stabellini
On Tue, 10 Feb 2015, Gonglei wrote: > On 2015/2/10 14:39, Stefano Stabellini wrote: > > On Sat, 31 Jan 2015, arei.gong...@huawei.com wrote: > >> From: Gonglei > >> > >> The array length of s->real_device.io_regions[] is > >> "PCI_NUM_REGIONS - 1". Add a check, just make Coverity happy. > >> > >> S

Re: [Qemu-devel] [PATCH v1 2/2] vhost-user: add reply for set_mem_table

2015-02-09 Thread Linhaifeng
On 2015/2/10 14:35, Gonglei wrote: > On 2015/2/10 13:48, linhaifeng wrote: >> From: Linhaifeng >> >> If u64 is not 0 we should return -1 to tell qemu not going on. >> >> Remove some unnecessary '\n' in error_report. > Hi, haifeng: > > You'd better split a single patch to do this work, > and usi

[Qemu-devel] [PULL 42/46] serial: Fix warnings caused by missing 'static' attribute

2015-02-09 Thread Michael Tokarev
From: Stefan Weil Warnings from the Sparse static analysis tool: hw/char/serial.c:630:26: warning: symbol 'vmstate_serial_thr_ipending' was not declared. Should it be static? hw/char/serial.c:646:26: warning: symbol 'vmstate_serial_tsr' was not declared. Should it be static? hw/char/serial.c:6

[Qemu-devel] [PULL 11/46] linux-user/main.c: Use TARGET_SIG* instead of SIG*

2015-02-09 Thread Michael Tokarev
From: Chen Gang S In main.c, all SIG* should be TARGET_SIG*, since the relevant functions (queue_signal() and gdb_handlesig()) expect TARGET_SIG*. The corresponding vi command is "1,$ s/\ Reviewed-by: Peter Maydell Signed-off-by: Michael Tokarev --- linux-user/main.c | 64

[Qemu-devel] [PULL 29/46] QJSON: fix typo in author's email address

2015-02-09 Thread Michael Tokarev
From: Greg Kurz Signed-off-by: Greg Kurz Signed-off-by: Michael Tokarev --- qjson.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qjson.c b/qjson.c index b24..0cda269 100644 --- a/qjson.c +++ b/qjson.c @@ -4,7 +4,7 @@ * Copyright Alexander Graf * * Authors: - *

[Qemu-devel] [PULL 38/46] disas/sh4: Fix warning caused by missing 'static' attribute

2015-02-09 Thread Michael Tokarev
From: Stefan Weil Warning from the Sparse static analysis tool: disas/sh4.c:335:22: warning: symbol 'sh_table' was not declared. Should it be static? Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- disas/sh4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[Qemu-devel] [PULL 26/46] util/uri: uri_new() can't fail, drop dead error handling

2015-02-09 Thread Michael Tokarev
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Michael Tokarev --- util/uri.c | 36 +++- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/util/uri.c b/util/uri.c index 918d235..aa39694 100644 --- a/util/uri.c +++ b/util/ur

[Qemu-devel] [PULL 45/46] vga: Fix warning caused by missing 'static' attribute

2015-02-09 Thread Michael Tokarev
From: Stefan Weil Warning from the Sparse static analysis tool: hw/display/vga.c:2012:26: warning: symbol 'vmstate_vga_endian' was not declared. Should it be static? Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- hw/display/vga.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

Re: [Qemu-devel] [PATCH] vfio: Fix debug message compile error

2015-02-09 Thread Eric Auger
Hi Alexey, Thanks for pointing that issue. Best Regards Eric On 02/10/2015 07:14 AM, Alexey Kardashevskiy wrote: > This fixes a compiler error which occurs if DEBUG_VFIO is defined. > > Signed-off-by: Alexey Kardashevskiy > --- > hw/vfio/pci.c | 2 +- > 1 file changed, 1 insertion(+), 1 dele

Re: [Qemu-devel] [PATCH v1 1/2] arm: Add the cortex-a9 CPU to the a9mpcore device

2015-02-09 Thread Peter Crosthwaite
On Wed, Jan 21, 2015 at 5:06 PM, Alistair Francis wrote: > This patch adds the Cortex-A9 ARM CPU to the A9MPCore. > > The CPU is only created if the num-cpu property is set. > > This patch relies on Stefan Hajnoczi's v3 'virtio-blk: > use alias properties in transport devices' patch. This is > use

Re: [Qemu-devel] [PATCH 2/2] xen-pt: fix Out-of-bounds read

2015-02-09 Thread Gonglei
On 2015/2/10 14:39, Stefano Stabellini wrote: > On Sat, 31 Jan 2015, arei.gong...@huawei.com wrote: >> From: Gonglei >> >> The array length of s->real_device.io_regions[] is >> "PCI_NUM_REGIONS - 1". Add a check, just make Coverity happy. >> >> Signed-off-by: Gonglei >> --- >> hw/xen/xen_pt_conf

[Qemu-devel] [PULL 00/46] Trivial patches for 2015-02-10

2015-02-09 Thread Michael Tokarev
This is another pull request for trivial-patches tree. This time it is sort of huge, consisting of 46 patches in total. There are several patches and series which aren't applied to -trivial but should -- I decided I'll send a pull request first and apply the leftovers later, because there are impor

[Qemu-devel] [PULL 06/46] Convert some debugging printfs to trace calls in pcnet.c.

2015-02-09 Thread Michael Tokarev
From: Don Koch Signed-off-by: Don Koch Signed-off-by: Michael Tokarev --- hw/net/pcnet.c | 28 trace-events | 8 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c index 8486b80..7778b9a 100644 --- a/hw/net/

Re: [Qemu-devel] [PATCH v1 2/2] zynq: Update Zynq to init the CPU in the a9mpcore device

2015-02-09 Thread Peter Crosthwaite
On Wed, Jan 21, 2015 at 5:06 PM, Alistair Francis wrote: > This patch removes the initialisation of the ARM Cortex-A9 > in Zynq and instead allows the a9mpcore device to init the > CPU. This also updates components that rely on the CPU > and GIC, as they are now initialised in a slightly different

[Qemu-devel] [PULL 02/46] fw_cfg: fix typos in comments: patch -> path

2015-02-09 Thread Michael Tokarev
From: Gonglei Signed-off-by: Gonglei Signed-off-by: Michael Tokarev --- hw/core/fw-path-provider.c | 2 +- hw/ppc/spapr.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/core/fw-path-provider.c b/hw/core/fw-path-provider.c index 1290c3e..7442d32 100644 ---

[Qemu-devel] [PULL 01/46] target-mips: Clean up switch fall through after commit fecd264

2015-02-09 Thread Michael Tokarev
From: Markus Armbruster Commit fecd264 added a number of fall-throughs, but neglected to properly document them as intentional. Commit d922445 cleaned that up for many, but not all cases. Take care of the remaining ones. Spotted by Coverity. Signed-off-by: Markus Armbruster Signed-off-by: Mi

[Qemu-devel] [PULL 07/46] vl: Fix bogus error message for implied mon ID clashing

2015-02-09 Thread Michael Tokarev
From: Markus Armbruster monitor_parse() desugars --monitor, --qmp and -qmp-pretty to --mon. The ID it picks can clash with a user-specified ID. When it happens, the error message is misleading. Reproducer: $ qemu --mon id=compat_monitor0 --monitor stdio Message before the patch: dupl

Re: [Qemu-devel] [PATCH 1/2] xen-pt: fix Negative array index read

2015-02-09 Thread Stefano Stabellini
On Sat, 31 Jan 2015, arei.gong...@huawei.com wrote: > From: Gonglei > > Coverity spot: > Function xen_pt_bar_offset_to_index() may returns a negative > number (-1) value index, which as an index to array d->io_regions. > > Let's directly and simply pass index as an argument to > xen_pt_bar_reg_p

[Qemu-devel] [PULL 34/46] rdma: g_malloc0() can't fail, bury dead error handling

2015-02-09 Thread Michael Tokarev
From: Markus Armbruster Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Gonglei Signed-off-by: Michael Tokarev --- migration/rdma.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index fc351ea..29285e6 100644 --- a/migration/rd

[Qemu-devel] [PULL 37/46] disas/cris: Fix warning caused by missing 'static' attribute

2015-02-09 Thread Michael Tokarev
From: Stefan Weil Warning from the Sparse static analysis tool: disas/cris.c:1218:26: warning: symbol 'cris_cond15s' was not declared. Should it be static? Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- disas/cris.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Qemu-devel] [PULL 12/46] linux-user/syscall.c: do_ioctl_dm: Need to call unlock_user() before going to failure return in default case

2015-02-09 Thread Michael Tokarev
From: Chen Gang S In abi_long do_ioctl_dm(), after lock_user() call, the code does not call unlock_user() before going to failure return in default case. Signed-off-by: Chen Gang Reviewed-by: Peter Maydell Signed-off-by: Michael Tokarev --- linux-user/syscall.c | 2 ++ 1 file changed, 2 inse

[Qemu-devel] [PULL 36/46] translate-all: Use g_try_malloc() for dynamic translator buffer

2015-02-09 Thread Michael Tokarev
From: Markus Armbruster The USE_MMAP code can fail, and the caller handles the failure already. Let the !USE_MMAP code fail as well, for consistency. Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Reviewed-by: Gonglei Signed-off-by: Michael Tokarev --- translate-all.c | 2 +- 1 f

[Qemu-devel] [PULL 41/46] moxie: Fix warning caused by missing include statement

2015-02-09 Thread Michael Tokarev
From: Stefan Weil Warning from the Sparse static analysis tool: target-moxie/machine.c:4:26: warning: symbol 'vmstate_moxie_cpu' was not declared. Should it be static? machine.h includes the missing declaration. Cc: Anthony Green Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --

Re: [Qemu-devel] [PATCH 2/2] xen-pt: fix Out-of-bounds read

2015-02-09 Thread Stefano Stabellini
On Sat, 31 Jan 2015, arei.gong...@huawei.com wrote: > From: Gonglei > > The array length of s->real_device.io_regions[] is > "PCI_NUM_REGIONS - 1". Add a check, just make Coverity happy. > > Signed-off-by: Gonglei > --- > hw/xen/xen_pt_config_init.c | 5 + > 1 file changed, 5 insertions(+)

Re: [Qemu-devel] [PATCH] fix the co_queue multi-adding bug

2015-02-09 Thread Bin Wu
On 2015/2/9 17:23, Paolo Bonzini wrote: > > > On 07/02/2015 10:51, w00214312 wrote: >> From: Bin Wu >> >> When we test the drive_mirror between different hosts by ndb devices, >> we find that, during the cancel phase the qemu process crashes sometimes. >> By checking the crash core file, we fin

Re: [Qemu-devel] [PATCH v1 2/2] vhost-user: add reply for set_mem_table

2015-02-09 Thread Gonglei
On 2015/2/10 13:48, linhaifeng wrote: > From: Linhaifeng > > If u64 is not 0 we should return -1 to tell qemu not going on. > > Remove some unnecessary '\n' in error_report. Hi, haifeng: You'd better split a single patch to do this work, and using '--cover' argument for patch series when git fo

[Qemu-devel] [PULL 04/46] Add trace to ps2.c.

2015-02-09 Thread Michael Tokarev
From: Don Koch Signed-off-by: Don Koch Signed-off-by: Michael Tokarev --- hw/input/ps2.c | 16 trace-events | 17 + 2 files changed, 33 insertions(+) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index a466e25..4baeea2 100644 --- a/hw/input/ps2.c +++ b/hw/inp

[Qemu-devel] [PULL 08/46] virtfs-proxy-helper: Fix possible socket leak.

2015-02-09 Thread Michael Tokarev
From: Gonglei Signed-off-by: Gonglei Reviewed-by: Markus Armbruster Signed-off-by: Michael Tokarev --- fsdev/virtfs-proxy-helper.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index cd291d3..c1da2d7

Re: [Qemu-devel] [PATCH v10 1/5] stm32f2xx_timer: Add the stm32f2xx Timer

2015-02-09 Thread Peter Crosthwaite
On Thu, Jan 29, 2015 at 4:31 AM, Alistair Francis wrote: > This patch adds the stm32f2xx timers: TIM2, TIM3, TIM4 and TIM5 > to QEMU. > > Signed-off-by: Alistair Francis > Signed-off-by: Peter Crosthwaite > --- > V10: > - Correct the units based on a patch by Peter C > V9: > - Convert tick_off

[Qemu-devel] [PATCH] vfio: Fix debug message compile error

2015-02-09 Thread Alexey Kardashevskiy
This fixes a compiler error which occurs if DEBUG_VFIO is defined. Signed-off-by: Alexey Kardashevskiy --- hw/vfio/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 29caabc..cfc087a 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -517

Re: [Qemu-devel] [PATCH v10 4/5] stm32f205: Add the stm32f205 SoC

2015-02-09 Thread Peter Crosthwaite
On Thu, Jan 29, 2015 at 4:31 AM, Alistair Francis wrote: > This patch adds the stm32f205 SoC. This will be used by the > Netduino 2 to create a machine. > > Signed-off-by: Alistair Francis > --- > V6: > - Correct the number of USART/UART devices > - Use macros to define how many devices are ini

Re: [Qemu-devel] [PATCH v4 0/2] Reworked Zynq GPIO model

2015-02-09 Thread Peter Crosthwaite
On Sun, Jan 25, 2015 at 11:51 AM, Colin Leitner wrote: > Hello everyone, > > this is the fourth version of the Zynq GPIO model patch. It includes > > * removal of unneeded memset in zynq_gpio_realize > * some minor code cleanup > * fixes for all remaining checkpatch warnings (lines too long) >

Re: [Qemu-devel] [PATCH v10 5/5] netduino2: Add the Netduino 2 Machine

2015-02-09 Thread Peter Crosthwaite
On Thu, Jan 29, 2015 at 4:31 AM, Alistair Francis wrote: > This patch adds the Netduino 2 Machine. > > This is a Cortex-M3 based machine. Information can be found at: > http://www.netduino.com/netduino2/specs.htm > > Signed-off-by: Alistair Francis Reviewed-by: Peter Crosthwaite > --- > > hw/

[Qemu-devel] [PATCH v1 1/2] vhost-user: support SET_MEM_TABLE waite the result of mmap

2015-02-09 Thread linhaifeng
From: Linhaifeng Slave should reply to master and set u64 to 0 if mmap all regions success otherwise set u64 to 1. Signed-off-by: Linhaifeng --- docs/specs/vhost-user.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 650bb18..c9

Re: [Qemu-devel] [PATCH] win64: perform correct setjmp calls

2015-02-09 Thread Pavel Dovgaluk
> From: Stefan Weil [mailto:s...@weilnetz.de] > Am 09.02.2015 um 09:07 schrieb Pavel Dovgaluk: > >> From: Stefan Weil [mailto:s...@weilnetz.de] > >> Am 09.02.2015 um 08:55 schrieb Pavel Dovgalyuk: > >>> On w64, setjmp is implemented by _setjmp which needs a second parameter. > >>> This parameter sh

Re: [Qemu-devel] [PATCH v10 2/5] stm32f2xx_USART: Add the stm32f2xx USART Controller

2015-02-09 Thread Peter Crosthwaite
On Thu, Jan 29, 2015 at 4:31 AM, Alistair Francis wrote: > This patch adds the stm32f2xx USART controller > (UART also uses the same controller). > > Signed-off-by: Alistair Francis Reviewed-by: Peter Crosthwaite > --- > V8: > - Clear IRQ on reset > - Lower IRQ on data read/status clear > -

[Qemu-devel] [PATCH v1 2/2] vhost-user: add reply for set_mem_table

2015-02-09 Thread linhaifeng
From: Linhaifeng If u64 is not 0 we should return -1 to tell qemu not going on. Remove some unnecessary '\n' in error_report. Signed-off-by: Linhaifeng --- hw/virtio/vhost-user.c | 33 ++--- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/hw/virtio/

Re: [Qemu-devel] [PATCH 2/2] vhost-user: add reply for set_mem_table

2015-02-09 Thread Linhaifeng
On 2015/2/10 11:57, Gonglei wrote: > On 2015/2/10 11:24, linhaifeng wrote: >> From: Linhaifeng >> >> If u64 is not 0 we should return -1 to tell qemu not going on. >> >> Signed-off-by: Linhaifeng >> --- >> hw/virtio/vhost-user.c | 13 - >> 1 file changed, 12 insertions(+), 1 deleti

[Qemu-devel] [PATCH v3] qemu-coroutine: segfault when restarting co_queue

2015-02-09 Thread Bin Wu
From: Bin Wu We tested VMs migration with their disk images by drive_mirror. With migration, two VMs copyed large files between each other. During the test, a segfault occured. The stack was as follow: 00) 0x7fa5a0c63fc5 in qemu_co_queue_run_restart (co=0x7fa5a1798648) at qemu-coroutine-loc

Re: [Qemu-devel] [PATCH v2] qemu-coroutine: segfault when restarting co_queue

2015-02-09 Thread Wen Congyang
On 02/10/2015 11:48 AM, Bin Wu wrote: > On 2015/2/10 11:16, Wen Congyang wrote: >> On 02/09/2015 10:48 PM, Stefan Hajnoczi wrote: >>> On Mon, Feb 09, 2015 at 02:50:39PM +0800, Bin Wu wrote: From: Bin Wu We tested VMs migration with their disk images by drive_mirror. With migrat

[Qemu-devel] [PATCH 0/2] ppc: Automatically set vga framebuffer endianness based on guest

2015-02-09 Thread David Gibson
This is a reworked version of BenH's patch to set VGA framebuffer endianess based on the endianness of the guest (as determined by the H_SET_MODE hypercall). I've split the patch into two parts the first adding the object property to the VGA device allowing control of the endianness, and the secon

[Qemu-devel] [PATCH 2/2] pseries: Switch VGA endian on H_SET_MODE

2015-02-09 Thread David Gibson
When the guest switches the interrupt endian mode, which essentially means a global machine endian switch, we want to change the VGA framebuffer endian mode as well in order to be backward compatible with existing guests who don't know about the new endian control register. Signed-off-by: Benjamin

[Qemu-devel] [PATCH 1/2] vga: Expose framebuffer byteorder as a QOM property

2015-02-09 Thread David Gibson
The VGA device model now supports having the framebuffer in either endian, and can be switched between these by the guest via a register in the qext region. However, in some cases (e.g. LE OS on the pseries machine) we have existing guest that don't know about the endian switch register, but other

Re: [Qemu-devel] [PATCH 2/2] vhost-user: add reply for set_mem_table

2015-02-09 Thread Gonglei
On 2015/2/10 11:24, linhaifeng wrote: > From: Linhaifeng > > If u64 is not 0 we should return -1 to tell qemu not going on. > > Signed-off-by: Linhaifeng > --- > hw/virtio/vhost-user.c | 13 - > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/hw/virtio/vhost-user.

Re: [Qemu-devel] [PATCH v2] qemu-coroutine: segfault when restarting co_queue

2015-02-09 Thread Bin Wu
On 2015/2/10 11:16, Wen Congyang wrote: > On 02/09/2015 10:48 PM, Stefan Hajnoczi wrote: >> On Mon, Feb 09, 2015 at 02:50:39PM +0800, Bin Wu wrote: >>> From: Bin Wu >>> >>> We tested VMs migration with their disk images by drive_mirror. With >>> migration, two VMs copyed large files between each o

[Qemu-devel] [PATCH 1/2] vhost-user: support SET_MEM_TABLE waite the result of mmap

2015-02-09 Thread linhaifeng
From: Linhaifeng Slave should reply to master and set u64 to 0 if mmap all regions success otherwise set u64 to 1. Signed-off-by: Linhaifeng --- docs/specs/vhost-user.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/specs/vhost-user.txt b/docs/specs/vhost-user.txt index 650bb18..c9

[Qemu-devel] [PATCH 2/2] vhost-user: add reply for set_mem_table

2015-02-09 Thread linhaifeng
From: Linhaifeng If u64 is not 0 we should return -1 to tell qemu not going on. Signed-off-by: Linhaifeng --- hw/virtio/vhost-user.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/hw/virtio/vhost-user.c b/hw/virtio/vhost-user.c index aefe0bb..a68ce36 100644 -

Re: [Qemu-devel] [PATCH v4] sheepdog: selectable object size support

2015-02-09 Thread Liu Yuan
On Tue, Feb 10, 2015 at 11:10:51AM +0800, Liu Yuan wrote: > On Tue, Jan 27, 2015 at 05:35:27PM +0900, Teruaki Ishizaki wrote: > > Previously, qemu block driver of sheepdog used hard-coded VDI object size. > > This patch enables users to handle "block_size_shift" value for > > calculating VDI object

Re: [Qemu-devel] [PATCH v2] qemu-coroutine: segfault when restarting co_queue

2015-02-09 Thread Wen Congyang
On 02/09/2015 10:48 PM, Stefan Hajnoczi wrote: > On Mon, Feb 09, 2015 at 02:50:39PM +0800, Bin Wu wrote: >> From: Bin Wu >> >> We tested VMs migration with their disk images by drive_mirror. With >> migration, two VMs copyed large files between each other. During the >> test, a segfault occured. T

Re: [Qemu-devel] [PATCH v4] sheepdog: selectable object size support

2015-02-09 Thread Liu Yuan
On Tue, Jan 27, 2015 at 05:35:27PM +0900, Teruaki Ishizaki wrote: > Previously, qemu block driver of sheepdog used hard-coded VDI object size. > This patch enables users to handle "block_size_shift" value for > calculating VDI object size. > > When you start qemu, you don't need to specify additio

[Qemu-devel] [PATCH v12 16/17] blkdebug: fix "once" rule

2015-02-09 Thread John Snow
Background: The blkdebug scripts are currently engineered so that when a debug event occurs, a prefilter browses a master list of parsed rules for a certain event and adds them to an "active list" of rules to be used for the forthcoming action, provided the events and state numbers match. Then

[Qemu-devel] [PATCH v12 14/17] iotests: add simple incremental backup case

2015-02-09 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/112| 120 +- tests/qemu-iotests/112.out| 4 +- tests/qemu-iotests/iotests.py | 18 --- 3 files changed, 133 insertions(+), 9 deletions(-) diff --git a/tests/qemu-iotests/112 b/tests/qemu-io

[Qemu-devel] [PATCH v12 08/17] qmp: add block-dirty-bitmap-clear

2015-02-09 Thread John Snow
Add bdrv_clear_dirty_bitmap and a matching QMP command, qmp_block_dirty_bitmap_clear that enables a user to reset the bitmap attached to a drive. This allows us to reset a bitmap in the event of a full drive backup. Signed-off-by: John Snow --- block.c | 7 +++ blockdev.c

[Qemu-devel] [PATCH v12 17/17] iotests: add incremental backup failure recovery test

2015-02-09 Thread John Snow
To test the failure case, we modify iotests.py to allow us to specify that we'd like to allow failures when we wait for block job events. Signed-off-by: John Snow --- tests/qemu-iotests/112| 55 ++- tests/qemu-iotests/112.out| 4 ++-- tests/qe

[Qemu-devel] [PATCH v12 12/17] block: Ensure consistent bitmap function prototypes

2015-02-09 Thread John Snow
We often don't need the BlockDriverState for functions that operate on bitmaps. Remove it. Signed-off-by: John Snow --- block.c | 13 ++--- block/backup.c| 2 +- block/mirror.c| 23 ++- blockdev.c| 2 +- include/block/block.

[Qemu-devel] [PATCH v12 13/17] iotests: add invalid input incremental backup tests

2015-02-09 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/112 | 89 ++ tests/qemu-iotests/112.out | 5 +++ tests/qemu-iotests/group | 1 + 3 files changed, 95 insertions(+) create mode 100644 tests/qemu-iotests/112 create mode 100644 tests/qemu-iotests/

[Qemu-devel] [PATCH v12 05/17] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable

2015-02-09 Thread John Snow
This allows to put the dirty bitmap into a disabled state where it is read only. A disabled bitmap will ignore any attempts to set or reset any of its bits, but can otherwise be renamed, deleted, or re-enabled. It will be used before backup or writing to persistent file. Signed-off-by: Fam Zheng

[Qemu-devel] [PATCH v12 15/17] iotests: add transactional incremental backup test

2015-02-09 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/112 | 45 + tests/qemu-iotests/112.out | 4 ++-- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/112 b/tests/qemu-iotests/112 index 31431ad..7d1a6ec 100644 --- a/tes

[Qemu-devel] [PATCH v12 10/17] qmp: Add dirty bitmap status fields in query-block

2015-02-09 Thread John Snow
Adds the "disabled" and "frozen" status booleans. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c | 2 ++ qapi/block-core.json | 7 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index ad33d96..3c0989c 100644 --- a/block.c +++

[Qemu-devel] [PATCH v12 11/17] block: add BdrvDirtyBitmap documentation

2015-02-09 Thread John Snow
Signed-off-by: John Snow --- block.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index 3c0989c..e065694 100644 --- a/block.c +++ b/block.c @@ -60,11 +60,11 @@ * or enabled. A frozen bitmap can only abdicate() or reclaim(). */ struct Bd

[Qemu-devel] [PATCH v12 04/17] hbitmap: add hbitmap_merge

2015-02-09 Thread John Snow
We add a bitmap merge operation to assist in error cases where we wish to combine two bitmaps together. This is algorithmically O(bits) provided HBITMAP_LEVELS remains constant. For a full bitmap on a 64bit machine: sum(bits/64^k, k, 0, HBITMAP_LEVELS) ~= 1.01587 * bits We may be able to improve

[Qemu-devel] [PATCH v12 07/17] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-02-09 Thread John Snow
For "dirty-bitmap" sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean ones), just as allocation conditions of "top" sync mode. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c

[Qemu-devel] [PATCH v12 03/17] block: Introduce bdrv_dirty_bitmap_granularity()

2015-02-09 Thread John Snow
This returns the granularity (in bytes) of dirty bitmap, which matches the QMP interface and the existing query interface. Small adjustments are made to ensure that granularity-- in bytes-- is handled consistently as a uint64_t throughout the code. Signed-off-by: John Snow --- block.c

[Qemu-devel] [PATCH v12 02/17] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-02-09 Thread John Snow
The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same device, but different devices can have bitmaps with the same names. The granularity is an optional field. If it is not specified, we will choose a default granula

[Qemu-devel] [PATCH v12 09/17] qapi: Add transaction support to block-dirty-bitmap operations

2015-02-09 Thread John Snow
This adds four qmp commands to transactions. Users can stop a dirty bitmap, start backup of it, and start another dirty bitmap atomically, so that the dirty bitmap is tracked incrementally and we don't miss any write. For starting a new incremental backup chain, users can also chain together a bi

[Qemu-devel] [PATCH v12 06/17] block: Add bitmap successors

2015-02-09 Thread John Snow
A bitmap successor is an anonymous BdrvDirtyBitmap that is intended to be created just prior to a sensitive operation (e.g. Incremental Backup) that can either succeed or fail, but during the course of which we still want a bitmap tracking writes. On creating a successor, we "freeze" the parent bi

[Qemu-devel] [PATCH v12 01/17] qapi: Add optional field "name" to block dirty bitmap

2015-02-09 Thread John Snow
From: Fam Zheng This field will be set for user created dirty bitmap. Also pass in an error pointer to bdrv_create_dirty_bitmap, so when a name is already taken on this BDS, it can report an error message. This is not global check, two BDSes can have dirty bitmap with a common name. Implemented

[Qemu-devel] [PATCH v12 00/17] block: incremental backup series

2015-02-09 Thread John Snow
Welcome to the "incremental backup" newsletter, where we discuss exciting developments in non-redundant backup technology. This patchset enables the in-memory part of the incremental backup feature. There are two series on the mailing list now by Vladimir Sementsov-Ogievskiy that enable the migrat

Re: [Qemu-devel] [PATCH] qemu-coroutine-lock: fix co_queue multi-adding bug

2015-02-09 Thread Bin Wu
On 2015/2/9 18:12, Kevin Wolf wrote: > Am 09.02.2015 um 10:36 hat Bin Wu geschrieben: >> On 2015/2/9 16:12, Fam Zheng wrote: >>> On Sat, 02/07 17:51, w00214312 wrote: From: Bin Wu When a coroutine holds a lock, other coroutines who want to get the lock must wait on a co_queue b

  1   2   3   4   >