Re: Potential Null dereference

2020-03-24 Thread Philippe Mathieu-Daudé
On 3/24/20 4:05 AM, Mansour Ahmadi wrote: Hi, Nullness of  needs to be checked here: https://github.com/qemu/qemu/blob/c532b954d96f96d361ca31308f75f1b95bd4df76/block/commit.c#L221 pstrcpy(bs->exact_filename, sizeof(bs->exact_filename),... While it is done at 2 other locations: https://github.

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

2020-03-24 Thread Chenqun (kuhn)
>-Original Message- >From: Qemu-devel [mailto:qemu-devel- >bounces+kuhn.chenqun=huawei@nongnu.org] On Behalf Of Laurent Vivier >Sent: Monday, March 23, 2020 10:56 PM >To: Philippe Mathieu-Daudé ; qemu-devel@nongnu.org >Cc: Fam Zheng ; Peter Maydell ; >Michael S. Tsirkin ; Mark Cave-Ayla

[PATCH] iotests: drop group file

2020-03-24 Thread Vladimir Sementsov-Ogievskiy
When sending iotests to upstream or do patch porting from one branch to another we very often have to resolve conflicts in group file, as many absolutely independent features are intersecting by this file. These conflicts are simple, but imagine how much time we all have already spent on resolving

Re: [PATCH] iotests: drop group file

2020-03-24 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200324074156.5330-1-vsement...@virtuozzo.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally. === TEST SCRIPT BEGI

Re: [PATCH] iotests: drop group file

2020-03-24 Thread Vladimir Sementsov-Ogievskiy
24.03.2020 10:57, no-re...@patchew.org wrote: Patchew URL: https://patchew.org/QEMU/20200324074156.5330-1-vsement...@virtuozzo.com/ Hi, This series failed the docker-quick@centos7 build test. Please find the testing commands and their output below. If you have Docker installed, you can prob

[Bug 1815721] Re: RISC-V PLIC enable interrupt for multicore

2020-03-24 Thread RTOS Pharos
Hi, After some debugging (and luck), the problem (at least in the Virt board) was that the PLIC code inside QEMU addresses the core x 2 instead of just the core (core=hart). That is why it worked for core 0 (0x2 = 0) but for core 1 it has to address the PLIC memory area for core 2. For example, t

[PATCH v4 3/3] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write()

2020-03-24 Thread Chen Qun
Clang static code analyzer show warning: 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); ^ ~ hw/timer/exynos4210_mct.c:1399:9: warning: Value stored to 'index' i

[PATCH v4 0/3] redundant code: Fix warnings reported by Clang static code analyzer

2020-03-24 Thread Chen Qun
v1->v2: - Patch1: Add John Snow review comment. - Patch9: Move the 'dst_type' declaration to while() statement. - Patch12: Add Philippe Mathieu-Daud?? review comment. - Patch13: Move the 'set' declaration to the for() statement. v2->v3: - Patch1: Add Kevin Wolf review comment. - Patch2: Keep the '

[PATCH v4 2/3] display/blizzard: Remove redundant statement in blizzard_draw_line16_32()

2020-03-24 Thread Chen Qun
Clang static code analyzer show warning: hw/display/blizzard.c:940:9: warning: Value stored to 'data' is never read data >>= 5; ^~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Andrzej Zaborowski Cc: Peter Maydell --- hw/display/blizzard.c | 1 - 1 file cha

[PATCH v4 1/3] scsi/esp-pci: Remove redundant statement in esp_pci_io_write()

2020-03-24 Thread Chen Qun
Clang static code analyzer show warning: hw/scsi/esp-pci.c:198:9: warning: Value stored to 'size' is never read size = 4; ^ ~ Reported-by: Euler Robot Signed-off-by: Chen Qun --- Cc: Paolo Bonzini Cc:Fam Zheng v1->v2: keep ' size = 4' and add 'g_assert(size >= 4)' afte

Re: [PATCH v4 1/3] scsi/esp-pci: Remove redundant statement in esp_pci_io_write()

2020-03-24 Thread Laurent Vivier
Le 24/03/2020 à 09:22, Chen Qun a écrit : > Clang static code analyzer show warning: > hw/scsi/esp-pci.c:198:9: warning: Value stored to 'size' is never read > size = 4; > ^ ~ > > Reported-by: Euler Robot > Signed-off-by: Chen Qun > --- > Cc: Paolo Bonzini > Cc:Fam Zheng

Re: [PATCH 3/5] block: add max_pwrite_zeroes_no_fallback to BlockLimits

2020-03-24 Thread Vladimir Sementsov-Ogievskiy
14.03.2020 0:07, Eric Blake wrote: On 3/2/20 4:05 AM, Vladimir Sementsov-Ogievskiy wrote: NBD spec is updated, so that max_block doesn't relate to Maybe: The NBD spec was recently updated to clarify that max_block... NBD_CMD_WRITE_ZEROES with NBD_CMD_FLAG_FAST_ZERO (which mirrors Qemu flag B

Re: [PATCH v4 2/3] display/blizzard: Remove redundant statement in blizzard_draw_line16_32()

