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

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(+)

[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 --

[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 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 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 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

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 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

[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 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 ---

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 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/

[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

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

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

[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

[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 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 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 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 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

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

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

[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

[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] [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 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] [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 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 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 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] [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

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] [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] [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

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

[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

[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] [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 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] [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] [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] [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 ---

<    1   2   3   4