RE: [PATCH 1/3] net/colo-compare.c: Create event_bh with the right AioContext

2020-04-22 Thread Zhang, Chen
> -Original Message- > From: Lukas Straub > Sent: Wednesday, April 22, 2020 4:43 PM > To: Zhang, Chen > Cc: qemu-devel ; Li Zhijian > ; Jason Wang ; Marc- > André Lureau ; Paolo Bonzini > > Subject: Re: [PATCH 1/3] net/colo-compare.c: Create event_bh with the right > AioContext > > On

Re: [PATCH v2 20/36] tcg: Remove movi and dupi opcodes

2020-04-22 Thread Aleksandar Markovic
среда, 22. април 2020., Richard Henderson је написао/ла: > These are now completely covered by mov from a > TYPE_CONST temporary. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Aleksandar Markovic > include/tcg/tcg-opc.h| 3 --- > tcg/aarch64/tcg-target.inc.c | 3 --- >

Re: [RFC v1 2/4] vhost-vdpa: introduce vhost-vdpa net client

2020-04-22 Thread Cindy Lu
On Tue, Apr 21, 2020 at 11:47 PM Laurent Vivier wrote: > > On 20/04/2020 11:32, Cindy Lu wrote: > > This patch set introduces a new net client type: vhost-vdpa. > > vhost-vdpa net client will set up a vDPA device which is svhostdevpecified > > by a "vhostdev" parameter. > > > > Author: Tiwei Bie >

Re: [RFC v1 3/4] vhost-vdpa: implement vhost-vdpa backend

2020-04-22 Thread Cindy Lu
On Tue, Apr 21, 2020 at 11:54 PM Laurent Vivier wrote: > > On 20/04/2020 11:32, Cindy Lu wrote: > > Currently we have 2 types of vhost backends in QEMU: vhost kernel and > > vhost-user. The above patch provides a generic device for vDPA purpose, > > this vDPA device exposes to user space a non-ven

Re: [PATCH 1/3] net/colo-compare.c: Create event_bh with the right AioContext