2020-03-24 Thread Laurent Vivier
Le 24/03/2020 à 09:22, Chen Qun a écrit : > Clang static code analyzer show warning: > hw/display/blizzard.c:940:9: warning: Value stored to 'data' is never read > data >>= 5; > ^~ > Reported-by: Euler Robot > Signed-off-by: Chen Qun > --- > Cc: Andrzej Zaborowski > Cc:

Re: [PATCH v4 2/3] display/blizzard: Remove redundant statement in blizzard_draw_line16_32()

2020-03-24 Thread Laurent Vivier
Le 24/03/2020 à 09:38, Laurent Vivier a écrit : > Le 24/03/2020 à 09:22, Chen Qun a écrit : >> Clang static code analyzer show warning: >> hw/display/blizzard.c:940:9: warning: Value stored to 'data' is never read >> data >>= 5; >> ^~ >> Reported-by: Euler Robot >> Signed

Re: [PATCH] block: make BlockConf.*_size properties 32-bit

2020-03-24 Thread Roman Kagan
On Mon, Mar 02, 2020 at 01:55:02PM +0300, Roman Kagan wrote: > On Thu, Feb 13, 2020 at 04:55:44PM +0300, Roman Kagan wrote: > > On Thu, Feb 13, 2020 at 06:47:10AM -0600, Eric Blake wrote: > > > On 2/13/20 2:01 AM, Roman Kagan wrote: > > > > On Wed, Feb 12, 2020 at 03:44:19PM -0600, Eric Blake wrote

Re: [PATCH] block: make BlockConf.*_size properties 32-bit

2020-03-24 Thread Kevin Wolf
Am 24.03.2020 um 09:55 hat Roman Kagan geschrieben: > On Mon, Mar 02, 2020 at 01:55:02PM +0300, Roman Kagan wrote: > > On Thu, Feb 13, 2020 at 04:55:44PM +0300, Roman Kagan wrote: > > > On Thu, Feb 13, 2020 at 06:47:10AM -0600, Eric Blake wrote: > > > > On 2/13/20 2:01 AM, Roman Kagan wrote: > > >

Re: [PATCH v4 0/2] introduction of migration_version attribute for VFIO live migration

2020-03-24 Thread Dr. David Alan Gilbert
* Yan Zhao (yan.y.z...@intel.com) wrote: > On Tue, Mar 24, 2020 at 05:29:59AM +0800, Alex Williamson wrote: > > On Mon, 3 Jun 2019 20:34:22 -0400 > > Yan Zhao wrote: > > > > > On Tue, Jun 04, 2019 at 03:29:32AM +0800, Alex Williamson wrote: > > > > On Thu, 30 May 2019 20:44:38 -0400 > > > > Yan Z

Re: [PATCH 4/5] block/io: fix bdrv_co_do_pwrite_zeroes head calculation

2020-03-24 Thread Vladimir Sementsov-Ogievskiy
14.03.2020 0:47, Eric Blake wrote: On 3/2/20 4:05 AM, Vladimir Sementsov-Ogievskiy wrote: It's wrong to update head using num in this place, as num may be reduced during the iteration, and we'll have wrong head value on next iteration. Instead update head at iteration end. Cc: qemu-sta...@nong

Re: Potential missing checks

2020-03-24 Thread Peter Maydell
On Mon, 23 Mar 2020 at 22:04, Mansour Ahmadi wrote: > > Hi QEMU developers, > > I noticed the following two potential missing checks by static analysis and > detecting inconsistencies on the source code of QEMU. here is the result: Hi. Can you provide more details of your analysis, please? "Mayb

Re: [PATCH] ext4: Give 32bit personalities 32bit hashes

2020-03-24 Thread Peter Maydell
On Tue, 24 Mar 2020 at 02:34, Theodore Y. Ts'o wrote: > Another possibility, which would be messier for qemu, would be use a > flag set via fcntl. That would require qemu from noticing when the > guest is calling open, openat, or openat2, and then inserting a fcntl > system call to set the 32-bit

[Bug 1867519] Re: qemu 4.2 segfaults on VF detach

2020-03-24 Thread Launchpad Bug Tracker
** Merge proposal linked: https://code.launchpad.net/~paelzer/ubuntu/+source/qemu/+git/qemu/+merge/381033 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1867519 Title: qemu 4.2 segfaults on VF d

Re: [PATCH] iotests: drop group file

2020-03-24 Thread Kevin Wolf
Am 24.03.2020 um 08:41 hat Vladimir Sementsov-Ogievskiy geschrieben: > When sending iotests to upstream or do patch porting from one branch > to another we very often have to resolve conflicts in group file, as > many absolutely independent features are intersecting by this file. > These conflicts

[PATCH] qemu: Do not include file if not exists

2020-03-24 Thread Oleksiy Obitotskyy
Script configure checks for if_alg.h and check failed but if_alg.h still included. Upstream-Status: Submitted [] Signed-off-by: Oleksiy Obitotskyy --- linux-user/syscall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 35f4146662..819774af

Re: [PATCH v15 Kernel 4/7] vfio iommu: Implementation of ioctl for dirty pages tracking.

