[PULL 5/5] target/arm: Move computation of index in handle_simd_dupe

2020-03-23 Thread Peter Maydell
From: Richard Henderson Coverity reports a BAD_SHIFT with ctz32(imm5), with imm5 == 0. This is an invalid encoding, but we diagnose that just below by rejecting size > 3. Avoid the warning by sinking the computation of index below the check. Reported-by: Coverity (CID 1421965) Signed-off-by: Ri

Re: [PATCH] target/mips: Fix loongson multimedia condition instructions

2020-03-23 Thread Richard Henderson
On 3/20/20 9:56 PM, Jiaxun Yang wrote: > case OPC_SLE_CP2: > -/* > - * ??? Document is unclear: Set FCC[CC]. Does that mean the > - * FD field is the CC field? > - */ > +cond = TCG_COND_LE; > +do_cc_cond: > +{ > +int cc = (ctx->o

Re: [PATCH v11 00/16] s390x: Protected Virtualization support

2020-03-23 Thread Cornelia Huck
On Thu, 19 Mar 2020 09:19:05 -0400 Janosch Frank wrote: > Most of the QEMU changes for PV are related to the new IPL type with > subcodes 8 - 10 and the execution of the necessary Ultravisor calls to > IPL secure guests. Note that we can only boot into secure mode from > normal mode, i.e. stfle 1

Re: [PATCH] hw/ide/sii3112: Use qdev gpio rather than qemu_allocate_irqs()

2020-03-23 Thread Peter Maydell
On Mon, 23 Mar 2020 at 17:04, BALATON Zoltan wrote: > > On Mon, 23 Mar 2020, Peter Maydell wrote: > > Coverity points out (CID 1421984) that we are leaking the > > memory returned by qemu_allocate_irqs(). We can avoid this > > leak by switching to using qdev_init_gpio_in(); the base > > class fina

Xen guest broken following "use memdev for RAM" patch

2020-03-23 Thread Anthony PERARD
Hi, Since bd457782b3b0 ("x86/pc: use memdev for RAM") it isn't possible to start Xen guest anymore. The error from qemu: qemu-system-i386: xen: failed to populate ram at 0 that comes from xen_ram_alloc() in hw/i386/xen/xen-hvm.c xen_ram_alloc() is used to populate ram for PCI rom devices for

Re: aio-context question

2020-03-23 Thread Kevin Wolf
Am 19.03.2020 um 09:13 hat Dietmar Maurer geschrieben: > I just saw commit 30dd65f307b647eef8156c4a33bd007823ef85cb, and noticed that > a similar pattern in drive_backup_prepare() and blockdev_backup_prepare(). > > The calls to bdrv_try_set_aio_context() seems useless, because we already do > tha

Re: qemu-system-aarch64 windows binary run Arm64 defconfig kernel not working

2020-03-23 Thread Peter Maydell
On Mon, 23 Mar 2020 at 16:16, yoma sophian wrote: > > hi Peter: > > Is it possible for you to try with a newer version of QEMU? That one > > is a release candidate snapshot from before a release that we made > > a year ago. > With below qemu version, 4.2.0, the latest on the qemu windows download

Re: [PATCH] hw/ide/sii3112: Use qdev gpio rather than qemu_allocate_irqs()

2020-03-23 Thread BALATON Zoltan
On Mon, 23 Mar 2020, Peter Maydell wrote: Coverity points out (CID 1421984) that we are leaking the memory returned by qemu_allocate_irqs(). We can avoid this leak by switching to using qdev_init_gpio_in(); the base class finalize will free the irqs that this allocates under the hood. Signed-off

Re: [PATCH v41 01/21] target/avr: Add outward facing interfaces and core CPU logic

2020-03-23 Thread Michael Rolnik
Hi Philippe. It's been a while. let me think about it and get back to you. what is your concern ? Regards, Michael Rolnik On Mon, Mar 23, 2020 at 5:55 PM Philippe Mathieu-Daudé wrote: > Hi Michael, > > On 1/18/20 8:13 PM, Michael Rolnik wrote: > > This includes: > > - CPU data structures > > -

Re: [PATCH v3] block/iscsi:use the flags in iscsi_open() prevent Clang warning

2020-03-23 Thread Kevin Wolf
Am 11.03.2020 um 04:29 hat Chen Qun geschrieben: > Clang static code analyzer show warning: > block/iscsi.c:1920:9: warning: Value stored to 'flags' is never read > flags &= ~BDRV_O_RDWR; > ^ > > In iscsi_allocmap_init() only checks BDRV_O_NOCACHE, which > is

[RFC] hw/usb/xen-usb.c: Pass struct usbback_req* to usbback_packet_complete()

2020-03-23 Thread Peter Maydell
The function usbback_packet_complete() currently takes a USBPacket*, which must be a pointer to the packet field within a struct usbback_req; the function uses container_of() to get the struct usbback_req* given the USBPacket*. This is unnecessarily confusing (and in particular it confuses the Cov

Re: [PATCH v1] mips/mips_malta: Allow more than 2G RAM

2020-03-23 Thread Philippe Mathieu-Daudé
On 3/23/20 5:35 PM, Aurelien Jarno wrote: Hi, Sorry for the delay, I just want to give some more details about the Debian. On 2020-03-14 10:09, Philippe Mathieu-Daudé wrote: IIUC today all distributions supporting MIPS ports are building their MIPS packages on QEMU instances because it is fast

Re: [PATCH v1] mips/mips_malta: Allow more than 2G RAM

2020-03-23 Thread Aurelien Jarno
Hi, Sorry for the delay, I just want to give some more details about the Debian. On 2020-03-14 10:09, Philippe Mathieu-Daudé wrote: > IIUC today all distributions supporting MIPS ports are building their MIPS > packages on QEMU instances because it is faster than the native MIPS > hardware they h

Re: [PATCH v1 02/11] tests/vm: move vga setup

2020-03-23 Thread Philippe Mathieu-Daudé
On 3/23/20 5:15 PM, Alex Bennée wrote: From: Gerd Hoffmann Move '-device VGA' from basevm.py to the guests, so they have the chance to opt out and run without display device. Signed-off-by: Gerd Hoffmann Signed-off-by: Alex Bennée Message-Id: <20200310083218.26355-3-kra...@redhat.com> Alre

Re: [PULL for-5.0 0/2] s390x fixes and documentation

2020-03-23 Thread Peter Maydell
ilable in the Git repository at: > > https://github.com/cohuck/qemu tags/s390x-20200323 > > for you to fetch changes up to 7722837369eb1c7e808021d79da68afa0c01c26f: > > s390/ipl: fix off-by-one in update_machi

Re: [PATCH v1 05/11] tests/vm: fix basevm config

2020-03-23 Thread Philippe Mathieu-Daudé
On 3/23/20 5:15 PM, Alex Bennée wrote: When the patch was merged it was part of a longer series which had already merged the config changes. Semu-revert the config related Typo "semi-revert"? changes for now so things will build. Fixes: b081986c85fd2 Signed-off-by: Alex Bennée --- tests/v

Re: [PATCH v1 06/11] configure: disable MTTCG for MIPS guests

2020-03-23 Thread Philippe Mathieu-Daudé
On 3/23/20 5:15 PM, Alex Bennée wrote: While debugging check-acceptance failures I found an instability in the mips64el test case. Briefly the test case: retry.py -n 100 -c -- ./mips64el-softmmu/qemu-system-mips64el \ -display none -vga none -serial mon:stdio \ -machine malta -kerne

Re: qemu-system-aarch64 windows binary run Arm64 defconfig kernel not working

2020-03-23 Thread yoma sophian
hi Peter: > Is it possible for you to try with a newer version of QEMU? That one > is a release candidate snapshot from before a release that we made > a year ago. With below qemu version, 4.2.0, the latest on the qemu windows download page, Synchronous External Abort still happen with the problem

[PATCH v1 07/11] tests/docker: Keep package list sorted

2020-03-23 Thread Alex Bennée
From: Philippe Mathieu-Daudé Keep package list sorted, this eases rebase/cherry-pick. Fixes: 3a6784813 Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20200322120104.21267-2-phi...@redhat.com> --- tests/docker/dockerfiles/centos7.docker | 6 -- tests/docker/d

[PATCH v1 10/11] tests/docker: Add libepoxy and libudev packages to the Fedora image

2020-03-23 Thread Alex Bennée
From: Philippe Mathieu-Daudé Install optional dependencies of QEMU to get better coverage. Suggested-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20200322120104.21267-5-phi...@redhat.com> --- tests/docker/dockerfiles/fedora.docker | 2 ++ 1

[PATCH v1 11/11] .travis.yml: Add a KVM-only s390x job

2020-03-23 Thread Alex Bennée
From: Philippe Mathieu-Daudé Add a job to build QEMU on s390x with TCG disabled, so this configuration won't bitrot over time. This job is quick, running check-unit: Ran for 5 min 30 sec https://travis-ci.org/github/philmd/qemu/jobs/665456423 Acked-by: Cornelia Huck Signed-off-by: Philippe Mat

[PATCH v1 08/11] tests/docker: Install gcrypt devel package in Debian image

2020-03-23 Thread Alex Bennée
From: Philippe Mathieu-Daudé In commit 6f8bbb374be we enabled building with the gcrypt library on the the Debian 'x86 host', which was based on Debian Stretch. Later in commit 698a71edbed we upgraded the Debian base image to Buster. Apparently Debian Stretch was listing gcrypt as a QEMU dependen

[PATCH v1 03/11] tests/vm: update FreeBSD to 12.1

2020-03-23 Thread Alex Bennée
From: Gerd Hoffmann Signed-off-by: Gerd Hoffmann Signed-off-by: Alex Bennée Message-Id: <20200310083218.26355-4-kra...@redhat.com> --- tests/vm/freebsd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/vm/freebsd b/tests/vm/freebsd index 58166766d91..298967fe9cf 100

[PATCH v1 06/11] configure: disable MTTCG for MIPS guests

2020-03-23 Thread Alex Bennée
While debugging check-acceptance failures I found an instability in the mips64el test case. Briefly the test case: retry.py -n 100 -c -- ./mips64el-softmmu/qemu-system-mips64el \ -display none -vga none -serial mon:stdio \ -machine malta -kernel ./vmlinux-4.7.0-rc1.I6400 \ -cpu I6400

[PATCH v1 09/11] tests/docker: Use Python3 PyYAML in the Fedora image

2020-03-23 Thread Alex Bennée
From: Philippe Mathieu-Daudé The Python2 PyYAML is now pointless, switch to the Python3 version. Fixes: bcbf27947 (docker: move tests from python2 to python3) Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20200322120104.21267-4-phi...@redhat.com> --- tests/dock

[PATCH v1 02/11] tests/vm: move vga setup

2020-03-23 Thread Alex Bennée
From: Gerd Hoffmann Move '-device VGA' from basevm.py to the guests, so they have the chance to opt out and run without display device. Signed-off-by: Gerd Hoffmann Signed-off-by: Alex Bennée Message-Id: <20200310083218.26355-3-kra...@redhat.com> --- tests/vm/basevm.py | 1 - tests/vm/fedor

[PATCH v1 05/11] tests/vm: fix basevm config

2020-03-23 Thread Alex Bennée
When the patch was merged it was part of a longer series which had already merged the config changes. Semu-revert the config related changes for now so things will build. Fixes: b081986c85fd2 Signed-off-by: Alex Bennée --- tests/vm/basevm.py | 16 1 file changed, 8 insertions(+)

[PATCH v1 for 5.0 00/11] testing/next

2020-03-23 Thread Alex Bennée
Hi, This is the current testing/next queue. I've re-instated Gerd's VM patches after I tracked down the failure to a weird interaction between check-acceptance and the @skipIf changes I had in my tree. I've re-run all BSD builds with check-unit and it seems sound. The following still need review:

[PATCH v1 01/11] tests/vm: write raw console log

2020-03-23 Thread Alex Bennée
From: Gerd Hoffmann Run "tail -f /var/tmp/*/qemu*console.raw" in another terminal to watch the install console. Signed-off-by: Gerd Hoffmann Signed-off-by: Alex Bennée Message-Id: <20200310083218.26355-2-kra...@redhat.com> --- tests/vm/basevm.py | 6 ++ 1 file changed, 6 insertions(+) di

[PATCH v1 04/11] tests/vm: update NetBSD to 9.0

2020-03-23 Thread Alex Bennée
From: Gerd Hoffmann The installer supports GPT now, so the install workflow has changed a bit. Also: run without VGA device. This works around a bug in the seabios sercon code and makes the bootloader menu show up on the serial line, so we can drop the quirk for that. Signed-off-by: Gerd Hoffm

Re: [PATCH 1/1] s390/ipl: fix off-by-one in update_machine_ipl_properties()

2020-03-23 Thread Halil Pasic
On Fri, 20 Mar 2020 18:25:18 +0100 Cornelia Huck wrote: > On Fri, 20 Mar 2020 15:31:01 +0100 > Halil Pasic wrote: > > > In update_machine_ipl_properties() the array ascii_loadparm needs to > > hold the 8 char lodparm and a string terminating zero char. > > s/lodparm/loadparm/ > > > Let's incr

Re: [PATCH v5 2/5] generic vhost user server

2020-03-23 Thread Stefan Hajnoczi
On Mon, Mar 09, 2020 at 06:03:39PM +0800, Coiby Xu wrote: > diff --git a/util/Makefile.objs b/util/Makefile.objs > index 6b38b67cf1..d207b5f981 100644 > --- a/util/Makefile.objs > +++ b/util/Makefile.objs > @@ -37,6 +37,9 @@ util-obj-y += readline.o > util-obj-y += rcu.o > util-obj-$(CONFIG_MEMBA

Re: [PATCH-for-5.0 v2 10/11] hw/timer/pxa2xx_timer: Add assertion to silent static analyzer warning

2020-03-23 Thread Alistair Francis
On Sat, Mar 21, 2020 at 7:50 AM Philippe Mathieu-Daudé wrote: > > pxa2xx_timer_tick4() takes an opaque pointer, then calls > pxa2xx_timer_update4(), so the static analyzer can not > verify that the 'n < 8': > > 425 static void pxa2xx_timer_tick4(void *opaque) > 426 { > 427 PXA2xxTimer4 *

Re: [PATCH-for-5.0 v2 09/11] hw/timer/stm32f2xx_timer: Remove dead assignment

2020-03-23 Thread Alistair Francis
On Sat, Mar 21, 2020 at 7:52 AM Philippe Mathieu-Daudé wrote: > > Fix warning reported by Clang static code analyzer: > > CC hw/timer/stm32f2xx_timer.o > hw/timer/stm32f2xx_timer.c:225:9: warning: Value stored to 'value' is never > read > value = timer_val; > ^

Re: [PATCH-for-5.0 v2 08/11] hw/timer/exynos4210_mct: Remove dead assignments

2020-03-23 Thread Alistair Francis
On Sat, Mar 21, 2020 at 7:50 AM Philippe Mathieu-Daudé wrote: > > Fix warnings reported by Clang static code analyzer: > > hw/timer/exynos4210_mct.c:1370:9: warning: Value stored to 'index' is never > read > index = GET_L_TIMER_CNT_REG_IDX(offset, lt_i); > ^ ~~

Re: [PATCH v9 1/4] qcow2: introduce compression type feature

2020-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2020 17:25, Denis Plotnikov wrote: The patch adds some preparation parts for incompatible compression type feature to qcow2 allowing the use different compression methods for image clusters (de)compressing. It is implied that the compression type is set on the image creation and can be cha

Re: [PATCH-for-5.0 v2 06/11] hw/isa/i82378: Remove dead assignment

2020-03-23 Thread Alistair Francis
On Sat, Mar 21, 2020 at 7:46 AM Philippe Mathieu-Daudé wrote: > > Rename the unique variable assigned as 'pit' which better > represents what it holds, to fix a warning reported by the > Clang static code analyzer: > > CC hw/isa/i82378.o > hw/isa/i82378.c:108:5: warning: Value stored to

Re: [PATCH-for-5.0 v2 03/11] hw/i2c/pm_smbus: Remove dead assignment

2020-03-23 Thread Alistair Francis
On Sat, Mar 21, 2020 at 7:45 AM Philippe Mathieu-Daudé wrote: > > Fix warning reported by Clang static code analyzer: > > CC hw/i2c/pm_smbus.o > hw/i2c/pm_smbus.c:187:17: warning: Value stored to 'ret' is never read > ret = 0; > ^ ~ > > Reported-b

Re: [PATCH-for-5.0 v2 01/11] block: Avoid dead assignment

2020-03-23 Thread Alistair Francis
On Sat, Mar 21, 2020 at 7:42 AM Philippe Mathieu-Daudé wrote: > > Fix warning reported by Clang static code analyzer: > > block.c:3167:5: warning: Value stored to 'ret' is never read > ret = bdrv_fill_options(&options, filename, &flags, &local_err); > ^ ~~

Re: [PATCH v41 01/21] target/avr: Add outward facing interfaces and core CPU logic

2020-03-23 Thread Philippe Mathieu-Daudé
Hi Michael, On 1/18/20 8:13 PM, Michael Rolnik wrote: This includes: - CPU data structures - object model classes and functions - migration functions - GDB hooks Co-developed-by: Michael Rolnik Co-developed-by: Sarah Harris Signed-off-by: Michael Rolnik Signed-off-by: Sarah Harris Signed-of

Re: [PATCH] ide/sii3112: Avoid leaking irqs array

2020-03-23 Thread BALATON Zoltan
On Mon, 23 Mar 2020, Philippe Mathieu-Daudé wrote: On 3/23/20 3:32 PM, BALATON Zoltan wrote: Coverity CID 1421984 reports a leak in allocated irqs, this patch attempts to plug that. Signed-off-by: BALATON Zoltan --- hw/ide/sii3112.c | 14 +++--- 1 file changed, 11 insertions(+), 3 d

Re: [PATCH] linux-user, configure: improve syscall_nr.h dependencies checking

2020-03-23 Thread Peter Maydell
On Mon, 23 Mar 2020 at 11:42, Laurent Vivier wrote: > > This is mostly a fix for in-tree build. > > It removes errors on .d directories: > > grep: ./.gitlab-ci.d: Is a directory > grep: ./scripts/qemu-guest-agent/fsfreeze-hook.d: Is a directory > > and improves performance by only checking -li

RE: [PATCH v7 00/13] APIC ID fixes for AMD EPYC CPU model

2020-03-23 Thread Moger, Babu
[AMD Official Use Only - Internal Distribution Only] > -Original Message- > From: Igor Mammedov > Sent: Wednesday, March 18, 2020 5:47 AM > To: Moger, Babu > Cc: Eduardo Habkost ; marcel.apfelb...@gmail.com; > pbonz...@redhat.com; r...@twiddle.net; m...@redhat.com; qemu- > de...@nongnu.o

Re: [PATCH] hw/ide/sii3112: Use qdev gpio rather than qemu_allocate_irqs()

2020-03-23 Thread Philippe Mathieu-Daudé
On 3/23/20 4:17 PM, Peter Maydell wrote: Coverity points out (CID 1421984) that we are leaking the memory returned by qemu_allocate_irqs(). We can avoid this leak by switching to using qdev_init_gpio_in(); the base class finalize will free the irqs that this allocates under the hood. Signed-off-

Re: Coverity CID 1421984

2020-03-23 Thread Peter Maydell
On Mon, 23 Mar 2020 at 15:28, BALATON Zoltan wrote: > Is this documented anywhere? Unfortunately not. You're quite right that we should document this (I hadn't realized/had forgotten that the qdev gpio APIs are entirely undocumented -- they date from a time when we were much less strict about ask

Re: [PATCH v3 09/10] tests/bios-tables-test: Update arm/virt memhp test

2020-03-23 Thread Igor Mammedov
On Wed, 11 Mar 2020 17:20:13 + Shameer Kolothum wrote: SUBJ is pointless, s/Update.../ arm/virt: test pc-dimm and nvdimm coldplug > Since we now have both pc-dimm and nvdimm support, update > test_acpi_virt_tcg_memhp() to include those. > > Signed-off-by: Shameer Kolothum > --- > v2 -> v3

Re: Coverity CID 1421984

2020-03-23 Thread Philippe Mathieu-Daudé
On 3/23/20 3:46 PM, Peter Maydell wrote: On Mon, 23 Mar 2020 at 14:43, BALATON Zoltan wrote: On Mon, 23 Mar 2020, Peter Maydell wrote: On Mon, 23 Mar 2020 at 14:06, BALATON Zoltan wrote: On Mon, 23 Mar 2020, Peter Maydell wrote: Coverity has flagged up a lot of leaks involving qemu_allocat

Re: Coverity CID 1421984

2020-03-23 Thread BALATON Zoltan
On Mon, 23 Mar 2020, Peter Maydell wrote: On Mon, 23 Mar 2020 at 14:43, BALATON Zoltan wrote: On Mon, 23 Mar 2020, Peter Maydell wrote: On Mon, 23 Mar 2020 at 14:06, BALATON Zoltan wrote: On Mon, 23 Mar 2020, Peter Maydell wrote: Coverity has flagged up a lot of leaks involving qemu_allocat

Re: [PATCH v3 06/10] hw/arm/virt: Add nvdimm hot-plug infrastructure

2020-03-23 Thread Igor Mammedov
On Wed, 11 Mar 2020 17:20:10 + Shameer Kolothum wrote: > From: Kwangwoo Lee > > This adds support to init nvdimm acpi state and build nvdimm acpi tables. > Please note nvdimm_support is not yet enabled. > > Signed-off-by: Kwangwoo Lee > Signed-off-by: Eric Auger > Signed-off-by: Shameer

[PATCH] hw/ide/sii3112: Use qdev gpio rather than qemu_allocate_irqs()

2020-03-23 Thread Peter Maydell
Coverity points out (CID 1421984) that we are leaking the memory returned by qemu_allocate_irqs(). We can avoid this leak by switching to using qdev_init_gpio_in(); the base class finalize will free the irqs that this allocates under the hood. Signed-off-by: Peter Maydell --- This is how the 'use

Re: [PATCH v3 05/10] nvdimm: Use configurable ACPI IO base and size

2020-03-23 Thread Igor Mammedov
On Wed, 11 Mar 2020 17:20:09 + Shameer Kolothum wrote: > From: Kwangwoo Lee > > This patch makes IO base and size configurable to create NPIO AML for > ACPI NFIT. Since a different architecture like AArch64 does not use > port-mapped IO, a configurable IO base is required to create correct

Re: [PATCH-for-5.0 v2 00/11] misc: Trivial static code analyzer fixes

2020-03-23 Thread Philippe Mathieu-Daudé
On 3/23/20 3:55 PM, Laurent Vivier wrote: Le 23/03/2020 à 15:45, Philippe Mathieu-Daudé a écrit : On 3/23/20 3:32 PM, Laurent Vivier wrote: Le 21/03/2020 à 15:40, Philippe Mathieu-Daudé a écrit : Fix trivial warnings reported by the Clang static code analyzer. Since v1: - Addressed Markus/Zol

Re: [PATCH v3 04/10] hw/acpi/nvdimm: Fix for NVDIMM incorrect DSM output buffer length

2020-03-23 Thread Igor Mammedov
On Wed, 11 Mar 2020 17:20:08 + Shameer Kolothum wrote: > As per ACPI spec 6.3, Table 19-419 Object Conversion Rules, if > the Buffer Field <= to the size of an Integer (in bits), it will > be treated as an integer. Moreover, the integer size depends on > DSDT tables revision number. If revisi

Re: [PATCH-for-5.0 v2 00/11] misc: Trivial static code analyzer fixes

2020-03-23 Thread Laurent Vivier
Le 23/03/2020 à 15:45, Philippe Mathieu-Daudé a écrit : > On 3/23/20 3:32 PM, Laurent Vivier wrote: >> Le 21/03/2020 à 15:40, Philippe Mathieu-Daudé a écrit : >>> Fix trivial warnings reported by the Clang static code analyzer. >>> >>> Since v1: >>> - Addressed Markus/Zoltan/Aleksandar review comme

Re: [PATCH] ide/sii3112: Avoid leaking irqs array

2020-03-23 Thread Philippe Mathieu-Daudé
On 3/23/20 3:32 PM, BALATON Zoltan wrote: Coverity CID 1421984 reports a leak in allocated irqs, this patch attempts to plug that. Signed-off-by: BALATON Zoltan --- hw/ide/sii3112.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hw/ide/sii3112.c b/hw/ide/

Re: [PATCH v5 1/5] allow vu_message_read to be replaced

2020-03-23 Thread Stefan Hajnoczi
On Mon, Mar 09, 2020 at 06:03:38PM +0800, Coiby Xu wrote: > diff --git a/contrib/libvhost-user/libvhost-user.h > b/contrib/libvhost-user/libvhost-user.h > index 6fc8000e99..7e3f0c8598 100644 > --- a/contrib/libvhost-user/libvhost-user.h > +++ b/contrib/libvhost-user/libvhost-user.h > @@ -30,6 +30,

Re: Coverity CID 1421984

2020-03-23 Thread Peter Maydell
On Mon, 23 Mar 2020 at 14:43, BALATON Zoltan wrote: > > On Mon, 23 Mar 2020, Peter Maydell wrote: > > On Mon, 23 Mar 2020 at 14:06, BALATON Zoltan wrote: > >> On Mon, 23 Mar 2020, Peter Maydell wrote: > >>> Coverity has flagged up a lot of leaks involving qemu_allocate_irqs(); > >>> most of them

Re: [PATCH-for-5.0 v2 00/11] misc: Trivial static code analyzer fixes

2020-03-23 Thread Philippe Mathieu-Daudé
On 3/23/20 3:32 PM, Laurent Vivier wrote: Le 21/03/2020 à 15:40, Philippe Mathieu-Daudé a écrit : Fix trivial warnings reported by the Clang static code analyzer. Since v1: - Addressed Markus/Zoltan/Aleksandar review comments Philippe Mathieu-Daudé (11): block: Avoid dead assignment bloc

Re: [PATCH v4 1/3] Acceptance test: adds param 'address' in _get_free_port

2020-03-23 Thread Willian Rampazzo
On Mon, Mar 23, 2020 at 7:30 AM Oksana Vohchana wrote: > > In the migration test function _get_free_port works only for localhost, > but in the case to use migration through an RDMA we need to get a free port > on the configured network RDMA-interface. > This patch is the start for another migrati

Re: [PATCH v14 Kernel 1/7] vfio: KABI for migration interface for device state

2020-03-23 Thread Auger Eric
Hi, On 3/19/20 2:09 PM, Alex Williamson wrote: > On Thu, 19 Mar 2020 01:05:54 -0400 > Yan Zhao wrote: > >> On Thu, Mar 19, 2020 at 11:49:26AM +0800, Alex Williamson wrote: >>> On Wed, 18 Mar 2020 21:17:03 -0400 >>> Yan Zhao wrote: >>> On Thu, Mar 19, 2020 at 03:41:08AM +0800, Kirti Wank

Re: Coverity CID 1421984

2020-03-23 Thread BALATON Zoltan
On Mon, 23 Mar 2020, Peter Maydell wrote: On Mon, 23 Mar 2020 at 14:06, BALATON Zoltan wrote: On Mon, 23 Mar 2020, Peter Maydell wrote: Coverity has flagged up a lot of leaks involving qemu_allocate_irqs(); most of them I've for the moment just set as "insignificant, fix required" because they

[PATCH] ide/sii3112: Avoid leaking irqs array

2020-03-23 Thread BALATON Zoltan
Coverity CID 1421984 reports a leak in allocated irqs, this patch attempts to plug that. Signed-off-by: BALATON Zoltan --- hw/ide/sii3112.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hw/ide/sii3112.c b/hw/ide/sii3112.c index 06605d7af2..c886916873 100644

Re: Coverity CID 1421984

2020-03-23 Thread Peter Maydell
On Mon, 23 Mar 2020 at 14:06, BALATON Zoltan wrote: > On Mon, 23 Mar 2020, Peter Maydell wrote: > > Coverity has flagged up a lot of leaks involving qemu_allocate_irqs(); > > most of them I've for the moment just set as "insignificant, fix > > required" because they're in called-once functions lik

Re: [PATCH-for-5.0 v2 11/11] hw/scsi/esp-pci: Remove dead assignment

2020-03-23 Thread Laurent Vivier
Le 21/03/2020 à 15:41, Philippe Mathieu-Daudé a écrit : > Fix warning reported by Clang static code analyzer: > > CC hw/scsi/esp-pci.o > hw/scsi/esp-pci.c:198:9: warning: Value stored to 'size' is never read > size = 4; > ^ ~ > > Reported-by: Clang Static Analy

Re: [PATCH-for-5.0 v2 00/11] misc: Trivial static code analyzer fixes

2020-03-23 Thread Laurent Vivier
Le 21/03/2020 à 15:40, Philippe Mathieu-Daudé a écrit : > Fix trivial warnings reported by the Clang static code analyzer. > > Since v1: > - Addressed Markus/Zoltan/Aleksandar review comments > > Philippe Mathieu-Daudé (11): > block: Avoid dead assignment > blockdev: Remove dead assignment >

[PATCH v9 3/4] qcow2: add zstd cluster compression

2020-03-23 Thread Denis Plotnikov
zstd significantly reduces cluster compression time. It provides better compression performance maintaining the same level of the compression ratio in comparison with zlib, which, at the moment, is the only compression method available. The performance test results: Test compresses and decompresse

[PATCH v9 1/4] qcow2: introduce compression type feature

2020-03-23 Thread Denis Plotnikov
The patch adds some preparation parts for incompatible compression type feature to qcow2 allowing the use different compression methods for image clusters (de)compressing. It is implied that the compression type is set on the image creation and can be changed only later by image conversion, thus c

[PATCH v9 0/4] qcow2: Implement zstd cluster compression method

2020-03-23 Thread Denis Plotnikov
v9: * 01: fix error checking and reporting in qcow2_amend compression type part [Vladimir] * 03: replace asserts with -EIO in qcow2_zstd_decompression [Vladimir, Alberto] * 03: reword/amend/add comments, fix typos [Vladimir] v8: * 03: switch zstd API from simple to stream [Eric]

[PATCH v9 2/4] qcow2: rework the cluster compression routine

2020-03-23 Thread Denis Plotnikov
The patch enables processing the image compression type defined for the image and chooses an appropriate method for image clusters (de)compression. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia --- block/qcow2-threads.c | 71 ++

[PATCH v9 4/4] iotests: 287: add qcow2 compression type test

2020-03-23 Thread Denis Plotnikov
The test checks fulfilling qcow2 requiriements for the compression type feature and zstd compression type operability. Signed-off-by: Denis Plotnikov Reviewed-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/287 | 128 + tests/qemu-iotests/287.out

Re: [PATCH 0/2] zero pointer after bdrv_unref_child

2020-03-23 Thread Max Reitz
On 16.03.20 07:06, Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > I faced use-after-free of bs->backing pointer after bdrv_unref_child in > bdrv_set_backing_hd. > > Fix it, and do similar thing for s->data_file in qcow2.c. > > I'm not sure that this is the full fix. Is it safe to keep bs->bac

Re: Coverity CID 1421984

2020-03-23 Thread BALATON Zoltan
On Mon, 23 Mar 2020, Peter Maydell wrote: On Mon, 23 Mar 2020 at 13:12, BALATON Zoltan wrote: On Mon, 23 Mar 2020, Philippe Mathieu-Daudé wrote: Cc'ing qemu-ppc since this is restricted to the aCube Sam460ex board. On 3/23/20 12:46 PM, Max Reitz wrote: Hi, I was triaging new Coverity block l

RE: [PATCH v3 02/10] fw_cfg: Migrate ACPI table mr sizes separately

2020-03-23 Thread Shameerali Kolothum Thodi
> -Original Message- > From: Igor Mammedov [mailto:imamm...@redhat.com] > Sent: 23 March 2020 12:35 > To: Shameerali Kolothum Thodi > Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org; > eric.au...@redhat.com; peter.mayd...@linaro.org; > xiaoguangrong.e...@gmail.com; da...@redhat.com; m...

Re: [PATCH-for-5.0 0/3] virtio, vhost-gpu: Release memory returned by malloc() with free()

2020-03-23 Thread Michael S. Tsirkin
On Mon, Mar 23, 2020 at 12:29:40PM +0100, Philippe Mathieu-Daudé wrote: > Coverity reported a ALLOC_FREE_MISMATCH in vg_handle_cursor(), > because the memory returned by vu_queue_pop() is allocated with > malloc(). Fix it. > > Similar error occurs with virtio. Document and fix. I will queue this.

Re: qemu-system-aarch64 windows binary run Arm64 defconfig kernel not working

2020-03-23 Thread Peter Maydell
On Mon, 23 Mar 2020 at 13:34, yoma sophian wrote: > My environment are: > 1. the versionof qemu-system-aarch64 windows binary is 4.0.92 Is it possible for you to try with a newer version of QEMU? That one is a release candidate snapshot from before a release that we made a year ago. thanks -- PM

Re: [PATCH-for-5.0] block: Assert BlockDriver::format_name is not NULL

2020-03-23 Thread Max Reitz
On 18.03.20 23:22, Philippe Mathieu-Daudé wrote: > bdrv_do_find_format() calls strcmp() using BlockDriver::format_name > as argument, which must not be NULL. Assert this field is not null > when we register a block driver in bdrv_register(). > > Reported-by: Mansour Ahmadi > Signed-off-by: Philip

Re: Coverity CID 1421984

2020-03-23 Thread Peter Maydell
On Mon, 23 Mar 2020 at 13:12, BALATON Zoltan wrote: > > On Mon, 23 Mar 2020, Philippe Mathieu-Daudé wrote: > > Cc'ing qemu-ppc since this is restricted to the aCube Sam460ex board. > > On 3/23/20 12:46 PM, Max Reitz wrote: > >> Hi, > >> > >> I was triaging new Coverity block layer reports today, a

Re: [PATCH] block: Avoid memleak on qcow2 image info failure

2020-03-23 Thread Max Reitz
On 20.03.20 19:36, Eric Blake wrote: > If we fail to get bitmap info, we must not leak the encryption info. > > Fixes: b8968c875f403 > Fixes: Coverity CID 1421894 > Signed-off-by: Eric Blake > --- > block/qcow2.c | 1 + > 1 file changed, 1 insertion(+) Thanks, applied to my block branch: https

Re: deprecation of in-tree builds

2020-03-23 Thread Stefan Hajnoczi
On Sat, Mar 21, 2020 at 11:50:23PM +0100, BALATON Zoltan wrote: > On Sat, 21 Mar 2020, Peter Maydell wrote: > > AIUI from Paolo, the intention is to deprecate and eventually > > stop supporting "in-tree" builds, so that the only option is > > building in a separate build directory. I thought we sho

qemu-system-aarch64 windows binary run Arm64 defconfig kernel not working

2020-03-23 Thread yoma sophian
hi all: I try to use qemu-system-aarch64 windows binary for running arm64 defconfig kernel image but get Synchronous External Abort while booting PCI devices. The same Image that run on qemu-system-aarch64 linux binary is fine. Is there any pci related kernel config need to be removed while using q

[PATCH] fix vhost_user_blk_watch crash

2020-03-23 Thread Li Feng
the G_IO_HUP is watched in tcp_chr_connect, and the callback vhost_user_blk_watch is not needed, because tcp_chr_hup is registered as callback. And it will close the tcp link. Signed-off-by: Li Feng --- hw/block/vhost-user-blk.c | 19 --- include/hw/virtio/vhost-user-blk

Re: Coverity CID 1421984

2020-03-23 Thread Max Reitz
On 23.03.20 14:11, BALATON Zoltan wrote: > On Mon, 23 Mar 2020, Philippe Mathieu-Daudé wrote: >> Cc'ing qemu-ppc since this is restricted to the aCube Sam460ex board. >> On 3/23/20 12:46 PM, Max Reitz wrote: >>> Hi, >>> >>> I was triaging new Coverity block layer reports today, and one that >>> see

Re: [PATCH v4] block/nvme: introduce PMR support from NVMe 1.4 spec

2020-03-23 Thread Stefan Hajnoczi
On Fri, Mar 20, 2020 at 02:50:29PM -0700, Andrzej Jakowski wrote: > This patch introduces support for PMR that has been defined as part of NVMe > 1.4 > spec. User can now specify a pmrdev option that should point to > HostMemoryBackend. > pmrdev memory region will subsequently be exposed as PCI B

Re: [PATCH v4 2/2] lockable: replaced locks with lock guard macros where appropriate

2020-03-23 Thread Stefan Hajnoczi
On Fri, Mar 20, 2020 at 05:31:37AM -0700, dnbrd...@gmail.com wrote: > From: Daniel Brodsky > > - ran regexp "qemu_mutex_lock\(.*\).*\n.*if" to find targets > - replaced result with QEMU_LOCK_GUARD if all unlocks at function end > - replaced result with WITH_QEMU_LOCK_GUARD if unlock not at end >

Re: [PATCH v4 0/2] Replaced locks with lock guard macros

2020-03-23 Thread Stefan Hajnoczi
On Fri, Mar 20, 2020 at 06:43:23AM -0700, no-re...@patchew.org wrote: > /tmp/qemu-test/src/util/thread-pool.c:213:5: error: unused variable > 'qemu_lockable_auto1' [-Werror,-Wunused-variable] > QEMU_LOCK_GUARD(&pool->lock); > ^ > /tmp/qemu-test/src/include/qemu/lockable.h:173:29: note: exp

Re: [PATCH v4 1/2] lockable: fix __COUNTER__ macro to be referenced properly

2020-03-23 Thread Stefan Hajnoczi
On Fri, Mar 20, 2020 at 05:31:36AM -0700, dnbrd...@gmail.com wrote: > From: Daniel Brodsky > > - __COUNTER__ doesn't work with ## concat > - replaced ## with glue() macro so __COUNTER__ is evaluated > > Fixes: 3284c3ddc4 > > Signed-off-by: Daniel Brodsky > --- > include/qemu/lockable.h | 4 ++

Re: Coverity CID 1421984

2020-03-23 Thread BALATON Zoltan
On Mon, 23 Mar 2020, Philippe Mathieu-Daudé wrote: Cc'ing qemu-ppc since this is restricted to the aCube Sam460ex board. On 3/23/20 12:46 PM, Max Reitz wrote: Hi, I was triaging new Coverity block layer reports today, and one that seemed like a real bug was CID 1421984: It complains about a me

Re: [PATCH v3 03/10] exec: Fix for qemu_ram_resize() callback

2020-03-23 Thread Igor Mammedov
On Wed, 11 Mar 2020 17:20:07 + Shameer Kolothum wrote: > From: David Hildenbrand > > Summarizing the issue: > 1. Memory regions contain ram blocks with a different size, if the >size is not properly aligned. While memory regions can have an >unaligned size, ram blocks can't. This

Re: [PATCH-for-5.0] ui/input-linux: Do not ignore ioctl() return value

2020-03-23 Thread Darren Kenny
Philippe Mathieu-Daudé writes: > Fix warnings reported by Clang static code analyzer: > > CC ui/input-linux.o > ui/input-linux.c:343:9: warning: Value stored to 'rc' is never read > rc = ioctl(il->fd, EVIOCGBIT(EV_REL, sizeof(relmap)), &relmap); > ^

Re: [PATCH 3/3] block: fail on open when file size is unaligned to request_alignment

2020-03-23 Thread Max Reitz
On 12.03.20 13:06, Vladimir Sementsov-Ogievskiy wrote: > 12.03.2020 14:59, Vladimir Sementsov-Ogievskiy wrote: >> 11.03.2020 14:06, Max Reitz wrote: >>> On 30.01.20 16:22, Vladimir Sementsov-Ogievskiy wrote: Prior to the commit the following command lead to crash:    ./qemu-io --imag

Re: [PATCH v8 3/4] qcow2: add zstd cluster compression

2020-03-23 Thread Denis Plotnikov
On 23.03.2020 15:47, Alberto Garcia wrote: On Mon 23 Mar 2020 11:20:42 AM CET, Denis Plotnikov wrote: But consider corrupted image: it may contain any data. And we should not crash because of it. So, we should return error here. If the image is corrupted we can't continue anyway. If we retur

[PULL for-5.0 1/2] Documentation: create/move s390x documentation

2020-03-23 Thread Cornelia Huck
Create a subdirectory for s390x under docs/system/ and move the existing vfio-ap documentation there. Create an initial document describing s390x system emulation. Suggested-by: Peter Maydell Signed-off-by: Cornelia Huck Acked-by: Christian Borntraeger Message-Id: <20200318103940.1169-1-coh...

[PULL for-5.0 0/2] s390x fixes and documentation

2020-03-23 Thread Cornelia Huck
The following changes since commit 29e0855c5af62bbb0b0b6fed792e004dad92ba95: Merge remote-tracking branch 'remotes/elmarco/tags/slirp-pull-request' into staging (2020-03-22 21:00:38 +) are available in the Git repository at: https://github.com/cohuck/qemu tags/s390x-2020032

[PULL for-5.0 2/2] s390/ipl: fix off-by-one in update_machine_ipl_properties()

2020-03-23 Thread Cornelia Huck
From: Halil Pasic In update_machine_ipl_properties() the array ascii_loadparm needs to hold the 8 char loadparm and a string terminating zero char. Let's increase the size of ascii_loadparm accordingly. Signed-off-by: Halil Pasic Fixes: 0a01e082a428 ("s390/ipl: sync back loadparm") Fixes: Cove

Re: [PATCH v8 3/4] qcow2: add zstd cluster compression

2020-03-23 Thread Alberto Garcia
On Mon 23 Mar 2020 11:20:42 AM CET, Denis Plotnikov wrote: >> But consider corrupted image: it may contain any data. And we should >> not crash because of it. So, we should return error here. > If the image is corrupted we can't continue anyway. If we return -EIO > on this condition, we need to do

Re: [PATCH v4 1/2] target/arm: kvm: Handle DABT with no valid ISS

2020-03-23 Thread Andrew Jones
On Mon, Mar 23, 2020 at 11:32:26AM +, Beata Michalska wrote: > On ARMv7 & ARMv8 some load/store instructions might trigger a data abort > exception with no valid ISS info to be decoded. The lack of decode info > makes it at least tricky to emulate those instruction which is one of the > (many)

Re: [PATCH v3 02/10] fw_cfg: Migrate ACPI table mr sizes separately

2020-03-23 Thread Igor Mammedov
On Wed, 11 Mar 2020 17:20:06 + Shameer Kolothum wrote: > Any sub-page size update to ACPI table MRs will be lost during > migration, as we use aligned size in ram_load_precopy() -> > qemu_ram_resize() path. This will result in inconsistency in sizes > between source and destination. I'm not s

Re: [PATCH v8 1/4] qcow2: introduce compression type feature

2020-03-23 Thread Denis Plotnikov
On 23.03.2020 15:26, Vladimir Sementsov-Ogievskiy wrote: 23.03.2020 15:22, Denis Plotnikov wrote: On 23.03.2020 11:00, Vladimir Sementsov-Ogievskiy wrote: 21.03.2020 17:34, Denis Plotnikov wrote: The patch adds some preparation parts for incompatible compression type feature to qcow2 all

Re: [PATCH v8 1/4] qcow2: introduce compression type feature

2020-03-23 Thread Vladimir Sementsov-Ogievskiy
23.03.2020 15:22, Denis Plotnikov wrote: On 23.03.2020 11:00, Vladimir Sementsov-Ogievskiy wrote: 21.03.2020 17:34, Denis Plotnikov wrote: The patch adds some preparation parts for incompatible compression type feature to qcow2 allowing the use different compression methods for image clusters

Re: [PATCH v5 0/3] net: tulip: add checks to avoid OOB access

2020-03-23 Thread P J P
+-- On Mon, 23 Mar 2020, Jason Wang wrote --+ | Prasad, please fix this and post a new version. | | While at it, I prefer to squash patch 3 into patch 2 since patch 3 fixes the | issue introduced by patch 2. Sent patch v6. Thank you. -- Prasad J Pandit / Red Hat Product Security Team 8685 545E

<    1   2   3   >