2020-04-22 Thread Lukas Straub
On Wed, 22 Apr 2020 09:03:00 + "Zhang, Chen" wrote: > > -Original Message- > > From: Lukas Straub > > Sent: Wednesday, April 22, 2020 4:43 PM > > To: Zhang, Chen > > Cc: qemu-devel ; Li Zhijian > > ; Jason Wang ; Marc- > > André Lureau ; Paolo Bonzini > > > > Subject: Re: [PATCH 1/

Re: [PATCH] roms: opensbi: Upgrade from v0.6 to v0.7

2020-04-22 Thread Bin Meng
On Wed, Apr 22, 2020 at 4:15 PM Philippe Mathieu-Daudé wrote: > > On 4/22/20 3:30 AM, Bin Meng wrote: > > Hi Alistair, > > > > On Tue, Apr 21, 2020 at 9:34 AM Bin Meng wrote: > >> > >> Hi Alistair, > >> > >> On Tue, Apr 21, 2020 at 2:41 AM Alistair Francis > >> wrote: > >>> > >>> On Mon, Apr 20

[PATCH 0/5] ramfb: a bunch of reverts and fixes

2020-04-22 Thread Gerd Hoffmann
Even though these are bugfixes this is probably 5.1 material at this point ... Gerd Hoffmann (5): Revert "hw/display/ramfb: initialize fw-config space with xres/ yres" Revert "hw/display/ramfb: lock guest resolution after it's set" ramfb: don't update RAMFBState on errors ramfb: add sanity

[PATCH 3/5] ramfb: don't update RAMFBState on errors

2020-04-22 Thread Gerd Hoffmann
Store width & height & surface in local variables. Update RAMFBState with the new values only in case the ramfb_create_display_surface() call succeeds. Signed-off-by: Gerd Hoffmann --- hw/display/ramfb.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --gi

[PATCH 4/5] ramfb: add sanity checks to ramfb_create_display_surface

2020-04-22 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/display/ramfb.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/display/ramfb.c b/hw/display/ramfb.c index fbe959147dc9..d1b1cb9bb294 100644 --- a/hw/display/ramfb.c +++ b/hw/display/ramfb.c @@ -15,6 +15,7 @@ #include "qapi/error.h" #include "hw/

[PATCH 1/5] Revert "hw/display/ramfb: initialize fw-config space with xres/ yres"

2020-04-22 Thread Gerd Hoffmann
This reverts commit f79081b4b71b72640bedd40a7cd76f864c8287f1. Patch has broken byteorder handling: RAMFBCfg fields are in bigendian byteorder, the reset function doesn't care so native byteorder is used instead. Given this went unnoticed so far the feature is obviously unused, so just revert the

[PATCH 2/5] Revert "hw/display/ramfb: lock guest resolution after it's set"

2020-04-22 Thread Gerd Hoffmann
This reverts commit a9e0cb67b7f4c485755659f9b764c38b5f970de4. This breaks OVMF. Reproducer: Just hit 'ESC' at early boot to enter firmware setup. OVMF wants switch from (default) 800x600 to 640x480 for that, and this patch blocks it. Cc: Hou Qiming Signed-off-by: Gerd Hoffmann --- hw/display

Re: [PATCH] roms: opensbi: Upgrade from v0.6 to v0.7

2020-04-22 Thread Philippe Mathieu-Daudé
On 4/22/20 11:50 AM, Bin Meng wrote: On Wed, Apr 22, 2020 at 4:15 PM Philippe Mathieu-Daudé wrote: On 4/22/20 3:30 AM, Bin Meng wrote: Hi Alistair, On Tue, Apr 21, 2020 at 9:34 AM Bin Meng wrote: Hi Alistair, On Tue, Apr 21, 2020 at 2:41 AM Alistair Francis wrote: On Mon, Apr 20, 2020

[PATCH 5/5] ramfb: drop leftover debug message

2020-04-22 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- hw/display/ramfb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/display/ramfb.c b/hw/display/ramfb.c index d1b1cb9bb294..be884c9ea837 100644 --- a/hw/display/ramfb.c +++ b/hw/display/ramfb.c @@ -88,8 +88,6 @@ static void ramfb_fw_cfg_write(void *dev, of

Re: [PATCH v2 27/36] tcg: Fix integral argument type to tcg_gen_rot[rl]i_i{32, 64}

2020-04-22 Thread Philippe Mathieu-Daudé
On 4/22/20 3:17 AM, Richard Henderson wrote: > For the benefit of compatibility of function pointer types, > we have standardized on int32_t and int64_t as the integral > argument to tcg expanders. > > We converted most of them in 474b2e8f0f7, but missed the rotates. > > Signed-off-by: Richard He

Re: [PATCH 3/5] ramfb: don't update RAMFBState on errors

2020-04-22 Thread Philippe Mathieu-Daudé
On 4/22/20 12:02 PM, Gerd Hoffmann wrote: Store width & height & surface in local variables. Update RAMFBState with the new values only in case the ramfb_create_display_surface() call succeeds. Signed-off-by: Gerd Hoffmann --- hw/display/ramfb.c | 25 - 1 file change

Re: [PATCH 5/5] ramfb: drop leftover debug message

2020-04-22 Thread Philippe Mathieu-Daudé
On 4/22/20 12:02 PM, Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann --- hw/display/ramfb.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/hw/display/ramfb.c b/hw/display/ramfb.c index d1b1cb9bb294..be884c9ea837 100644 --- a/hw/display/ramfb.c +++ b/hw/display/ramfb.c @@ -88,8 +88,6 @

[PATCH] vfio-helpers: Free QEMUVFIOState in qemu_vfio_close()

2020-04-22 Thread Michal Privoznik
The qemu_vfio_open_pci() allocates this QEMUVFIOState structure but free counterpart is missing. Since we already have qemu_vfio_close() which does cleanup of the state, it looks like a perfect place to free the structure too. However, to avoid confusing rename the function to make it explicit that

Re: [PATCH v3 7/7] vfio-ccw: Add support for the CRW irq

2020-04-22 Thread Cornelia Huck
On Fri, 17 Apr 2020 04:34:40 +0200 Eric Farman wrote: > From: Farhan Ali > > The CRW irq will be used by vfio-ccw to notify the userspace > about any CRWs the userspace needs to handle. Let's add support > for it. > > Signed-off-by: Farhan Ali > Signed-off-by: Eric Farman > --- > > Notes: >

Re: [PATCH] Add a new PIIX option to control PCI hot unplugging of devices on non-root buses

2020-04-22 Thread Ani Sinha
> On Apr 21, 2020, at 8:32 PM, Daniel P. Berrangé wrote: > > On Tue, Apr 21, 2020 at 02:45:04PM +, Ani Sinha wrote: >> >> >>> On Apr 20, 2020, at 8:32 PM, Michael S. Tsirkin wrote: >>> >>> But I for one would like to focus on keeping PIIX stable >>> and focus development on q35. Not bl

Re: [PATCH] virtio-vga: fix virtio-vga bar ordering

2020-04-22 Thread Gerd Hoffmann
> This fix exchange the modern io bar with the modern memory bar, > replacing the msix bar that is never impacted anyway. Well, msix was placed in bar 4 intentionally. That keeps bar 1 (default msix location) free, so we have the option to turn bar 0 (vga compat vram) into a 64bit bar without shu

Re: [PATCH] virtio-vga: fix virtio-vga bar ordering

2020-04-22 Thread Gerd Hoffmann
On Wed, Apr 22, 2020 at 02:04:36AM -0400, Michael S. Tsirkin wrote: > On Tue, Apr 21, 2020 at 11:48:53PM +0200, Anthoine Bourgeois wrote: > > With virtio-vga, pci bar are reordered. Bar #2 is used for compatibility > > with stdvga. By default, bar #2 is used by virtio modern io bar. > > This bar is

Re: [PATCH 0/5] ramfb: a bunch of reverts and fixes

2020-04-22 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200422100211.30614-1-kra...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH 0/5] ramfb: a bunch of reverts and fixes Message-id: 20200422100211.30614-1-kra...@redhat.com Type: s

Re: [PATCH v4 19/30] qcow2: Add subcluster support to zero_in_l2_slice()

2020-04-22 Thread Vladimir Sementsov-Ogievskiy
17.03.2020 21:16, Alberto Garcia wrote: Setting the QCOW_OFLAG_ZERO bit of the L2 entry is forbidden if an image has subclusters. Instead, the individual 'all zeroes' bits must be used. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz anyway: Reviewed-by: Vladimir Sementsov-Ogievskiy s

Re: [PATCH] fuzz: select fuzz target using executable name

2020-04-22 Thread Darren Kenny
Hi Alex, On Tuesday, 2020-04-21 at 14:22:30 -04, Alexander Bulekov wrote: > The fuzzers are built into a binary (e.g. qemu-fuzz-i386). To select the > device to fuzz/fuzz target, we usually use the --fuzz-target= argument. > This commit allows the fuzz-target to be specified using the name of the

Re: [PATCH v2 09/36] tcg: Consolidate 3 bits into enum TCGTempKind

2020-04-22 Thread Alex Bennée
Richard Henderson writes: > The temp_fixed, temp_global, temp_local bits are all related. > Combine them into a single enumeration. > > Signed-off-by: Richard Henderson > --- > include/tcg/tcg.h | 20 +--- > tcg/optimize.c| 8 +-- > tcg/tcg.c | 122 +

Re: [PATCH] vfio-helpers: Free QEMUVFIOState in qemu_vfio_close()

2020-04-22 Thread Philippe Mathieu-Daudé
Hi Michal, On 4/22/20 12:30 PM, Michal Privoznik wrote: The qemu_vfio_open_pci() allocates this QEMUVFIOState structure but free counterpart is missing. Since we already have qemu_vfio_close() which does cleanup of the state, it looks like a perfect place to free the structure too. However, to a

Re: [PATCH v2 10/36] tcg: Add temp_readonly

2020-04-22 Thread Alex Bennée
Richard Henderson writes: > In most, but not all, places that we check for TEMP_FIXED, > we are really testing that we do not modify the temporary. > > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée

Re: [PATCH v4 20/30] qcow2: Add subcluster support to discard_in_l2_slice()

2020-04-22 Thread Vladimir Sementsov-Ogievskiy
17.03.2020 21:16, Alberto Garcia wrote: Two changes are needed in this function: 1) A full discard deallocates a cluster so we can skip the operation if it is already unallocated. With extended L2 entries however if any of the subclusters has the 'all zeroes' bit set then we have to