2020-03-24 Thread Kirti Wankhede
On 3/24/2020 8:31 AM, Yan Zhao wrote: On Tue, Mar 24, 2020 at 02:51:14AM +0800, Dr. David Alan Gilbert wrote: * Alex Williamson (alex.william...@redhat.com) wrote: On Mon, 23 Mar 2020 23:24:37 +0530 Kirti Wankhede wrote: On 3/21/2020 12:29 AM, Alex Williamson wrote: On Sat, 21 Mar 2020 0

Re: [PULL for-5.0 0/1] Block patches

2020-03-24 Thread Peter Maydell
On Mon, 23 Mar 2020 at 19:24, Stefan Hajnoczi wrote: > > 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:

Re: Potential Null dereference

2020-03-24 Thread Kevin Wolf
Am 24.03.2020 um 08:14 hat Philippe Mathieu-Daudé geschrieben: > On 3/24/20 4:05 AM, Mansour Ahmadi wrote: > > Hi, > > > > Nullness of  needs to be checked here: > > https://github.com/qemu/qemu/blob/c532b954d96f96d361ca31308f75f1b95bd4df76/block/commit.c#L221 > > > > pstrcpy(bs->exact_filename,

Re: [PATCH] iotests: drop group file

2020-03-24 Thread Daniel P . Berrangé
On Tue, Mar 24, 2020 at 10:36:29AM +0100, Kevin Wolf wrote: > Am 24.03.2020 um 08:41 hat Vladimir Sementsov-Ogievskiy geschrieben: > > When sending iotests to upstream or do patch porting from one branch > > to another we very often have to resolve conflicts in group file, as > > many absolutely in

Re: [Qemu-devel] [PATCH v5 07/10] hw/rdma: Free all receive buffers when QP is destroyed

2020-03-24 Thread Yuval Shaia
On Mon, 23 Mar 2020 at 12:32, Peter Maydell wrote: > On Sun, 10 Mar 2019 at 09:25, Yuval Shaia wrote: > > > > When QP is destroyed the backend QP is destroyed as well. This ensures > > we clean all received buffer we posted to it. > > However, a contexts of these buffers are still remain in the

RE: [PATCH v1 04/22] hw/iommu: introduce HostIOMMUContext

