[Bug 1805256] Re: qemu-img hangs on rcu_call_ready_event logic in Aarch64 when converting images

2020-06-30 Thread Christian Ehrhardt 
This will re-open again for Bionic due to bug 1885419 forcing a revert of the former backports. After a deeper evaluation if the assert is wrong in the backport or just flagging a problem formerly already existing in Bionic this will be re-fixed. ** Changed in: qemu (Ubuntu Bionic) Status

Re: [PATCH v1 09/10] vhost-vdpa: introduce vhost-vdpa backend

2020-06-30 Thread Maxime Coquelin
On 6/22/20 5:37 PM, 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-vendor-specific configuration > interface for setting up a vhost HW

Re: [REPORT] [GSoC - TCG Continuous Benchmarking] [#2] Dissecting QEMU Into Three Main Parts

2020-06-30 Thread Ahmed Karaman
On Tue, Jun 30, 2020 at 6:34 AM Lukáš Doktor wrote: > > Dne 29. 06. 20 v 12:25 Ahmed Karaman napsal(a): > > Hi, > > > > The second report of the TCG Continuous Benchmarking series builds > > upon the QEMU performance metrics calculated in the previous report. > > This report presents a method to d

Re: [PATCH 3/6] target/riscv: Check for LEGAL NaN-boxing

2020-06-30 Thread Chih-Min Chao
On Sat, Jun 27, 2020 at 5:05 AM LIU Zhiwei wrote: > A narrow n-bit operation, where n < FLEN, checks that input operands > are correctly NaN-boxed, i.e., all upper FLEN - n bits are 1. > If so, the n least-significant bits of the input are used as the input > value, > otherwise the input value is

Re: [PATCH v2 2/2] target/m68k: consolidate physical translation offset into get_physical_address()

2020-06-30 Thread Laurent Vivier
Le 30/06/2020 à 08:10, Mark Cave-Ayland a écrit : > Since all callers to get_physical_address() now apply the same page offset to > the translation result, move the logic into get_physical_address() itself to > avoid duplication. > > Suggested-by: Philippe Mathieu-Daudé > Signed-off-by: Mark Cave

Re: [REPORT] [GSoC - TCG Continuous Benchmarking] [#2] Dissecting QEMU Into Three Main Parts

2020-06-30 Thread Ahmed Karaman
On Tue, Jun 30, 2020 at 7:59 AM 罗勇刚(Yonggang Luo) wrote: > > Wonderful work, May I reproduce the work on my local machine? > > On Mon, Jun 29, 2020 at 6:26 PM Ahmed Karaman > wrote: >> >> Hi, >> >> The second report of the TCG Continuous Benchmarking series builds >> upon the QEMU performance me

Re: [PATCH 5/6] target/riscv: Flush not valid NaN-boxing input to canonical NaN

2020-06-30 Thread Chih-Min Chao
On Sat, Jun 27, 2020 at 5:09 AM LIU Zhiwei wrote: > Signed-off-by: LIU Zhiwei > --- > target/riscv/insn_trans/trans_rvd.inc.c | 7 +- > target/riscv/insn_trans/trans_rvf.inc.c | 272 > 2 files changed, 235 insertions(+), 44 deletions(-) > > diff --git a/target/riscv/i

Re: [PATCH 3/6] target/riscv: Check for LEGAL NaN-boxing

2020-06-30 Thread LIU Zhiwei
On 2020/6/30 15:20, Chih-Min Chao wrote: On Sat, Jun 27, 2020 at 5:05 AM LIU Zhiwei > wrote: A narrow n-bit operation, where n < FLEN, checks that input operands are correctly NaN-boxed, i.e., all upper FLEN - n bits are 1. If so, the n least-signifi

Re: [PATCH 5/6] target/riscv: Flush not valid NaN-boxing input to canonical NaN

2020-06-30 Thread LIU Zhiwei
On 2020/6/30 15:31, Chih-Min Chao wrote: On Sat, Jun 27, 2020 at 5:09 AM LIU Zhiwei > wrote: Signed-off-by: LIU Zhiwei mailto:zhiwei_...@c-sky.com>> ---  target/riscv/insn_trans/trans_rvd.inc.c |   7 +-  target/riscv/insn_trans/trans_rvf.inc.c | 272

[PATCH] hw/net/can: Add missing fallthrough statements

2020-06-30 Thread Thomas Huth
Add fallthrough annotations to be able to compile the code without warnings when using -Wimplicit-fallthrough in our CFLAGS. Looking at the code, it seems like the fallthrough is indeed intended here, so the comments should be appropriate. Signed-off-by: Thomas Huth --- hw/net/can/can_sja1000.c

[PATCH] target/i386: Correct the warning message of Intel PT

2020-06-30 Thread Luwei Kang
The CPUID level need to be set to 0x14 manually on old machine-type if Intel PT is enabled in guest. E.g. the CPUID[0].EAX(level)=7 and CPUID[7].EBX[25](intel-pt)=1 when the Qemu with "-machine pc-i440fx-3.1 -cpu qemu64,+intel-pt" parameter. This patch corrects the warning message of the previous

Re: [PULL 00/63] riscv-to-apply queue

2020-06-30 Thread Thomas Huth
On 30/06/2020 08.56, LIU Zhiwei wrote: On 2020/6/29 6:51, Alistair Francis wrote: On Sun, Jun 28, 2020 at 7:30 AM Peter Maydell wrote: On Fri, 26 Jun 2020 at 22:53, Alistair Francis wrote: The following changes since commit 553cf5d7c47bee05a3dec9461c1f8430316d516b:    Merge remote-tracki

[PATCH 2/7] hw/mips/malta: Register the machine as a TypeInfo

2020-06-30 Thread Philippe Mathieu-Daudé
We want to add more machines. First convert from the old DEFINE_MACHINE() API to the more recent DEFINE_TYPES(TypeInfo[]) one. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 20 ++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/hw/mips/malta.c b/hw/

[PATCH 0/7] hw/mips/malta: Rework to allow more than 2GB of RAM on 64-bit

2020-06-30 Thread Philippe Mathieu-Daudé
Hi, Following Jiaxun Yang's patch and discussion: https://patchwork.kernel.org/patch/11416915/ - Rename the current machine as 'malta-virt' (keeping 'malta' aliased) Suggestions for better names are welcome, maybe 'malta-unreal' or 'malta-unleashed' instead? - Add 'malta-phys' which respects

[PATCH 3/7] hw/mips/malta: Rename 'malta' machine as 'malta-virt'

2020-06-30 Thread Philippe Mathieu-Daudé
We want to model the real physical Malta board. The current model does not have the physical restrictions real hardware have. Rename the current machine as 'malta-virt'. To not disrupt command line users, keep the 'malta' machine name as an alias. Signed-off-by: Philippe Mathieu-Daudé --- hw/mip

[PATCH 4/7] hw/mips/malta: Introduce MaltaMachineClass::max_ramsize

2020-06-30 Thread Philippe Mathieu-Daudé
The maximum RAM size is tied to the machine. First add the MaltaMachineClass, and add 'max_ramsize' to it. Set it to the current value of 2 GB, and adapt the code checking for the requested RAM is usable by the machine. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 31 +

[PATCH 1/7] hw/mips/malta: Trivial code movement

2020-06-30 Thread Philippe Mathieu-Daudé
Trivial code movement to make the next patch easier to review. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index d95926a89c..5b371c1e34 100644 --- a/hw/mips/malta.c

[PATCH 5/7] hw/mips/malta: Introduce the 'malta-phys' machine

2020-06-30 Thread Philippe Mathieu-Daudé
Introduce the 'malta-phys' machine, aiming to have the same limitations as real hardware. Start by restricting the RAM to 1GB, which is the maximum amount of memory the GT-64120A north bridge can address. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 21 + 1 fil

Re: [PATCH] hw/misc/pca9552: Add missing TypeInfo::class_size field

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/29/20 11:07 PM, Peter Maydell wrote: > On Mon, 29 Jun 2020 at 08:47, Philippe Mathieu-Daudé wrote: >> >> When adding the generic PCA955xClass in commit 736132e455, we >> forgot to set the class_size field. Fill it now to avoid: > > Thanks; I've applied this to master since it fixes a memory

[PATCH 6/7] hw/mips/malta: Verify malta-phys machine uses correct DIMM sizes

2020-06-30 Thread Philippe Mathieu-Daudé
The machine has 4 DIMM slots. Each DIMM must be a power of 2. Add a check the total RAM is a good combination of DIMMs. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 013bf9272c..57

[PATCH 7/7] hw/mips/malta: Allow more than 2GB on 64-bit malta-virt

2020-06-30 Thread Philippe Mathieu-Daudé
Since we don't respect the hardware restrictions, there is no good reason to limit the maximum amount of RAM to 2GB. Suggested-by: Yunqiang Su Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/malta.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/mips/malta.c b/hw/mip

Re: [REPORT] [GSoC - TCG Continuous Benchmarking] [#2] Dissecting QEMU Into Three Main Parts

2020-06-30 Thread Aleksandar Markovic
уто, 30. јун 2020. у 09:30 Ahmed Karaman је написао/ла: > > On Tue, Jun 30, 2020 at 7:59 AM 罗勇刚(Yonggang Luo) > wrote: > > > > Wonderful work, May I reproduce the work on my local machine? > > > > On Mon, Jun 29, 2020 at 6:26 PM Ahmed Karaman > > wrote: > >> > >> Hi, > >> > >> The second repor

Re: [PATC 7/9] Skipping drm build, unsupported

2020-06-30 Thread Gerd Hoffmann
On Tue, Jun 30, 2020 at 08:44:24AM +0200, Philippe Mathieu-Daudé wrote: > +Gerd > > On 6/29/20 11:48 PM, David CARLIER wrote: > > From 157a0374093371719de42e99364352d64190f52a Mon Sep 17 00:00:00 2001 > > From: David Carlier > > Date: Mon, 29 Jun 2020 22:20:06 + > > Subject: [PATCH 7/9] Skip

Re: [RFC v2 1/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-06-30 Thread Jason Wang
On 2020/6/30 上午10:41, Jason Wang wrote: On 2020/6/29 下午9:34, Peter Xu wrote: On Mon, Jun 29, 2020 at 01:51:47PM +0800, Jason Wang wrote: On 2020/6/28 下午10:47, Peter Xu wrote: On Sun, Jun 28, 2020 at 03:03:41PM +0800, Jason Wang wrote: On 2020/6/27 上午5:29, Peter Xu wrote: Hi, Eugenio, (CC

Re: [PATCH 2/5] hw/i2c: Rename i2c_try_create_slave() as i2c_slave_new()

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/29/20 11:37 PM, BALATON Zoltan wrote: > On Mon, 29 Jun 2020, Philippe Mathieu-Daudé wrote: >> We use "new" names for functions that allocate and initialize >> device objects: pci_new(), isa_new(), usb_new(). >> Let's call this one i2c_slave_new(). Since we have to update >> all the callers, al

Re: [PATCH] hw/block/nvme: Align I/O BAR to 4 KiB

2020-06-30 Thread Philippe Mathieu-Daudé
Hi Klaus, On 6/25/20 8:23 PM, Klaus Jensen wrote: > On Jun 25 17:48, Philippe Mathieu-Daudé wrote: >> Simplify the NVMe emulated device by aligning the I/O BAR to 4 KiB. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> include/block/nvme.h | 3 +++ >> hw/block/nvme.c | 5 ++--- >> 2 fi

[PATCH] iotests.py: Do not wait() before communicate()

2020-06-30 Thread Max Reitz
Waiting on a process for which we have a pipe will stall if the process outputs more data than fits into the OS-provided buffer. We must use communicate() before wait(), and in fact, communicate() perfectly replaces wait() already. We have to drop the stderr=subprocess.STDOUT parameter from subpr

Re: [PATCH v2 0/3] virtiofsd capability changes and addition

2020-06-30 Thread Stefan Hajnoczi
On Mon, Jun 29, 2020 at 12:54:17PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Hi, > This is a set of changes relating to the capability restirctions > introduced in virtiofsd back in a59feb483b8. > > The first one is a potentially important fix; the missin

Re: [PULL 00/63] riscv-to-apply queue

2020-06-30 Thread LIU Zhiwei
On 2020/6/30 16:11, Thomas Huth wrote: On 30/06/2020 08.56, LIU Zhiwei wrote: On 2020/6/29 6:51, Alistair Francis wrote: On Sun, Jun 28, 2020 at 7:30 AM Peter Maydell wrote: On Fri, 26 Jun 2020 at 22:53, Alistair Francis wrote: The following changes since commit 553cf5d7c47bee05a3dec94

[PATCH 1/4] migration: Prevent memleak by ...params_test_apply

2020-06-30 Thread Max Reitz
The created structure is not really a proper QAPI object, so we cannot and will not free its members. Strings therein should therefore not be duplicated, or we will leak them. Signed-off-by: Max Reitz --- migration/migration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --gi

[PATCH 4/4] iotests: Test node/bitmap aliases during migration

2020-06-30 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/300 | 487 + tests/qemu-iotests/300.out | 5 + tests/qemu-iotests/group | 1 + 3 files changed, 493 insertions(+) create mode 100755 tests/qemu-iotests/300 create mode 100644 tests/qemu-iotests/300.out

[PATCH 2/4] migration: Add block-bitmap-mapping parameter

2020-06-30 Thread Max Reitz
This migration parameter allows mapping block node names and bitmap names to aliases for the purpose of block dirty bitmap migration. This way, management tools can use different node and bitmap names on the source and destination and pass the mapping of how bitmaps are to be transferred to qemu (

Re: [PATCH] hw/block/nvme: Align I/O BAR to 4 KiB

2020-06-30 Thread Klaus Jensen
On Jun 30 10:35, Philippe Mathieu-Daudé wrote: > Hi Klaus, > > On 6/25/20 8:23 PM, Klaus Jensen wrote: > > On Jun 25 17:48, Philippe Mathieu-Daudé wrote: > >> Simplify the NVMe emulated device by aligning the I/O BAR to 4 KiB. > >> > >> Signed-off-by: Philippe Mathieu-Daudé > >> --- > >> include

[PATCH 3/4] iotests.py: Add wait_for_runstate()

2020-06-30 Thread Max Reitz
Signed-off-by: Max Reitz --- tests/qemu-iotests/iotests.py | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index ef739dd1e3..32f262db5a 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -799,6 +7

[PATCH 0/4] migration: Add block-bitmap-mapping parameter

2020-06-30 Thread Max Reitz
RFC v1: https://lists.nongnu.org/archive/html/qemu-block/2020-05/msg00912.html RFC v2: https://lists.nongnu.org/archive/html/qemu-block/2020-05/msg00915.html Branch: https://github.com/XanClic/qemu.git migration-bitmap-mapping-v1 Branch: https://git.xanclic.moe/XanClic/qemu.git migration-bitmap-ma

Re: [PATCH v5 00/12] pc-bios: s390x: Cleanup part 1

2020-06-30 Thread Thomas Huth
On 24/06/2020 12.57, Janosch Frank wrote: On 6/24/20 12:46 PM, Thomas Huth wrote: On 24/06/2020 12.44, Cornelia Huck wrote: On Wed, 24 Jun 2020 03:52:14 -0400 Janosch Frank wrote: The bios is in dire need for a cleanup as there are still a lot of magic constants being used throughout as well

Re: [PATCH] util/coroutine: Cleanup start_switch_fiber_ for TSAN.

2020-06-30 Thread Stefan Hajnoczi
On Mon, Jun 29, 2020 at 05:04:19PM +0100, Alex Bennée wrote: > > Stefan Hajnoczi writes: > > > On Fri, Jun 26, 2020 at 01:00:01PM -0400, Robert Foley wrote: > >> This is a cleanup patch to follow-up the patch which introduced TSAN. > >> This patch makes separate start_switch_fiber_ functions for

Re: [PATC 7/9] Skipping drm build, unsupported

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 10:23 AM, Gerd Hoffmann wrote: > On Tue, Jun 30, 2020 at 08:44:24AM +0200, Philippe Mathieu-Daudé wrote: >> +Gerd >> >> On 6/29/20 11:48 PM, David CARLIER wrote: >>> From 157a0374093371719de42e99364352d64190f52a Mon Sep 17 00:00:00 2001 >>> From: David Carlier >>> Date: Mon, 29 Jun 202

Re: [PATCH 05/19] iotests.py: Add (verify|has)_working_luks()

2020-06-30 Thread Max Reitz
On 29.06.20 12:12, Maxim Levitsky wrote: > On Thu, 2020-06-25 at 14:55 +0200, Max Reitz wrote: >> Similar to _require_working_luks for bash tests, these functions can be >> used to check whether our luks driver can actually create images. >> >> Signed-off-by: Max Reitz >> --- >> tests/qemu-iotest

Re: [PATCH 06/19] iotests: Check whether luks works

2020-06-30 Thread Max Reitz
On 29.06.20 14:03, Maxim Levitsky wrote: > On Thu, 2020-06-25 at 14:55 +0200, Max Reitz wrote: >> Whenever running an iotest for the luks format, we should check whether >> luks actually really works. >> >> Tests that try to create luks-encrypted qcow2 images should do the same. >> >> Signed-off-by

Re: [PATCH 5/7] hw/mips/malta: Introduce the 'malta-phys' machine

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 10:13 AM, Philippe Mathieu-Daudé wrote: > Introduce the 'malta-phys' machine, aiming to have the same > limitations as real hardware. Start by restricting the RAM > to 1GB, which is the maximum amount of memory the GT-64120A > north bridge can address. Oops wrong comment, it ended mixed

Re: [PATCH 15/19] iotests: qemu-img tests for luks key management

2020-06-30 Thread Max Reitz
On 29.06.20 14:05, Maxim Levitsky wrote: > On Thu, 2020-06-25 at 14:55 +0200, Max Reitz wrote: >> From: Maxim Levitsky >> >> This commit adds two tests, which test the new amend interface >> of both luks raw images and qcow2 luks encrypted images. >> >> Signed-off-by: Maxim Levitsky >> Reviewed-b

Re: [PATCH v1 09/10] vhost-vdpa: introduce vhost-vdpa backend

2020-06-30 Thread Cindy Lu
On Tue, Jun 30, 2020 at 3:19 PM Maxime Coquelin wrote: > > > > On 6/22/20 5:37 PM, 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-

Re: [REPORT] [GSoC - TCG Continuous Benchmarking] [#2] Dissecting QEMU Into Three Main Parts

2020-06-30 Thread Aleksandar Markovic
уто, 30. јун 2020. у 09:19 Ahmed Karaman је написао/ла: > > On Tue, Jun 30, 2020 at 6:34 AM Lukáš Doktor wrote: > > > > Dne 29. 06. 20 v 12:25 Ahmed Karaman napsal(a): > > > Hi, > > > > > > The second report of the TCG Continuous Benchmarking series builds > > > upon the QEMU performance metrics

[PATCH v3 00/26] Error handling fixes & cleanups

2020-06-30 Thread Markus Armbruster
This series addresses a number of error handling issues I found while working on error handling improvements. v3: * PATCH 20: Can actually fail; propagate [Igor, Paolo] * PATCH 26: New Markus Armbruster (26): net/virtio: Fix failover_replug_primary() return value regression pci: Delete useles

[PATCH v3 07/26] spapr: Plug minor memory leak in spapr_machine_init()

2020-06-30 Thread Markus Armbruster
spapr_machine_init() leaks an Error object when kvmppc_check_papr_resize_hpt() fails and spapr->resize_hpt is SPAPR_RESIZE_HPT_DISABLED, i.e. when the host doesn't support hash page table resizing, and the user didn't ask for it. As harmless as memory leaks can possibly be. Plug it. Fixes: 30f4b

[PATCH v3 05/26] tests: Use error_free_or_abort() where appropriate

2020-06-30 Thread Markus Armbruster
Replace g_assert(err != NULL); error_free(err); err = NULL; and variations thereof by error_free_or_abort(&err); Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake --- tests/check-block-qdict.c | 24 ++-- tests/check-qom-proplist.c | 7 ++- t

[PATCH v3 12/26] aspeed: Clean up roundabout error propagation

2020-06-30 Thread Markus Armbruster
Replace sysbus_realize(SYS_BUS_DEVICE(&s->spi[i]), &local_err); error_propagate(&err, local_err); if (err) { error_propagate(errp, err); return; } by sysbus_realize(SYS_BUS_DEVICE(&s->spi[i]), &err); if (err) { e

[PATCH v3 04/26] tests: Use &error_abort where appropriate

2020-06-30 Thread Markus Armbruster
Receiving the error in a local variable only to assert there is none is less clear than passing &error_abort. Clean up. Signed-off-by: Markus Armbruster Reviewed-by: Thomas Huth --- tests/check-qobject.c | 5 +- tests/check-qom-proplist.c | 7 +- tests/test-logging.c

[PATCH v3 26/26] migration/rdma: Plug memory leaks in qemu_rdma_registration_stop()

2020-06-30 Thread Markus Armbruster
qemu_rdma_registration_stop() uses the ERROR() macro to create, report to stderr, and store an Error object. The stored Error object is never used, and its memory is leaked. Even where ERROR() doesn't leak, it is ill-advised. The whole point of passing an Error to the caller is letting the calle

[PATCH v3 14/26] qdev: Drop qbus_set_hotplug_handler() parameter @errp

2020-06-30 Thread Markus Armbruster
qbus_set_hotplug_handler() is a simple wrapper around object_property_set_link(). object_property_set_link() fails when the property doesn't exist, is not settable, or its .check() method fails. These are all programming errors here, so passing &error_abort to qbus_set_hotplug_handler() is approp

[PATCH v3 03/26] Clean up some calls to ignore Error objects the right way

2020-06-30 Thread Markus Armbruster
Receiving the error in a local variable only to free it is less clear (and also less efficient) than passing NULL. Clean up. Cc: Daniel P. Berrange Cc: Jerome Forissier CC: Greg Kurz Signed-off-by: Markus Armbruster Reviewed-by: Greg Kurz --- chardev/char-socket.c | 6 ++ hw/9pfs/9p.c

[PATCH v3 10/26] test-util-filemonitor: Plug unlikely memory leak

2020-06-30 Thread Markus Armbruster
test_file_monitor_events() leaks an Error object when qemu_file_monitor_add_watch() fails, which seems unlikely. Plug it. Cc: Daniel P. Berrangé Signed-off-by: Markus Armbruster --- tests/test-util-filemonitor.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-util-filemonitor.c

[PATCH v3 24/26] hw/arm/armsse: Fix armsse_realize() error API violation

2020-06-30 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. armsse_realize() is w

[PATCH v3 20/26] x86: Fix x86_cpu_new() error handling

2020-06-30 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. x86_cpu_new() is wron

[PATCH v3 22/26] arm/stm32f205 arm/stm32f405: Fix realize error API violation

2020-06-30 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. stm32f205_soc_realize

[PATCH v3 08/26] qga: Plug unlikely memory leak in guest-set-memory-blocks

2020-06-30 Thread Markus Armbruster
transfer_memory_block() leaks an Error object when reading file /sys/devices/system/memory/memory/state fails with errno other than ENOENT, and @sys2memblk is false, i.e. when the state file exists but cannot be read (seems quite unlikely), and this is guest-set-memory-blocks, not guest-get-memory-

[PATCH v3 06/26] usb/dev-mtp: Fix Error double free after inotify failure

2020-06-30 Thread Markus Armbruster
error_report_err() frees its first argument. Freeing it again is wrong. Don't. Fixes: 47287c27d0c367a89f7b2851e23a7f8b2d499dd6 Cc: Gerd Hoffmann Cc: Daniel P. Berrangé Cc: qemu-sta...@nongnu.org Signed-off-by: Markus Armbruster --- hw/usb/dev-mtp.c | 2 -- 1 file changed, 2 deletions(-) dif

[PATCH v3 25/26] arm/{bcm2835, fsl-imx25, fsl-imx6}: Fix realize error API violations

2020-06-30 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. bcm2835_peripherals_r

[PATCH v3 17/26] riscv/sifive_u: Fix sifive_u_soc_realize() error API violations

2020-06-30 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. sifive_u_soc_realize(

[PATCH v3 09/26] sd/milkymist-memcard: Plug minor memory leak in realize

2020-06-30 Thread Markus Armbruster
milkymist_memcard_realize() leaks an Error object when realization of its "sd-card" device fails. Quite harmless, since we only ever realize this once, in milkymist_init() via milkymist_memcard_create(). Plug the leak. Fixes: 3d0369ba499866cc6a839f71212d97876500762d Cc: Philippe Mathieu-Daudé C

[PATCH v3 11/26] vnc: Plug minor memory leak in vnc_display_open()

2020-06-30 Thread Markus Armbruster
vnc_display_print_local_addr() leaks the Error object when qio_channel_socket_get_local_address() fails. Seems unlikely. Called when we create a VNC display with vnc_display_open(). Plug the leak by passing NULL to ignore the error. Cc: Daniel P. Berrange Cc: Gerd Hoffmann Signed-off-by: Mark

[PATCH v3 19/26] mips/cps: Fix mips_cps_realize() error API violations

2020-06-30 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. mips_cps_realize() is

[PATCH v3 13/26] qdev: Drop qbus_set_bus_hotplug_handler() parameter @errp

2020-06-30 Thread Markus Armbruster
All callers pass &error_abort. Drop the parameter. Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Signed-off-by: Markus Armbruster --- include/hw/qdev-core.h | 2 +- hw/core/bus.c | 4 ++-- hw/scsi/scsi-bus.c | 2 +- hw/usb/bus.c| 2

[PATCH v3 21/26] amd_iommu: Fix amdvi_realize() error API violation

2020-06-30 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. amdvi_realize() is wr

[PATCH v3 01/26] net/virtio: Fix failover_replug_primary() return value regression

2020-06-30 Thread Markus Armbruster
Commit 150ab54aa6 "net/virtio: fix re-plugging of primary device" fixed failover_replug_primary() to return false on failure. Commit 5a0948d36c "net/virtio: Fix failover error handling crash bugs" broke it again for hotplug_handler_plug() failure. Unbreak it. Commit 5a0948d36c4cbc1c5534afac6fee9

Re: [PATCH v3 24/26] hw/arm/armsse: Fix armsse_realize() error API violation

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 11:03 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 poin

[PATCH v3 23/26] aspeed: Fix realize error API violation

2020-06-30 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. aspeed_soc_ast2600_re

[PATCH v3 16/26] hw/arm: Drop useless object_property_set_link() error handling

2020-06-30 Thread Markus Armbruster
object_property_set_link() fails when the property doesn't exist, is not settable, or its .check() method fails. These are all programming errors here, so passing it &error_abort is appropriate. Cc: Peter Maydell Cc: "Cédric Le Goater" Cc: Andrew Jeffery Cc: Joel Stanley Cc: qemu-...@nongnu.o

[PATCH v3 15/26] hw: Fix error API violation around object_property_set_link()

2020-06-30 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. virtio_gpu_pci_base_r

[PATCH v3 18/26] riscv_hart: Fix riscv_harts_realize() error API violations

2020-06-30 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. riscv_harts_realize()

Re: [RFC 0/4] Enable virtio-fs on s390x

2020-06-30 Thread Stefan Hajnoczi
On Mon, Jun 29, 2020 at 02:07:16PM +0100, Daniel P. Berrangé wrote: > On Mon, Jun 29, 2020 at 01:53:05PM +0100, Stefan Hajnoczi wrote: > > On Thu, Jun 25, 2020 at 12:04:26PM +0200, Marc Hartmayer wrote: > > > This RFC is about enabling virtio-fs on s390x. For that we need > > > + some shim code (f

[PATCH v3 02/26] pci: Delete useless error_propagate()

2020-06-30 Thread Markus Armbruster
Cc: Jens Freimann Cc: Michael S. Tsirkin Cc: Marcel Apfelbaum Signed-off-by: Markus Armbruster Reviewed-by: Jens Freimann Reviewed-by: Michael S. Tsirkin --- hw/pci/pci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index b22dedc88c..de0fae10ab 100644 ---

Re: [PATCH v3 25/26] arm/{bcm2835,fsl-imx25,fsl-imx6}: Fix realize error API violations

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 11:03 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 poin

Re: [PATCH v2 2/3] trace: Add support for recorder back-end

2020-06-30 Thread Dr. David Alan Gilbert
* Christophe de Dinechin (dinec...@redhat.com) wrote: > The recorder library provides support for low-cost continuous > recording of events, which can then be replayed. This makes it > possible to collect data "after the fact",for example to show the > events that led to a crash. > > Recorder supp

Re: [PATCH v3 11/26] vnc: Plug minor memory leak in vnc_display_open()

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 11:03:36AM +0200, Markus Armbruster wrote: > vnc_display_print_local_addr() leaks the Error object when > qio_channel_socket_get_local_address() fails. Seems unlikely. Called > when we create a VNC display with vnc_display_open(). Plug the leak > by passing NULL to ignore

Re: [PATCH v3 09/26] sd/milkymist-memcard: Plug minor memory leak in realize

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 11:03 AM, Markus Armbruster wrote: > milkymist_memcard_realize() leaks an Error object when realization of > its "sd-card" device fails. Quite harmless, since we only ever > realize this once, in milkymist_init() via milkymist_memcard_create(). > > Plug the leak. > > Fixes: 3d0369ba49

Re: [PATCH v3 10/26] test-util-filemonitor: Plug unlikely memory leak

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 11:03:35AM +0200, Markus Armbruster wrote: > test_file_monitor_events() leaks an Error object when > qemu_file_monitor_add_watch() fails, which seems unlikely. Plug it. > > Cc: Daniel P. Berrangé > Signed-off-by: Markus Armbruster > --- > tests/test-util-filemonitor.c |

Re: [PATCH v3 22/26] arm/stm32f205 arm/stm32f405: Fix realize error API violation

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 11:03 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 poin

Re: [PATCH] net: tap: check if the file descriptor is valid before using it

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 05:21:49PM +0800, Jason Wang wrote: > > On 2020/6/30 上午3:30, Laurent Vivier wrote: > > On 28/06/2020 08:31, Jason Wang wrote: > > > On 2020/6/25 下午7:56, Laurent Vivier wrote: > > > > On 25/06/2020 10:48, Daniel P. Berrangé wrote: > > > > > On Wed, Jun 24, 2020 at 09:00:09PM

Re: [PATCH v3 06/26] usb/dev-mtp: Fix Error double free after inotify failure

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 11:03:31AM +0200, Markus Armbruster wrote: > error_report_err() frees its first argument. Freeing it again is > wrong. Don't. > > Fixes: 47287c27d0c367a89f7b2851e23a7f8b2d499dd6 > Cc: Gerd Hoffmann > Cc: Daniel P. Berrangé > Cc: qemu-sta...@nongnu.org > Signed-off-by: M

Re: [RFC v2 1/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-06-30 Thread Jason Wang
On 2020/6/30 下午5:21, Michael S. Tsirkin wrote: On Tue, Jun 30, 2020 at 04:29:19PM +0800, Jason Wang wrote: On 2020/6/30 上午10:41, Jason Wang wrote: On 2020/6/29 下午9:34, Peter Xu wrote: On Mon, Jun 29, 2020 at 01:51:47PM +0800, Jason Wang wrote: On 2020/6/28 下午10:47, Peter Xu wrote: On Sun,

Re: [RFC v2 1/1] memory: Delete assertion in memory_region_unregister_iommu_notifier

2020-06-30 Thread Michael S. Tsirkin
On Tue, Jun 30, 2020 at 04:29:19PM +0800, Jason Wang wrote: > > On 2020/6/30 上午10:41, Jason Wang wrote: > > > > On 2020/6/29 下午9:34, Peter Xu wrote: > > > On Mon, Jun 29, 2020 at 01:51:47PM +0800, Jason Wang wrote: > > > > On 2020/6/28 下午10:47, Peter Xu wrote: > > > > > On Sun, Jun 28, 2020 at 03

Re: [PATCH v3 23/26] aspeed: Fix realize error API violation

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 11:03 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 poin

Re: [PATCH 15/19] iotests: qemu-img tests for luks key management

2020-06-30 Thread Maxim Levitsky
On Tue, 2020-06-30 at 10:56 +0200, Max Reitz wrote: > On 29.06.20 14:05, Maxim Levitsky wrote: > > On Thu, 2020-06-25 at 14:55 +0200, Max Reitz wrote: > > > From: Maxim Levitsky > > > > > > This commit adds two tests, which test the new amend interface > > > of both luks raw images and qcow2 luks

Re: [PATCH v3 03/26] Clean up some calls to ignore Error objects the right way

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 11:03:28AM +0200, Markus Armbruster wrote: > Receiving the error in a local variable only to free it is less clear > (and also less efficient) than passing NULL. Clean up. > > Cc: Daniel P. Berrange > Cc: Jerome Forissier > CC: Greg Kurz > Signed-off-by: Markus Armbrust

Re: [PATCH] net: tap: check if the file descriptor is valid before using it

2020-06-30 Thread Jason Wang
On 2020/6/30 上午3:30, Laurent Vivier wrote: On 28/06/2020 08:31, Jason Wang wrote: On 2020/6/25 下午7:56, Laurent Vivier wrote: On 25/06/2020 10:48, Daniel P. Berrangé wrote: On Wed, Jun 24, 2020 at 09:00:09PM +0200, Laurent Vivier wrote: qemu_set_nonblock() checks that the file descriptor can

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

2020-06-30 Thread BALATON Zoltan
On Tue, 30 Jun 2020, Philippe Mathieu-Daudé wrote: On 6/29/20 11:31 PM, BALATON Zoltan wrote: Besides the above here's another use case of the fix ups that I wanted to keep: https://patchew.org/QEMU/cover.1592315226.git.bala...@eik.bme.hu/b5f4598529a77f15f554c593e9be2d0ff9e5fab3.1592315226.git.

Re: [PATCH 1/5] hw/i2c/aspeed_i2c: Simplify aspeed_i2c_get_bus()

2020-06-30 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > Simplify aspeed_i2c_get_bus() by using a AspeedI2CState argument. > > Signed-off-by: Philippe Mathieu-Daudé The real motivation seems to be simplifying the callers: every single one of them casts the argument from AspeedI2CState * to DeviceState *. Pointing that

Re: [PATCH] net: tap: check if the file descriptor is valid before using it

2020-06-30 Thread Daniel P . Berrangé
On Tue, Jun 30, 2020 at 10:23:18AM +0100, Daniel P. Berrangé wrote: > On Tue, Jun 30, 2020 at 05:21:49PM +0800, Jason Wang wrote: > > > > On 2020/6/30 上午3:30, Laurent Vivier wrote: > > > On 28/06/2020 08:31, Jason Wang wrote: > > > > On 2020/6/25 下午7:56, Laurent Vivier wrote: > > > > > On 25/06/20

Re: [PATCH v3 26/26] migration/rdma: Plug memory leaks in qemu_rdma_registration_stop()

2020-06-30 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > qemu_rdma_registration_stop() uses the ERROR() macro to create, report > to stderr, and store an Error object. The stored Error object is > never used, and its memory is leaked. > > Even where ERROR() doesn't leak, it is ill-advised. The whole poi

Re: [PATCH RFC] virtio-fs: force virtio 1.x usage

2020-06-30 Thread Cornelia Huck
On Mon, 29 Jun 2020 11:45:35 -0400 "Michael S. Tsirkin" wrote: > On Mon, Jun 29, 2020 at 05:39:33PM +0200, Cornelia Huck wrote: > > On Mon, 29 Jun 2020 10:53:23 -0400 > > "Michael S. Tsirkin" wrote: > > > > > On Mon, Jun 29, 2020 at 12:27:58PM +0200, Cornelia Huck wrote: > > > > virtio-fs d

Re: [PATCH v2] qcow2: Fix preallocation on images with unaligned sizes

2020-06-30 Thread Max Reitz
On 17.06.20 16:00, Alberto Garcia wrote: > When resizing an image with qcow2_co_truncate() using the falloc or > full preallocation modes the code assumes that both the old and new > sizes are cluster-aligned. > > There are two problems with this: > > 1) The calculation of how many clusters are

Re: [PATCH 2/5] hw/i2c: Rename i2c_try_create_slave() as i2c_slave_new()

2020-06-30 Thread Markus Armbruster
BALATON Zoltan writes: > On Mon, 29 Jun 2020, Philippe Mathieu-Daudé wrote: >> We use "new" names for functions that allocate and initialize >> device objects: pci_new(), isa_new(), usb_new(). >> Let's call this one i2c_slave_new(). Since we have to update >> all the callers, also let it return a

Re: [PATCH] hw/block/nvme: Align I/O BAR to 4 KiB

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 10:46 AM, Klaus Jensen wrote: > On Jun 30 10:35, Philippe Mathieu-Daudé wrote: >> Hi Klaus, >> >> On 6/25/20 8:23 PM, Klaus Jensen wrote: >>> On Jun 25 17:48, Philippe Mathieu-Daudé wrote: Simplify the NVMe emulated device by aligning the I/O BAR to 4 KiB. Signed-off-by: P

Re: [PATCH 01/10] modules: Provide macros making it easier to identify module exports

2020-06-30 Thread Michael S. Tsirkin
On Fri, Jun 26, 2020 at 06:42:58PM +0200, Christophe de Dinechin wrote: > In order to facilitate the move of large chunks of functionality to > load modules, it is simpler to create a wrapper with the same name > that simply relays the implementation. For efficiency, this is > typically done using

Re: [PATCH 1/3] hw/block/nvme: add NVMe 1.4 specific fields

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/30/20 6:31 AM, Klaus Jensen wrote: > From: Klaus Jensen > > Add new fields from NVM Express v1.4. > > Signed-off-by: Klaus Jensen > --- > hw/block/nvme.c | 3 +- > include/block/nvme.h | 195 +-- > 2 files changed, 172 insertions(+), 26 delet

Re: [RFC 0/4] Enable virtio-fs on s390x

2020-06-30 Thread Cornelia Huck
On Tue, 30 Jun 2020 10:04:51 +0100 Stefan Hajnoczi wrote: > On Mon, Jun 29, 2020 at 02:07:16PM +0100, Daniel P. Berrangé wrote: > > On Mon, Jun 29, 2020 at 01:53:05PM +0100, Stefan Hajnoczi wrote: > > > On Thu, Jun 25, 2020 at 12:04:26PM +0200, Marc Hartmayer wrote: > > > > This RFC is about

Re: [REPORT] [GSoC - TCG Continuous Benchmarking] [#2] Dissecting QEMU Into Three Main Parts

2020-06-30 Thread Aleksandar Markovic
уто, 30. јун 2020. у 06:34 Lukáš Doktor је написао/ла: > > Dne 29. 06. 20 v 12:25 Ahmed Karaman napsal(a): > > Hi, > > > > The second report of the TCG Continuous Benchmarking series builds > > upon the QEMU performance metrics calculated in the previous report. > > This report presents a method t

Re: [PATCH v4 3/7] ccid: build smartcard as module

2020-06-30 Thread Philippe Mathieu-Daudé
On 6/23/20 7:12 PM, Gerd Hoffmann wrote: > Hi, > >>> +{ .type = "ccid-card-passthru",.mod = "usb-smartcard" }, >>> +{ .type = "ccid-card-emulated",.mod = "usb-smartcard" }, >> >> We want to use type definitions here (such TYPE_CCID_PASSTHRU), >> as we don't guaran

  1   2   3   4   5   >