Re: [PATCH v3 3/7] vfio-ccw: Add support for the schib region

2020-04-22 Thread Cornelia Huck
On Fri, 17 Apr 2020 04:34:36 +0200 Eric Farman wrote: > From: Farhan Ali > > The schib region can be used to obtain the latest SCHIB from the host > passthrough subchannel. Since the guest SCHIB is virtualized, > we currently only update the path related information so that the > guest is aware

Re: [PATCH v3 06/10] iotests: add testfinder.py

2020-04-22 Thread Kevin Wolf
Am 22.04.2020 um 07:35 hat Vladimir Sementsov-Ogievskiy geschrieben: > 21.04.2020 19:56, Kevin Wolf wrote: > > Am 21.04.2020 um 09:35 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > Add python script with new logic of searching for tests: > > > > > > Current ./check behavior: > > > - tests a

Re: [PATCH v4 18/30] qcow2: Add subcluster support to qcow2_get_host_offset()

2020-04-22 Thread Alberto Garcia
On Wed 22 Apr 2020 10:07:30 AM CEST, Vladimir Sementsov-Ogievskiy wrote: >> +static int count_contiguous_subclusters(BlockDriverState *bs, int >> nb_clusters, >> +unsigned sc_index, uint64_t >> *l2_slice, >> +int l2_i

Re: [PATCH v4 21/30] qcow2: Add subcluster support to check_refcounts_l2()

2020-04-22 Thread Vladimir Sementsov-Ogievskiy
17.03.2020 21:16, Alberto Garcia wrote: Setting the QCOW_OFLAG_ZERO bit of the L2 entry is forbidden if an image has subclusters. Instead, the individual 'all zeroes' bits must be used. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Patch itself seems correct.. Still, would be good als

Re: [PATCH v3 3/7] vfio-ccw: Add support for the schib region

2020-04-22 Thread Eric Farman
On 4/22/20 7:36 AM, Cornelia Huck wrote: > On Fri, 17 Apr 2020 04:34:36 +0200 > Eric Farman wrote: > >> From: Farhan Ali >> >> The schib region can be used to obtain the latest SCHIB from the host >> passthrough subchannel. Since the guest SCHIB is virtualized, >> we currently only update the

Re: [PATCH v4 18/30] qcow2: Add subcluster support to qcow2_get_host_offset()

2020-04-22 Thread Vladimir Sementsov-Ogievskiy
22.04.2020 14:54, Alberto Garcia wrote: On Wed 22 Apr 2020 10:07:30 AM CEST, Vladimir Sementsov-Ogievskiy wrote: +static int count_contiguous_subclusters(BlockDriverState *bs, int nb_clusters, +unsigned sc_index, uint64_t *l2_slice, +

Re: [PATCH v4 22/30] qcow2: Fix offset calculation in handle_dependencies()

2020-04-22 Thread Vladimir Sementsov-Ogievskiy
17.03.2020 21:16, Alberto Garcia wrote: l2meta_cow_start() and l2meta_cow_end() are not necessarily cluster-aligned if the image has subclusters, so update the calculation of old_start and old_end to guarantee that no two requests try to write on the same cluster. Signed-off-by: Alberto Garcia

[PATCH for-5.0?] target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU

2020-04-22 Thread Peter Maydell
In commit 41a4bf1feab098da4cd the added code to set the CNP field in ID_MMFR4 for the AArch64 'max' CPU had a typo where it used the wrong variable name, resulting in ID_MMFR4 fields AC2, XNX and LSM being wrong. Fix the typo. Fixes: 41a4bf1feab098da4cd Reported-by: Laurent Desnogues Signed-off-b

Re: [PATCH for-5.0?] target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU

2020-04-22 Thread Edgar E. Iglesias
On Wed, Apr 22, 2020 at 01:45:01PM +0100, Peter Maydell wrote: > In commit 41a4bf1feab098da4cd the added code to set the CNP > field in ID_MMFR4 for the AArch64 'max' CPU had a typo > where it used the wrong variable name, resulting in ID_MMFR4 > fields AC2, XNX and LSM being wrong. Fix the typo. >

Re: [PATCH for-5.0?] slirp: update to fix CVE-2020-1983

2020-04-22 Thread Peter Maydell
On Tue, 21 Apr 2020 at 20:19, Peter Maydell wrote: > > On Tue, 21 Apr 2020 at 18:03, Marc-André Lureau > wrote: > > > > This is an update on the stable-4.2 branch of libslirp.git: > > > > git shortlog 55ab21c9a3..2faae0f778f81 > > > > Marc-André Lureau (1): > > Fix use-afte-free in ip_reass

Re: [PATCH v3 06/10] iotests: add testfinder.py

2020-04-22 Thread Vladimir Sementsov-Ogievskiy
22.04.2020 14:53, Kevin Wolf wrote: Am 22.04.2020 um 07:35 hat Vladimir Sementsov-Ogievskiy geschrieben: 21.04.2020 19:56, Kevin Wolf wrote: Am 21.04.2020 um 09:35 hat Vladimir Sementsov-Ogievskiy geschrieben: Add python script with new logic of searching for tests: Current ./check behavior:

Re: [PATCH v4 19/30] qcow2: Add subcluster support to zero_in_l2_slice()

2020-04-22 Thread Alberto Garcia
On Wed 22 Apr 2020 01:06:42 PM CEST, Vladimir Sementsov-Ogievskiy wrote: >> @@ -1897,7 +1897,7 @@ static int zero_in_l2_slice(BlockDriverState *bs, >> uint64_t offset, > > As I see, function is not prepared to handle unaligned offset. Worth > add an assertion while being here? The only caller alr

Re: [PATCH for-5.0?] target/arm: Fix ID_MMFR4 value on AArch64 'max' CPU

2020-04-22 Thread Laurent Desnogues
On Wed, Apr 22, 2020 at 2:45 PM Peter Maydell wrote: > > In commit 41a4bf1feab098da4cd the added code to set the CNP > field in ID_MMFR4 for the AArch64 'max' CPU had a typo > where it used the wrong variable name, resulting in ID_MMFR4 > fields AC2, XNX and LSM being wrong. Fix the typo. > > Fixe

Re: [PATCH v3 06/10] iotests: add testfinder.py

2020-04-22 Thread Kevin Wolf
Am 22.04.2020 um 14:49 hat Vladimir Sementsov-Ogievskiy geschrieben: > 22.04.2020 14:53, Kevin Wolf wrote: > > Am 22.04.2020 um 07:35 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > 21.04.2020 19:56, Kevin Wolf wrote: > > > > Am 21.04.2020 um 09:35 hat Vladimir Sementsov-Ogievskiy geschrieben:

[PATCH v2 00/14] Miscellaneous error handling fixes

2020-04-22 Thread Markus Armbruster
Maintainers decide whether any of these are serious enough to still go into 5.0. I doubt it. v2: * PATCH 12-14: New Markus Armbruster (14): cryptodev: Fix cryptodev_builtin_cleanup() error API violation block/file-posix: Fix check_cache_dropped() error handling cpus: Fix configure_icount()

[PATCH v2 06/14] fdc: Fix fallback=auto error handling

2020-04-22 Thread Markus Armbruster
fdctrl_realize_common() rejects fallback=auto. Used by devices "isa-fdc", "sysbus-fdc", "SUNW,fdtwo". The error handling is broken: $ qemu-system-x86_64 -nodefaults -device isa-fdc,fallback=auto,driveA=fd0 -drive if=none,id=fd0 ** ERROR:/work/armbru/qemu/hw/block/fdc.c:434:pick_driv

[PATCH v2 01/14] cryptodev: Fix cryptodev_builtin_cleanup() error API violation

2020-04-22 Thread Markus Armbruster
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. cryptodev_builtin_cle

[PATCH v2 05/14] arm/virt: Fix virt_machine_device_plug_cb() error API violation

2020-04-22 Thread Markus Armbruster
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. virt_machine_device_p

[PATCH v2 09/14] xen/pt: Fix flawed conversion to realize()

2020-04-22 Thread Markus Armbruster
The conversion of xen_pt_initfn() to xen_pt_realize() blindly replaced XEN_PT_ERR() by error_setg(). Several error conditions that did not fail xen_pt_initfn() now fail xen_pt_realize(). Unsurprisingly, the cleanup on these errors looks highly suspicious. Revert the inappropriate replacements.

[PATCH v2 13/14] qga: Fix qmp_guest_get_memory_blocks() error handling

2020-04-22 Thread Markus Armbruster
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. qmp_guest_get_memory_

[PATCH v2 12/14] tests/test-logging: Fix test for -dfilter 0..0xffffffffffffffff

2020-04-22 Thread Markus Armbruster
Fixes: 58e19e6e7914354242a67442d0006f9e31684d1a Signed-off-by: Markus Armbruster --- tests/test-logging.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-logging.c b/tests/test-logging.c index 6387e4933f..8580b82420 100644 --- a/tests/test-logging.c +++ b/tests/

[PATCH v2 02/14] block/file-posix: Fix check_cache_dropped() error handling

2020-04-22 Thread Markus Armbruster
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. check_cache_dropped()

[PATCH v2 14/14] qga: Fix qmp_guest_suspend_{disk, ram}() error handling

2020-04-22 Thread Markus Armbruster
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second qmp_guest_suspend_disk() an

[PATCH v2 10/14] io: Fix qio_channel_socket_close() error handling

2020-04-22 Thread Markus Armbruster
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. qio_channel_socket_cl

[PATCH v2 03/14] cpus: Fix configure_icount() error API violation

2020-04-22 Thread Markus Armbruster
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. configure_icount() is

[PATCH v2 11/14] migration/colo: Fix qmp_xen_colo_do_checkpoint() error handling

2020-04-22 Thread Markus Armbruster
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. qmp_xen_colo_do_check

Re: [PATCH v2 13/14] qga: Fix qmp_guest_get_memory_blocks() error handling

2020-04-22 Thread Eric Blake
On 4/22/20 8:07 AM, Markus Armbruster wrote: The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to N

[PATCH v2 07/14] bochs-display: Fix vgamem=SIZE error handling

2020-04-22 Thread Markus Armbruster
bochs_display_realize() rejects out-of-range vgamem. The error handling is broken: $ qemu-system-x86_64 -S -display none -monitor stdio QEMU 4.2.93 monitor - type 'help' for more information (qemu) device_add bochs-display,vgamem=1 Error: bochs-display: video memory too small

[PATCH v2 08/14] virtio-net: Fix duplex=... and speed=... error handling

2020-04-22 Thread Markus Armbruster
virtio_net_device_realize() rejects invalid duplex and speed values. The error handling is broken: $ ../qemu/bld-sani/x86_64-softmmu/qemu-system-x86_64 -S -display none -monitor stdio QEMU 4.2.93 monitor - type 'help' for more information (qemu) device_add virtio-net,duplex=x Erro

Re: [PATCH v2 14/14] qga: Fix qmp_guest_suspend_{disk, ram}() error handling

2020-04-22 Thread Eric Blake
On 4/22/20 8:07 AM, Markus Armbruster wrote: The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to N

[PATCH v2 04/14] cpus: Proper range-checking for -icount shift=N

2020-04-22 Thread Markus Armbruster
timers_state.icount_time_shift must be in [0,63] to avoid undefined behavior when shifting by it, e.g. in cpu_icount_to_ns(). icount_adjust() clamps it to [0,MAX_ICOUNT_SHIFT], with MAX_ICOUNT_SHIFT = 10. configure_icount() doesn't. Fix that. Fixes: a8bfac37085c3372366d722f131a7e18d664ee4d Cc: P

[PATCHv2] add optee dts entry for secure machine

2020-04-22 Thread Maxim Uvarov
Add optee compatible string for dtb to force linux to boot optee module. Signed-off-by: Maxim Uvarov --- v2: added method. hw/arm/virt.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 656b008..c937a82 100644 --- a/hw/arm/virt.c +++ b/

Re: [PATCH] roms: opensbi: Upgrade from v0.6 to v0.7

2020-04-22 Thread Bin Meng
On Wed, Apr 22, 2020 at 6:04 PM Philippe Mathieu-Daudé wrote: > > On 4/22/20 11:50 AM, Bin Meng wrote: > > On Wed, Apr 22, 2020 at 4:15 PM Philippe Mathieu-Daudé > > wrote: > >> > >> On 4/22/20 3:30 AM, Bin Meng wrote: > >>> Hi Alistair, > >>> > >>> On Tue, Apr 21, 2020 at 9:34 AM Bin Meng wrote

[PATCH v3 7/9] hw/gpio/aspeed_gpio: Remove dead assignment

2020-04-22 Thread Philippe Mathieu-Daudé
Fix warning reported by Clang static code analyzer: hw/gpio/aspeed_gpio.c:717:18: warning: Value stored to 'g_idx' during its initialization is never read int set_idx, g_idx = *group_idx; ^ ~~ Reported-by: Clang Static Analyzer Reviewed-by: Cédric Le Goat

[PATCH v3 6/9] hw/isa/i82378: Remove dead assignment

2020-04-22 Thread Philippe Mathieu-Daudé
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 'isa' is never read isa = isa_create_simple(isabus, "i82374");

[PATCH v3 0/9] misc: Trivial static code analyzer fixes

2020-04-22 Thread Philippe Mathieu-Daudé
Fix trivial warnings reported by the Clang static code analyzer. Only patch #2 'blockdev: Remove dead assignment' misses review. The official Clang static code analyzer documentation is on: https://clang-analyzer.llvm.org/ On Fedora I simply used it as: $ sudo dnf install clang-analyzer $ .

[PATCH v3 4/9] hw/input/adb-kbd: Remove dead assignment

2020-04-22 Thread Philippe Mathieu-Daudé
Since commit 5a1f49718 the 'olen' variable is not really used. Remove it to fix a warning reported by Clang static code analyzer: CC hw/input/adb-kbd.o hw/input/adb-kbd.c:200:5: warning: Value stored to 'olen' is never read olen = 0; ^ ~ Fixes: 5a1f49718 (adb: add supp

[PATCH v3 3/9] hw/i2c/pm_smbus: Remove dead assignment

2020-04-22 Thread Philippe Mathieu-Daudé
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-by: Clang Static Analyzer Reviewed-by: Alistair Francis Signed-off-by: Philippe

[PATCH v3 2/9] blockdev: Remove dead assignment

2020-04-22 Thread Philippe Mathieu-Daudé
Fix warning reported by Clang static code analyzer: CC blockdev.o blockdev.c:2744:5: warning: Value stored to 'ret' is never read ret = blk_truncate(blk, size, false, PREALLOC_MODE_OFF, errp); ^ ~~~ Reported-by: Clang

[PATCH v3 5/9] hw/ide/sii3112: Remove dead assignment

2020-04-22 Thread Philippe Mathieu-Daudé
Fix warning reported by Clang static code analyzer: CC hw/ide/sii3112.o hw/ide/sii3112.c:204:9: warning: Value stored to 'val' is never read val = 0; ^ ~ Fixes: a9dd6604 Reported-by: Clang Static Analyzer Reviewed-by: BALATON Zoltan Acked-by: John Snow Signed-

[PATCH v3 1/9] block: Avoid dead assignment

2020-04-22 Thread Philippe Mathieu-Daudé
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); ^ ~ Fixes: 462f5bcf6 Reported-by: Clang Stati

Re: [PATCH v2 12/14] tests/test-logging: Fix test for -dfilter 0..0xffffffffffffffff

2020-04-22 Thread Philippe Mathieu-Daudé
Hi Markus, On 4/22/20 3:07 PM, Markus Armbruster wrote: Fixes: 58e19e6e7914354242a67442d0006f9e31684d1a Signed-off-by: Markus Armbruster --- tests/test-logging.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test-logging.c b/tests/test-logging.c index 6387e493

[PATCH v3 9/9] hw/timer/pxa2xx_timer: Add assertion to silent static analyzer warning

2020-04-22 Thread Philippe Mathieu-Daudé
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 *t = (PXA2xxTimer4 *) opaque; 428 PXA2xxTimerInfo *i = (PXA2xxTimerInfo *

[PATCH v3 8/9] hw/timer/stm32f2xx_timer: Remove dead assignment

2020-04-22 Thread Philippe Mathieu-Daudé
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; ^ ~ Reported-by: Clang Static Analyzer Reviewed-by: Alistair Francis

Re: [PATCH v2 14/14] qga: Fix qmp_guest_suspend_{disk, ram}() error handling

2020-04-22 Thread Philippe Mathieu-Daudé
On 4/22/20 3:07 PM, Markus Armbruster wrote: The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to N

Re: [PATCH 2/4] smbus: Fix spd_data_generate() error API violation

2020-04-22 Thread BALATON Zoltan
On Tue, 21 Apr 2020, Markus Armbruster wrote: BALATON Zoltan writes: On Mon, 20 Apr 2020, Markus Armbruster wrote: The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in be

Re: [PATCH 5/9] block/io: expand in_flight inc/dec section: simple cases

2020-04-22 Thread Vladimir Sementsov-Ogievskiy
20.04.2020 19:22, Stefan Hajnoczi wrote: On Wed, Apr 08, 2020 at 12:30:47PM +0300, Vladimir Sementsov-Ogievskiy wrote: It's safer to expand in_flight request to start before enter to Please explain what exeactly "safer" means. If I understand correctly this is just a refactoring and does not

[PATCH v2 1/4] sam460ex: Suppress useless warning on -m 32 and -m 64

2020-04-22 Thread Markus Armbruster
Requesting 32 or 64 MiB of RAM with the sam460ex machine type produces a useless warning: qemu-system-ppc: warning: Memory size is too small for SDRAM type, adjusting type This is because sam460ex_init() asks spd_data_generate() for DDR2, which is impossible, so spd_data_generate() corrects

[PATCH v2 4/4] smbus: Fix spd_data_generate() for number of banks > 2

2020-04-22 Thread Markus Armbruster
spd_data_generate() splits @ram_size bytes into @nbanks RAM banks of 1 << sz_log2 MiB each, like this: size = ram_size >> 20; /* work in terms of megabytes */ [...] nbanks = 1; while (sz_log2 > max_log2 && nbanks < 8) { sz_log2--; nbanks++; } Each iteration hal

[PATCH v2 3/4] bamboo, sam460ex: Tidy up error message for unsupported RAM size

2020-04-22 Thread Markus Armbruster
Improve $ ppc-softmmu/qemu-system-ppc -M sam460ex -m 4096 qemu-system-ppc: Max 1 banks of 2048 ,1024 ,512 ,256 ,128 ,64 ,32 MB DIMM/bank supported qemu-system-ppc: Possible valid RAM size: 2048 to qemu-system-ppc: at most 1 bank of 2048, 1024, 512, 256, 128, 64, 32 MiB each sup

[PATCH v2 2/4] smbus: Fix spd_data_generate() error API violation

2020-04-22 Thread Markus Armbruster
The Error ** argument must be NULL, &error_abort, &error_fatal, or a pointer to a variable containing NULL. Passing an argument of the latter kind twice without clearing it in between is wrong: if the first call sets an error, it no longer points to NULL for the second call. spd_data_generate() c

[PATCH v2 0/4] smbus: SPD fixes

2020-04-22 Thread Markus Armbruster
v2: * PATCH 1: Do not revert commit 08fd99179a's silent change of memory type [Zoltan] * PATCH 3: Improve error message some more [Philippe] Markus Armbruster (4): sam460ex: Suppress useless warning on -m 32 and -m 64 smbus: Fix spd_data_generate() error API violation bamboo, sam460ex: Tid

Re: [PATCH 1/4] sam460ex: Revert change to SPD memory type for <= 128 MiB

2020-04-22 Thread BALATON Zoltan
On Tue, 21 Apr 2020, Markus Armbruster wrote: BALATON Zoltan writes: On Mon, 20 Apr 2020, Markus Armbruster wrote: Requesting 32 or 64 MiB of RAM with the sam460ex machine type produces a useless warning: qemu-system-ppc: warning: Memory size is too small for SDRAM type, adjusting type

Re: [PATCH v10 0/10] qemu-binfmt-conf.sh

2020-04-22 Thread Unai Martinez Corral
Hi, I'd like to request this patchset to be kept on hold. As discussed in https://github.com/dbhi/qus/issues/4, the current "family-based" logic of 'qemu-binfmt-conf.sh' does not work for aarch64-only hosts. It is assumed that all aarch64 hosts can natively execute arm or armhf binaries. However,

[PATCH v2] target/arm: Implement SVE2 FMMLA

2020-04-22 Thread Stephen Long
Signed-off-by: Stephen Long I'm guessing endianness doesn't matter because we are writing to the corresponding 32-bit/64-bit in the destination register. --- target/arm/cpu.h | 10 + target/arm/helper-sve.h| 3 +++ target/arm/sve.decode | 4 target/arm/sve_helpe

[PATCH v2] target/arm: Implement SVE2 scatter store insns

2020-04-22 Thread Stephen Long
Add decoding logic for SVE2 64-bit/32-bit scatter non-temporal store insns. 64-bit * STNT1B (vector plus scalar) * STNT1H (vector plus scalar) * STNT1W (vector plus scalar) * STNT1D (vector plus scalar) 32-bit * STNT1B (vector plus scalar) * STNT1H (vector plus scalar) * STNT1W (vector plus scala

Re: [PATCH v2 3/4] bamboo, sam460ex: Tidy up error message for unsupported RAM size

2020-04-22 Thread BALATON Zoltan
On Wed, 22 Apr 2020, Markus Armbruster wrote: Improve $ ppc-softmmu/qemu-system-ppc -M sam460ex -m 4096 qemu-system-ppc: Max 1 banks of 2048 ,1024 ,512 ,256 ,128 ,64 ,32 MB DIMM/bank supported qemu-system-ppc: Possible valid RAM size: 2048 to qemu-system-ppc: at most 1 bank of 204

[Bug 1874264] [NEW] AIX 7.2 TL4 SP1 cannot IPL with QEMU >2.11.2 ppc64-softmmu

2020-04-22 Thread Kenneth Salerno via
Public bug reported: kens@LAPTOP-JN77KAC2$ qemu-system-ppc64 -version QEMU emulator version 4.2.93 (v5.0.0-rc3-8-g3119154db0-dirty) Copyright (c) 2003-2020 Fabrice Bellard and the QEMU Project developers qemu-system-ppc64 \ -name "IBM AIX - IBM POWER9" \ -M pseries \ -cpu POWER9 \ -smp 8

<    1   2   3