2020-03-24 Thread Liu, Yi L
> From: Peter Xu > Sent: Tuesday, March 24, 2020 4:59 AM > To: Liu, Yi L > Subject: Re: [PATCH v1 04/22] hw/iommu: introduce HostIOMMUContext > > On Sun, Mar 22, 2020 at 05:36:01AM -0700, Liu Yi L wrote: [...] > > + > > +void host_iommu_ctx_init(void *_host_icx, size_t instance_size, > > +

RE: [PATCH v1 06/22] hw/pci: introduce pci_device_set/unset_iommu_context()

2020-03-24 Thread Liu, Yi L
> From: Peter Xu > Sent: Tuesday, March 24, 2020 5:15 AM > To: Liu, Yi L > Subject: Re: [PATCH v1 06/22] hw/pci: introduce > pci_device_set/unset_iommu_context() > > On Sun, Mar 22, 2020 at 05:36:03AM -0700, Liu Yi L wrote: > > [...] > > > +AddressSpace *pci_device_iommu_address_space(PCIDevic

Re: [PATCH] iotests: drop group file

2020-03-24 Thread Vladimir Sementsov-Ogievskiy
24.03.2020 12:36, Kevin Wolf wrote: Am 24.03.2020 um 08:41 hat Vladimir Sementsov-Ogievskiy geschrieben: When sending iotests to upstream or do patch porting from one branch to another we very often have to resolve conflicts in group file, as many absolutely independent features are intersecting

[PULL 1/5] target/i386: Renumber EXCP_SYSCALL

2020-03-24 Thread Laurent Vivier
From: Richard Henderson We are not short of numbers for EXCP_*. There is no need to confuse things by having EXCP_VMEXIT and EXCP_SYSCALL overlap, even though the former is only used for system mode and the latter is only used for user mode. Reviewed-by: Paolo Bonzini Reviewed-by: Alex Bennée

Re: [Qemu-devel] [PATCH v5 07/10] hw/rdma: Free all receive buffers when QP is destroyed

2020-03-24 Thread Yuval Shaia
On Tue, 24 Mar 2020 at 11:56, Yuval Shaia wrote: > > > On Mon, 23 Mar 2020 at 12:32, Peter Maydell > wrote: > >> On Sun, 10 Mar 2019 at 09:25, Yuval Shaia wrote: >> > >> > When QP is destroyed the backend QP is destroyed as well. This ensures >> > we clean all received buffer we posted to it. >

[PULL 2/5] linux-user/i386: Split out gen_signal

2020-03-24 Thread Laurent Vivier
From: Richard Henderson This is a bit tidier than open-coding the 5 lines necessary to initialize the target_siginfo_t. In addition, this zeros the remaining bytes of the target_siginfo_t, rather than passing in garbage. Reviewed-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philipp

[PULL 3/5] linux-user/i386: Emulate x86_64 vsyscalls

2020-03-24 Thread Laurent Vivier
From: Richard Henderson Notice the magic page during translate, much like we already do for the arm32 commpage. At runtime, raise an exception to return cpu_loop for emulation. Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson Message-Id: <20200213032223.14643-4-richard.hender...@li

[PULL 0/5] Linux user for 5.0 patches

2020-03-24 Thread Laurent Vivier
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: git://github.com/vivier/qemu.git tags/linux-user-for-5.0-pull-

[PULL 4/5] linux-user: Add x86_64 vsyscall page to /proc/self/maps

2020-03-24 Thread Laurent Vivier
From: Richard Henderson The page isn't (necessarily) present in the host /proc/self/maps, and even if it might be it isn't present in page_flags, and even if it was it might not have the same set of page permissions. The easiest thing to do, particularly when it comes to the "[vsyscall]" note at

Re: [PATCH] iotests: drop group file

2020-03-24 Thread Denis V. Lunev
On 3/24/20 12:36 PM, Kevin Wolf wrote: > Am 24.03.2020 um 08:41 hat Vladimir Sementsov-Ogievskiy geschrieben: >> When sending iotests to upstream or do patch porting from one branch >> to another we very often have to resolve conflicts in group file, as >> many absolutely independent features are i

[PULL 5/5] linux-user: Flush out implementation of gettimeofday

2020-03-24 Thread Laurent Vivier
From: Richard Henderson The first argument, timeval, is allowed to be NULL. The second argument, timezone, was missing. While its use is deprecated, it is still present in the syscall. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-Id:

Re: [PATCH] iotests: drop group file

2020-03-24 Thread Vladimir Sementsov-Ogievskiy
24.03.2020 12:51, Daniel P. Berrangé wrote: On Tue, Mar 24, 2020 at 10:36:29AM +0100, Kevin Wolf wrote: Am 24.03.2020 um 08:41 hat Vladimir Sementsov-Ogievskiy geschrieben: When sending iotests to upstream or do patch porting from one branch to another we very often have to resolve conflicts in

Re: [PATCH v2] migration: use "" instead of (null) for tls-authz

2020-03-24 Thread Dr. David Alan Gilbert
* Mao Zhongyi (maozhon...@cmss.chinamobile.com) wrote: > run: > (qemu) info migrate_parameters > announce-initial: 50 ms > ... > announce-max: 550 ms > multifd-compression: none > xbzrle-cache-size: 4194304 > max-postcopy-bandwidth: 0 > tls-authz: '(null)' > > Migration parameter 'tls-authz' is u

Re: [PATCH v2 07/12] tests/acceptance: Remove shebang header

2020-03-24 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Patch created mechanically by running: > > $ chmod 644 $(git grep -lF '#!/usr/bin/env python' \ > | xargs grep -L 'if __name__.*__main__') > $ sed -i "/^#\!\/usr\/bin\/\(env\ \)\?python.\?$/d" \ > $(git grep -lF '#!/usr/bin/env python' \ >

Re: [PATCH-for-5.0 v3] tests/migration: Reduce autoconverge initial bandwidth

2020-03-24 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > When using max-bandwidth=~100Mb/s, this test fails on Travis-CI > s390x when configured with --disable-tcg: > > $ make check-qtest > TESTcheck-qtest-s390x: tests/qtest/boot-serial-test > qemu-system-s390x: -accel tcg: invalid accelerator tcg > qemu

Re: [PATCH] iotests: drop group file

2020-03-24 Thread Daniel P . Berrangé
On Tue, Mar 24, 2020 at 01:02:18PM +0300, Vladimir Sementsov-Ogievskiy wrote: > 24.03.2020 12:36, Kevin Wolf wrote: > > Am 24.03.2020 um 08:41 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > When sending iotests to upstream or do patch porting from one branch > > > to another we very often have

Re: [PATCH] monitor/hmp-cmds: remove redundant check for tls_authz in hmp_info_migrate_parameters

2020-03-24 Thread Dr. David Alan Gilbert
* Mao Zhongyi (maozhon...@cmss.chinamobile.com) wrote: > 'params->has_tls_authz = true' has been hardcoded as true in > qmp_query_migrate_parameters, so remove the redundant check. > > Signed-off-by: Mao Zhongyi > --- > monitor/hmp-cmds.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [Bug 1815721] Re: RISC-V PLIC enable interrupt for multicore

2020-03-24 Thread Bin Meng
On Tue, Mar 24, 2020 at 4:20 PM RTOS Pharos <1815...@bugs.launchpad.net> wrote: > > Hi, > > After some debugging (and luck), the problem (at least in the Virt > board) was that the PLIC code inside QEMU addresses the core x 2 instead > of just the core (core=hart). That is why it worked for core 0

Re: [PATCH] iotests: drop group file

2020-03-24 Thread Kevin Wolf
Am 24.03.2020 um 11:21 hat Daniel P. Berrangé geschrieben: > On Tue, Mar 24, 2020 at 01:02:18PM +0300, Vladimir Sementsov-Ogievskiy wrote: > > 24.03.2020 12:36, Kevin Wolf wrote: > > > Am 24.03.2020 um 08:41 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > > When sending iotests to upstream or d

Re: [PATCH v5 57/60] target/riscv: vector slide instructions

2020-03-24 Thread LIU Zhiwei
On 2020/3/17 1:42, Richard Henderson wrote: On 3/16/20 1:04 AM, LIU Zhiwei wrote: As a preference, I think you can do away with this helper. Simply use the slideup helper with argument 1, and then afterwards store the integer register into element 0.  You should be able to re-use code from vm

[PATCH] hw/rdma: Lock before destroy

2020-03-24 Thread Yuval Shaia
To protect from the case that users of the protected_qlist are still using the qlist let's lock before detsroying it. Reported-by: Coverity (CID 1421951) Signed-off-by: Yuval Shaia --- hw/rdma/rdma_utils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/rdma/rdma_utils.c b/hw/rdma/rdma_ut

Re: [PATCH] iotests: Fix cleanup path in some tests

2020-03-24 Thread Max Reitz
On 24.02.20 18:16, Max Reitz wrote: > Some iotests leave behind some external data file when run for qcow2 > with -o data_file. Fix that. > > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/085 | 1 + > tests/qemu-iotests/087 | 6 ++ > tests/qemu-iotests/279 | 2 +- > 3 files changed, 8

Re: [PATCH v4 3/3] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write()

2020-03-24 Thread Laurent Vivier
Le 24/03/2020 à 09:22, Chen Qun a écrit : > Clang static code analyzer show warning: > 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); > ^ ~ > hw/timer/exyn

Re: [PULL 0/5] Linux user for 5.0 patches

2020-03-24 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200324100311.588288-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PULL 0/5] Linux user for 5.0 patches Message-id: 20200324100311.588288-1-laur...@vivier.eu Type: series =

Re: [PATCH] hw/rdma: Lock before destroy

2020-03-24 Thread Peter Maydell
On Tue, 24 Mar 2020 at 10:54, Yuval Shaia wrote: > > To protect from the case that users of the protected_qlist are still > using the qlist let's lock before detsroying it. > > Reported-by: Coverity (CID 1421951) > Signed-off-by: Yuval Shaia > --- > hw/rdma/rdma_utils.c | 1 + > 1 file changed,

Re: [PATCH] iotests/026: Move v3-exclusive test to new file

2020-03-24 Thread Max Reitz
On 11.03.20 15:07, Max Reitz wrote: > data_file does not work with v2, and we probably want 026 to keep > working for v2 images. Thus, open a new file for v3-exclusive error > path test cases. > > Fixes: 81311255f217859413c94f2cd9cebf2684bbda94 >(“iotests/026: Test EIO on allocation in a

Re: [PULL 0/5] Linux user for 5.0 patches

2020-03-24 Thread Laurent Vivier
Le 24/03/2020 à 12:00, no-re...@patchew.org a écrit : > Patchew URL: > https://patchew.org/QEMU/20200324100311.588288-1-laur...@vivier.eu/ > > > > Hi, > > This series seems to have some coding style problems. See output below for > more information: > > Subject: [PULL 0/5] Linux user for 5.0

Re: [PULL 0/7] ppc-for-5.0 queue 20200324

2020-03-24 Thread Peter Maydell
> > are available in the Git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-5.0-20200324 > > for you to fetch changes up to 1583794b9b36911df116cc726750dadbeeac506a: > > ppc/ppc405_boards: Remo

Re: Hot unplug disabling on pci-pci bridge

2020-03-24 Thread Igor Mammedov
On Tue, 24 Mar 2020 10:06:00 + Ani Sinha wrote: > Hi All : > > I have been playing with Qemu trying to disable hot-unplug capability for > conventional PCI. I have discussed this briefly on IRC and the plan is to > have an option on the pci-pci bridge that would disable SHPC and ACPI hotpl

答复: [question]vhost-user: atuo fix network link broken during migration

2020-03-24 Thread yangke (J)
> > We find an issue when host mce trigger openvswitch(dpdk) restart in > > source host during guest migration, > > > Did you mean the vhost-user netev was deleted from the source host? The vhost-user netev was not deleted from the source host. I mean that: in normal scenario, OVS(DPDK) begin to

backup transaction with io-thread core dumps

2020-03-24 Thread Dietmar Maurer
I get a core dump with backup transactions when using io-threads. To reproduce, create and start a VM with: # qemu-img create disk1.raw 100M # qemu-img create disk2.raw 100M #./x86_64-softmmu/qemu-system-x86_64 -chardev 'socket,id=qmp,path=/var/run/qemu-test.qmp,server,nowait' -mon 'chardev=qmp

RE: [PATCH v1 07/22] intel_iommu: add set/unset_iommu_context callback

2020-03-24 Thread Liu, Yi L
> From: Peter Xu > Sent: Tuesday, March 24, 2020 5:29 AM > To: Liu, Yi L > Subject: Re: [PATCH v1 07/22] intel_iommu: add set/unset_iommu_context > callback > > On Sun, Mar 22, 2020 at 05:36:04AM -0700, Liu Yi L wrote: > > This patch adds set/unset_iommu_context() impelementation in Intel > > vI

[PULL v2 4/5] linux-user: Add x86_64 vsyscall page to /proc/self/maps

2020-03-24 Thread Laurent Vivier
From: Richard Henderson The page isn't (necessarily) present in the host /proc/self/maps, and even if it might be it isn't present in page_flags, and even if it was it might not have the same set of page permissions. The easiest thing to do, particularly when it comes to the "[vsyscall]" note at

Re: Hot unplug disabling on pci-pci bridge

2020-03-24 Thread Igor Mammedov
On Tue, 24 Mar 2020 10:06:00 + Ani Sinha wrote: [...] > > To that end, I have been experimenting with Qemu using the patch I attach > below. I have attached the virtio balloon driver with bus 1 which is attached > to the pci bridge. Following is the libvirt 4.5 xml snippet which I am using:

[PULL v2 0/5] Linux user for 5.0 patches

2020-03-24 Thread Laurent Vivier
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: git://github.com/vivier/qemu.git tags/linux-user-for-5.0-pull-

Re: [PATCH] hw/rdma: Lock before destroy

2020-03-24 Thread Marcel Apfelbaum
Hi Peter,Yuval On 3/24/20 1:05 PM, Peter Maydell wrote: On Tue, 24 Mar 2020 at 10:54, Yuval Shaia wrote: To protect from the case that users of the protected_qlist are still using the qlist let's lock before detsroying it. Reported-by: Coverity (CID 1421951) Signed-off-by: Yuval Shaia ---

[PULL v2 1/5] target/i386: Renumber EXCP_SYSCALL

2020-03-24 Thread Laurent Vivier
From: Richard Henderson We are not short of numbers for EXCP_*. There is no need to confuse things by having EXCP_VMEXIT and EXCP_SYSCALL overlap, even though the former is only used for system mode and the latter is only used for user mode. Reviewed-by: Paolo Bonzini Reviewed-by: Alex Bennée

[PULL v2 2/5] linux-user/i386: Split out gen_signal

2020-03-24 Thread Laurent Vivier
From: Richard Henderson This is a bit tidier than open-coding the 5 lines necessary to initialize the target_siginfo_t. In addition, this zeros the remaining bytes of the target_siginfo_t, rather than passing in garbage. Reviewed-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philipp

[PULL v2 3/5] linux-user/i386: Emulate x86_64 vsyscalls

2020-03-24 Thread Laurent Vivier
From: Richard Henderson Notice the magic page during translate, much like we already do for the arm32 commpage. At runtime, raise an exception to return cpu_loop for emulation. Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson Message-Id: <20200213032223.14643-4-richard.hender...@li

[PULL v2 5/5] linux-user: Flush out implementation of gettimeofday

2020-03-24 Thread Laurent Vivier
From: Richard Henderson The first argument, timeval, is allowed to be NULL. The second argument, timezone, was missing. While its use is deprecated, it is still present in the syscall. Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-Id:

RE: [PATCH v1 09/22] vfio/common: check PASID alloc/free availability

2020-03-24 Thread Liu, Yi L
> From: Peter Xu > Sent: Tuesday, March 24, 2020 6:07 AM > To: Liu, Yi L > Subject: Re: [PATCH v1 09/22] vfio/common: check PASID alloc/free availability > > On Sun, Mar 22, 2020 at 05:36:06AM -0700, Liu Yi L wrote: > > [...] > > > @@ -1256,11 +1334,19 @@ static int vfio_init_container(VFIOCon

Re: [PATCH] hw/rdma: Lock before destroy

2020-03-24 Thread Peter Maydell
On Tue, 24 Mar 2020 at 11:18, Marcel Apfelbaum wrote: > > Hi Peter,Yuval > > On 3/24/20 1:05 PM, Peter Maydell wrote: > > So I think we require that the user of a protected-qlist > > ensures that there are no more users of it before it is > > destroyed (which is fairly normal semantics), and the c

Re: [PATCH] hw/rdma: Lock before destroy

2020-03-24 Thread Yuval Shaia
On Tue, 24 Mar 2020 at 13:18, Marcel Apfelbaum wrote: > Hi Peter,Yuval > > On 3/24/20 1:05 PM, Peter Maydell wrote: > > On Tue, 24 Mar 2020 at 10:54, Yuval Shaia > wrote: > >> To protect from the case that users of the protected_qlist are still > >> using the qlist let's lock before detsroying i

RE: [PATCH v4 2/3] display/blizzard: Remove redundant statement in blizzard_draw_line16_32()

2020-03-24 Thread Chenqun (kuhn)
>-Original Message- >From: Laurent Vivier [mailto:laur...@vivier.eu] >Sent: Tuesday, March 24, 2020 4:40 PM >To: Chenqun (kuhn) ; qemu-devel@nongnu.org; >qemu-triv...@nongnu.org >Cc: Zhanghailiang ; phi...@redhat.com; >Euler Robot ; Andrzej Zaborowski >; Peter Maydell >Subject: Re: [PATCH

Re: Hot unplug disabling on pci-pci bridge

2020-03-24 Thread Ani Sinha
> On Mar 24, 2020, at 4:38 PM, Igor Mammedov wrote: > > question is do you need to disable only unplug side both > (plug+unplug) operations (like we did with PCIE)? I need to disable the unplug side only. Ani

Re: [PATCH] hw/rdma: Lock before destroy

2020-03-24 Thread Peter Maydell
On Tue, 24 Mar 2020 at 11:25, Yuval Shaia wrote: > As i already said, current code makes sure it will not happen > however it better that API will ensure this and will not trust callers. I agree with the principle, but I think that here there is no way to do it -- if you are literally destroying

Re: Potential Null dereference

2020-03-24 Thread Vladimir Sementsov-Ogievskiy
24.03.2020 12:50, Kevin Wolf wrote: Am 24.03.2020 um 08:14 hat Philippe Mathieu-Daudé geschrieben: On 3/24/20 4:05 AM, Mansour Ahmadi wrote: Hi, Nullness of  needs to be checked here: https://github.com/qemu/qemu/blob/c532b954d96f96d361ca31308f75f1b95bd4df76/block/commit.c#L221 pstrcpy(bs->ex

Re: [PATCH] qcow2: Forbid discard in qcow2 v2 images with backing files

2020-03-24 Thread Max Reitz
On 23.03.20 20:44, Alberto Garcia wrote: > A discard request deallocates the selected clusters so they read back > as zeroes. This is done by clearing the cluster offset field and > setting QCOW_OFLAG_ZERO in the L2 entry. > > This flag is however only supported when qcow_version >= 3. In older >

[PATCH for-5.0] hw/ppc/e500.c: Handle qemu_find_file() failure

2020-03-24 Thread Peter Maydell
If qemu_find_file() doesn't find the BIOS it returns NULL; we were passing that unchecked through to load_elf(), which assumes a non-NULL pointer and may misbehave. In practice it fails with a weird message: $ qemu-system-ppc -M ppce500 -display none -kernel nonesuch Bad address qemu-system-

Re: Xen guest broken following "use memdev for RAM" patch

2020-03-24 Thread Igor Mammedov
On Mon, 23 Mar 2020 17:10:39 + Anthony PERARD wrote: > 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

[PATCH v2] qcow2: Forbid discard in qcow2 v2 images with backing files

2020-03-24 Thread Alberto Garcia
A discard request deallocates the selected clusters so they read back as zeroes. This is done by clearing the cluster offset field and setting QCOW_OFLAG_ZERO in the L2 entry. This flag is however only supported when qcow_version >= 3. In older images the cluster is simply deallocated, exposing an

[PULL 1/6] block: Avoid memleak on qcow2 image info failure

2020-03-24 Thread Max Reitz
From: Eric Blake 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 Message-Id: <20200320183620.1112123-1-ebl...@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Andrey Shinkevich Te

Re: [PULL v2 0/5] Linux user for 5.0 patches

2020-03-24 Thread Peter Maydell
On Tue, 24 Mar 2020 at 11:18, Laurent Vivier wrote: > > 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:

[PULL 5/6] iotests: Fix cleanup path in some tests

2020-03-24 Thread Max Reitz
Some iotests leave behind some external data file when run for qcow2 with -o data_file. Fix that. Signed-off-by: Max Reitz Message-Id: <20200224171631.384314-1-mre...@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Max Reitz --- tests/qemu-iotests/085 | 1 + tests/qemu-iotests/087 | 6

[PULL 3/6] block: bdrv_set_backing_bs: fix use-after-free

2020-03-24 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy There is a use-after-free possible: bdrv_unref_child() leaves bs->backing freed but not NULL. bdrv_attach_child may produce nested polling loop due to drain, than access of freed pointer is possible. I've produced the following crash on 30 iotest with modified

[PULL 2/6] block: Assert BlockDriver::format_name is not NULL

2020-03-24 Thread Max Reitz
From: Philippe Mathieu-Daudé 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: Philippe Mathieu-Daudé Message-Id:

[PULL 4/6] block/qcow2: zero data_file child after free

2020-03-24 Thread Max Reitz
From: Vladimir Sementsov-Ogievskiy data_file being NULL doesn't seem to be a correct state, but it's better than dead pointer and simpler to debug. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20200316060631.30052-3-vsement...@virtuozzo.com> Reviewed-by: John Snow Signed-off-by: Ma

[PULL 6/6] iotests/026: Move v3-exclusive test to new file

2020-03-24 Thread Max Reitz
data_file does not work with v2, and we probably want 026 to keep working for v2 images. Thus, open a new file for v3-exclusive error path test cases. Fixes: 81311255f217859413c94f2cd9cebf2684bbda94 (“iotests/026: Test EIO on allocation in a data-file”) Signed-off-by: Max Reitz Message-Id

RE: [PATCH v4 3/3] timer/exynos4210_mct: Remove redundant statement in exynos4210_mct_write()

2020-03-24 Thread Chenqun (kuhn)
>-Original Message- >From: Laurent Vivier [mailto:laur...@vivier.eu] >Sent: Tuesday, March 24, 2020 6:59 PM >To: Chenqun (kuhn) ; qemu-devel@nongnu.org; >qemu-triv...@nongnu.org >Cc: Zhanghailiang ; phi...@redhat.com; >Euler Robot ; Igor Mitsyanko >; Peter Maydell >Subject: Re: [PATCH v4 3

[PULL 0/6] Block patches for 5.0-rc0

2020-03-24 Thread Max Reitz
The following changes since commit f1e748d27996e0cd8269db837a32e453dd55930a: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2020-03-23 20:54:24 +) are available in the Git repository at: https://github.com/XanClic/qemu.git tags/pull-block-2020-03-2

[PATCH for-5.0, v1] target/mips: Fix loongson multimedia condition instructions

2020-03-24 Thread Jiaxun Yang
Loongson multimedia condition instructions were previously implemented as write 0 to rd due to lack of documentation. So I just confirmed with Loongson about their encoding and implemented them correctly. Signed-off-by: Jiaxun Yang Acked-by: Huacai Chen --- v1: Use deposit opreations according t

Re: [PULL 0/5] Linux user for 5.0 patches

2020-03-24 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200324100311.588288-1-laur...@vivier.eu/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PULL 0/5] Linux user for 5.0 patches Message-id: 20200324100311.588288-1-laur...@vivier.eu Type: series =

Re: [PULL v2 0/5] Linux user for 5.0 patches

2020-03-24 Thread Laurent Vivier
Le 24/03/2020 à 13:20, Peter Maydell a écrit : > On Tue, 24 Mar 2020 at 11:18, Laurent Vivier wrote: >> >> The following changes since commit 29e0855c5af62bbb0b0b6fed792e004dad92ba95: >> >> Merge remote-tracking branch 'remotes/elmarco/tags/slirp-pull-request' >> into staging (2020-03-22 21:00:

Re: Potential Null dereference

2020-03-24 Thread Vladimir Sementsov-Ogievskiy
24.03.2020 14:59, Vladimir Sementsov-Ogievskiy wrote: 24.03.2020 12:50, Kevin Wolf wrote: Am 24.03.2020 um 08:14 hat Philippe Mathieu-Daudé geschrieben: On 3/24/20 4:05 AM, Mansour Ahmadi wrote: Hi, Nullness of  needs to be checked here: https://github.com/qemu/qemu/blob/c532b954d96f96d361ca3

Re: [PATCH v2] qcow2: Forbid discard in qcow2 v2 images with backing files

2020-03-24 Thread Max Reitz
On 24.03.20 13:16, Alberto Garcia wrote: > A discard request deallocates the selected clusters so they read back > as zeroes. This is done by clearing the cluster offset field and > setting QCOW_OFLAG_ZERO in the L2 entry. > > This flag is however only supported when qcow_version >= 3. In older >

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

2020-03-24 Thread Philippe Mathieu-Daudé
On 3/23/20 5:15 PM, Alex Bennée wrote: 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 +

Re: [PATCH] hw/rdma: Lock before destroy

2020-03-24 Thread Yuval Shaia
On Tue, 24 Mar 2020 at 13:25, Peter Maydell wrote: > On Tue, 24 Mar 2020 at 11:18, Marcel Apfelbaum > wrote: > > > > Hi Peter,Yuval > > > > On 3/24/20 1:05 PM, Peter Maydell wrote: > > > So I think we require that the user of a protected-qlist > > > ensures that there are no more users of it bef

Re: [PATCH v2 5/8] hw/arm/fsl-imx6: Connect watchdog interrupts

2020-03-24 Thread Philippe Mathieu-Daudé
On 3/22/20 10:19 PM, Guenter Roeck wrote: With this patch applied, the watchdog in the sabrelite emulation is fully operational, including pretimeout support. Signed-off-by: Guenter Roeck --- v2: No change hw/arm/fsl-imx6.c | 9 + 1 file changed, 9 insertions(+) diff --git a/hw/arm

Re: [PATCH v2 6/8] hw/arm/fsl-imx6ul: Connect watchdog interrupts

2020-03-24 Thread Philippe Mathieu-Daudé
On 3/22/20 10:19 PM, Guenter Roeck wrote: With this commit, the watchdog on mcimx6ul-evk is fully operational, including pretimeout support. Signed-off-by: Guenter Roeck --- v2: No change hw/arm/fsl-imx6ul.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/arm/fsl-imx6ul.c

Re: [PATCH] hw/rdma: Lock before destroy

2020-03-24 Thread Yuval Shaia
On Tue, 24 Mar 2020 at 13:55, Peter Maydell wrote: > On Tue, 24 Mar 2020 at 11:25, Yuval Shaia > wrote: > > As i already said, current code makes sure it will not happen > > however it better that API will ensure this and will not trust callers. > > I agree with the principle, but I think that h

Re: Potential Null dereference

2020-03-24 Thread Kevin Wolf
Am 24.03.2020 um 13:37 hat Vladimir Sementsov-Ogievskiy geschrieben: > 24.03.2020 14:59, Vladimir Sementsov-Ogievskiy wrote: > > Aha, new crashes! Let's look at them. > > > > 41 and 155 failed with crash, 141 without but I see "+{"error": {"class": > > "GenericError", "desc": "Block device drv0 i

Re: [PATCH for-5.0] hw/ppc/e500.c: Handle qemu_find_file() failure

2020-03-24 Thread Philippe Mathieu-Daudé
On 3/24/20 1:12 PM, Peter Maydell wrote: If qemu_find_file() doesn't find the BIOS it returns NULL; we were passing that unchecked through to load_elf(), which assumes a non-NULL pointer and may misbehave. In practice it fails with a weird message: $ qemu-system-ppc -M ppce500 -display none -

  1   2   3   4   >