Re: [PATCH 04/21] crypto: Fix certificate file error handling crash bug

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
30.11.2019 22:42, Markus Armbruster wrote: > qcrypto_tls_creds_load_cert() passes uninitialized GError *gerr by > reference to g_file_get_contents(). When g_file_get_contents() fails, > it'll try to set a GError. Unless @gerr is null by dumb luck, this > logs a ERROR_OVERWRITTEN_WARNING warning m

[PATCH v7 12/21] qga: rename Error ** parameter to more common errp

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- qga/commands-posix.c | 2 +- qga/commands-win32.c | 2 +- qga/commands.c | 12 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 1c1a165dae..3bd7b54c08 100644 --- a/

Re: [PATCH v3] qga: fence guest-set-time if hwclock not available

2019-12-05 Thread Laszlo Ersek
On 12/05/19 14:05, Philippe Mathieu-Daudé wrote: > Hi Cornelia, > > On 12/5/19 12:53 PM, Cornelia Huck wrote: >> The Posix implementation of guest-set-time invokes hwclock to >> set/retrieve the time to/from the hardware clock. If hwclock >> is not available, the user is currently informed that "hw

[PATCH v7 19/21] backends/cryptodev: drop local_err from cryptodev_backend_complete()

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
No reason for local_err here, use errp directly instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Reviewed-by: Gonglei --- backends/cryptodev.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a

Re: [PATCH 07/21] tests: Clean up initialization of Error *err variables

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
30.11.2019 22:42, Markus Armbruster wrote: > Declaring a local Error *err without initializer looks suspicious. > Fuse the declaration with the initialization to avoid that. > > Signed-off-by: Markus Armbruster Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best regards, Vladimir

[PATCH v7 18/21] include/qom/object.h: rename Error ** parameter to more common errp

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé --- include/qom/object.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index 128d00c77f..716f6f655d 100644 --- a/include/qom/object.h +++ b/includ

[PATCH v7 13/21] monitor/qmp-cmds: rename Error ** parameter to more common errp

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- monitor/qmp-cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index 0880341a2d..c6faa3eaf0 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -109,7 +109,7 @@ void qmp_system_

[PATCH v7 09/21] hw/core/qdev: cleanup Error ** variables

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Rename Error ** parameter in check_only_migratable to common errp. In device_set_realized: - Move "if (local_err != NULL)" closer to error setters. - Drop 'Error **local_errp': it doesn't save any LoCs, but it's very unusual. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric B

[PATCH v7 07/21] ppc: well form kvmppc_hint_smt_possible error hint helper

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Make kvmppc_hint_smt_possible hint append helper well formed: rename errp to errp_in, as it is IN-parameter here (which is unusual for errp), rename function to be kvmppc_error_append_*_hint. Signed-off-by: Vladimir Sementsov-Ogievskiy --- target/ppc/kvm_ppc.h | 4 ++-- hw/ppc/spapr.c | 2

[PATCH v7 00/21] error: prepare for auto propagated local_err

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Hi all! This is the first part of the bit series, which contains mostly simple cleanups. v6 was sent in separate (I'm sorry for inconvenience) v7: by Markus review (and with his prepared fixups, thanks a lot!): - don't rename Error** paramters - switch to Error *const * where appropriate l

Re: [PATCH v2 6/6] trace: replace hand-crafted pattern_glob with g_pattern_match_simple

2019-12-05 Thread Richard Henderson
On 12/5/19 4:25 AM, Alex Bennée wrote: > We already use g_pattern_match elsewhere so remove the duplication. > > Signed-off-by: Alex Bennée > --- > trace/control.c | 35 +-- > 1 file changed, 1 insertion(+), 34 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2 1/6] linux-user: convert target_mprotect debug to tracepoint

2019-12-05 Thread Richard Henderson
On 12/5/19 4:25 AM, Alex Bennée wrote: > It is a pain to re-compile when you need to debug and tracepoints are > a fairly low impact way to instrument QEMU. > > Signed-off-by: Alex Bennée > > --- > v2 > - don't both with ascii conversion > --- > linux-user/mmap.c | 10 ++ > linu

Re: [PATCH v7 00/21] error: prepare for auto propagated local_err

2019-12-05 Thread Cornelia Huck
On Thu, 5 Dec 2019 18:19:58 +0300 Vladimir Sementsov-Ogievskiy wrote: > Hi all! > > This is the first part of the bit series, which contains mostly simple > cleanups. What's the plan? Should subsystem maintainers pick up individual patches, or will they be merged in one go?

Re: [PATCH] util/cutils: Expand do_strtosz parsing precision to 64 bits

2019-12-05 Thread Markus Armbruster
Tao Xu writes: > Parse input string both as a double and as a uint64_t, then use the > method which consumes more characters. Update the related test cases. > > Signed-off-by: Tao Xu > --- [...] > diff --git a/util/cutils.c b/util/cutils.c > index 77acadc70a..b08058c57c 100644 > --- a/util/cutil

Re: [PATCH v2 2/6] linux-user: convert target_mmap debug to tracepoint

2019-12-05 Thread Richard Henderson
On 12/5/19 4:25 AM, Alex Bennée wrote: > It is a pain to re-compile when you need to debug and tracepoints are > a fairly low impact way to instrument QEMU. > > Signed-off-by: Alex Bennée > --- > linux-user/mmap.c | 27 +-- > linux-user/trace-events | 1 + > 2 file

Re: [PATCH v2 4/6] linux-user: log page table changes under -d page

2019-12-05 Thread Richard Henderson
On 12/5/19 4:25 AM, Alex Bennée wrote: > The CPU_LOG_PAGE flag is woefully underused and could stand to do > extra duty tracking page changes. If the user doesn't want to see the > details as things change they still have the tracepoints available. > > We push the locking into log_page_dump and pa

Re: [PATCH] net: Remove deprecated [hub_id name] tuple of 'hostfwd_add' / 'hostfwd_remove'

2019-12-05 Thread Dr. David Alan Gilbert
* Thomas Huth (th...@redhat.com) wrote: > It's been deprecated since QEMU v3.1.0. Time to finally remove it now. > > Signed-off-by: Thomas Huth > --- > hmp-commands.hx | 8 > net/hub.c| 23 --- > net/hub.h| 2 -- > net/slirp.c

Re: [PATCH v7 00/21] error: prepare for auto propagated local_err

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
05.12.2019 18:26, Cornelia Huck wrote: > On Thu, 5 Dec 2019 18:19:58 +0300 > Vladimir Sementsov-Ogievskiy wrote: > >> Hi all! >> >> This is the first part of the bit series, which contains mostly simple >> cleanups. > > What's the plan? Should subsystem maintainers pick up individual > patches,

[PATCH 0/3] Remove deprecated pc-0.x machine types and related hacks

2019-12-05 Thread Thomas Huth
These have been on the deprecation list since a year now, so it's time to finally remove the pc-0.x machine types. We then can also remove some compatibility hacks in the devices, i.e. the "use_broken_id" in ac97 and "command_serr_enable" in PCI devices. Note that there is also the "rombar" prope

[PATCH 1/3] hw/i386: Remove the deprecated machines 0.12 up to 0.15

2019-12-05 Thread Thomas Huth
They can't be used reliable for live-migration anymore (see https://lists.gnu.org/archive/html/qemu-devel/2018-12/msg04516.html for details) and have been marked as deprecated since QEMU v4.0, so time to remove them now. And while we're at it, mark the remaining pc-1.x machine types as deprecated

Re: [PATCH v2 00/18] Error handling fixes

2019-12-05 Thread Cornelia Huck
On Wed, 4 Dec 2019 10:36:07 +0100 Markus Armbruster wrote: > v2: > * Old PATCH 01-03 have been merged for 4.2 > * PATCH 05-15: Commit message rephrased [David], R-bys kept Thanks, queued patches 11-15 to s390-next. Patch 17 depends on patch 16, so I'll leave merging that one to you. > > Cc:

[PATCH 2/3] hw/audio: Remove the "use_broken_id" hack from the AC97 device

2019-12-05 Thread Thomas Huth
Now that the old pc-0.x machine types are gone, we do not need the "use_broken_id" hack anymore. Signed-off-by: Thomas Huth --- hw/audio/ac97.c | 9 - 1 file changed, 9 deletions(-) diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index a136b97f68..78cda88333 100644 --- a/hw/audio/ac97.c

[PATCH 3/3] hw/pci: Remove the "command_serr_enable" property

2019-12-05 Thread Thomas Huth
Now that the old pc-0.x machine types have been removed, this config knob is not required anymore. Signed-off-by: Thomas Huth --- hw/pci/pci.c | 6 +- include/hw/pci/pci.h | 3 --- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index cbc7a32

Re: [PATCH v7 20/21] hw/vfio/ap: drop local_err from vfio_ap_realize

2019-12-05 Thread Cornelia Huck
On Thu, 5 Dec 2019 18:20:18 +0300 Vladimir Sementsov-Ogievskiy wrote: > No reason for local_err here, use errp directly instead. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Markus Armbruster > --- > hw/vfio/ap.c | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions

Re: [PATCH v5 10/22] target/arm: Define arm_cpu_do_unaligned_access for CONFIG_USER_ONLY

2019-12-05 Thread Peter Maydell
On Fri, 11 Oct 2019 at 14:50, Richard Henderson wrote: > > We will need this to raise unaligned exceptions from user mode. > > Signed-off-by: Richard Henderson > --- > target/arm/tlb_helper.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/target/arm/tlb_helper.c b/tar

Re: [PATCH-for-5.0] roms/edk2-funcs.sh: Use available GCC for ARM/Aarch64 targets

2019-12-05 Thread Laszlo Ersek
Hi Phil, (+Ard) On 12/04/19 23:12, Philippe Mathieu-Daudé wrote: > Centos 7.7 only provides cross GCC 4.8.5, but the script forces > us to use GCC5. Since the same machinery is valid to check the > GCC version, remove the $emulation_target check. > > $ cat /etc/redhat-release > CentOS Linux r

Re: [PATCH 10/21] hw/core: Fix latent fit_load_fdt() error handling bug

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
30.11.2019 22:42, Markus Armbruster wrote: > fit_load_fdt() recovers from fit_image_addr() failing with ENOENT. > Except it doesn't when its @errp argument is &error_fatal or > &error_abort, because it blindly passes @errp to fit_image_addr(). > Messed up in commit 3eb99edb48 "loader-fit: Wean off

Re: [PATCH-for-5.0] roms/edk2-funcs.sh: Use available GCC for ARM/Aarch64 targets

2019-12-05 Thread Philippe Mathieu-Daudé
On 12/5/19 5:13 PM, Laszlo Ersek wrote: Hi Phil, (+Ard) On 12/04/19 23:12, Philippe Mathieu-Daudé wrote: Centos 7.7 only provides cross GCC 4.8.5, but the script forces us to use GCC5. Since the same machinery is valid to check the GCC version, remove the $emulation_target check. $ cat /et

Re: [PATCH 12/21] qga: Fix latent guest-get-fsinfo error handling bug

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
30.11.2019 22:42, Markus Armbruster wrote: > build_guest_fsinfo_for_virtual_device() crashes when > build_guest_fsinfo_for_device() fails and its @errp argument is null. > Messed up in commit 46d4c5723e "qga: Add guest-get-fsinfo command". > > The bug can't bite as no caller actually passes null.

Re: [PATCH] qemu-img: fix info --backing-chain --image-opts

2019-12-05 Thread Eric Blake
On 12/5/19 7:46 AM, Stefan Hajnoczi wrote: Only apply --image-opts to the topmost image when listing an entire backing chain. It is incorrect to treat backing filenames as image options. Assuming we have the backing chain t.IMGFMT.base <- t.IMGFMT.mid <- t.IMGFMT, qemu-img info fails as follows

Re: [RFC v5 024/126] error: auto propagated local_err

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
05.12.2019 17:58, Vladimir Sementsov-Ogievskiy wrote: > 05.12.2019 15:36, Markus Armbruster wrote: >> Vladimir Sementsov-Ogievskiy writes: >> >>> 04.12.2019 17:59, Markus Armbruster wrote: Vladimir Sementsov-Ogievskiy writes: > Here is introduced ERRP_AUTO_PROPAGATE macro, to be use

Re: [PATCH v2 1/3] virtio: add ability to delete vq through a pointer

2019-12-05 Thread Amit Shah
On Wed, 2019-12-04 at 15:31 +0800, pannengy...@huawei.com wrote: > From: Pan Nengyuan Shouldn't this be From: mst? I didn't find a ref to the original patch to confirm if you had to adapt it in any way, though. > Devices tend to maintain vq pointers, allow deleting them trough a vq > pointer. >

Re: [PATCH v6] hw/core/qdev: cleanup Error ** variables

2019-12-05 Thread Eric Blake
On 12/5/19 8:48 AM, Vladimir Sementsov-Ogievskiy wrote: @@ -918,27 +917,26 @@ static void device_set_realized(Object *obj, bool value, Error **errp) } } else if (!value && dev->realized) { -Error **local_errp = NULL; +/* We want local_err to track only the

Re: [PATCH-for-5.0] roms/edk2-funcs.sh: Use available GCC for ARM/Aarch64 targets

2019-12-05 Thread Andrea Bolognani
On Thu, 2019-12-05 at 17:27 +0100, Philippe Mathieu-Daudé wrote: > On 12/5/19 5:13 PM, Laszlo Ersek wrote: > > If that rules out CentOS 7 as a QEMU project build / CI platform for the > > bundled ArmVirtQemu binaries, then we need a more recent platform > > (perhaps CentOS 8, not sure). > > Unfort

Re: [PATCH-for-5.0] roms/edk2-funcs.sh: Use available GCC for ARM/Aarch64 targets

2019-12-05 Thread Ard Biesheuvel
On Thu, 5 Dec 2019 at 16:27, Philippe Mathieu-Daudé wrote: > > On 12/5/19 5:13 PM, Laszlo Ersek wrote: > > Hi Phil, > > > > (+Ard) > > > > On 12/04/19 23:12, Philippe Mathieu-Daudé wrote: > >> Centos 7.7 only provides cross GCC 4.8.5, but the script forces > >> us to use GCC5. Since the same machi

Re: [PATCH v7 06/21] qdev-monitor: well form error hint helpers

2019-12-05 Thread Eric Blake
On 12/5/19 9:20 AM, Vladimir Sementsov-Ogievskiy wrote: Make qbus_list_bus and qbus_list_dev hint append helpers well formed: rename errp to errp_in, as it is IN-parameter here (which is unusual for errp), rename functions to be error_append_*_hint. Commit message mentions a rename... Signed

Re: [PATCH-for-5.0] roms/edk2-funcs.sh: Use available GCC for ARM/Aarch64 targets

2019-12-05 Thread Philippe Mathieu-Daudé
On 12/5/19 5:47 PM, Andrea Bolognani wrote: On Thu, 2019-12-05 at 17:27 +0100, Philippe Mathieu-Daudé wrote: On 12/5/19 5:13 PM, Laszlo Ersek wrote: If that rules out CentOS 7 as a QEMU project build / CI platform for the bundled ArmVirtQemu binaries, then we need a more recent platform (perhap

Re: [PATCH v7 06/21] qdev-monitor: well form error hint helpers

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
05.12.2019 19:58, Eric Blake wrote: > On 12/5/19 9:20 AM, Vladimir Sementsov-Ogievskiy wrote: >> Make qbus_list_bus and qbus_list_dev hint append helpers well formed: >> rename errp to errp_in, as it is IN-parameter here (which is unusual >> for errp), rename functions to be error_append_*_hint. >

Re: [PATCH] socket: websocket refresh of max_size outside of poll

2019-12-05 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20191205140645.6071-1-aast...@freebox.fr/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH] socket: websocket refresh of max_size outside of poll Type: series Message-id: 20191205140645.6071-1

Re: [PATCH v5 11/22] target/arm: Implement LDG, STG, ST2G instructions

2019-12-05 Thread Peter Maydell
On Fri, 11 Oct 2019 at 14:50, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > v2: Split out allocation_tag_mem. Handle atomicity of stores. > v3: Add X[t] input to these insns; require pre-cleaned addresses. > v5: Fix !32-byte aligned operation of st2g. > --- > target/arm/

Re: [PATCH v7 03/21] error: rename errp to errp_in where it is IN-argument

2019-12-05 Thread Greg Kurz
On Thu, 5 Dec 2019 18:20:01 +0300 Vladimir Sementsov-Ogievskiy wrote: > Error **errp is almost always OUT-argument: it's assumed to be NULL, or > pointer to NULL-initialized pointer, or pointer to error_abort or > error_fatal, for callee to report error. > > But very few functions instead get E

Re: [PATCH v7 21/21] nbd: assert that Error** is not NULL in nbd_iter_channel_error

2019-12-05 Thread Eric Blake
On 12/5/19 9:20 AM, Vladimir Sementsov-Ogievskiy wrote: The local_err parameter is not here to return information about nbd_iter_channel_error failure. Instead it's assumed to be filled when passed to the function. This is already stressed by its name (local_err, instead of classic errp). Stress

Re: [PATCH v7 07/21] ppc: well form kvmppc_hint_smt_possible error hint helper

2019-12-05 Thread Greg Kurz
On Thu, 5 Dec 2019 18:20:05 +0300 Vladimir Sementsov-Ogievskiy wrote: > Make kvmppc_hint_smt_possible hint append helper well formed: > rename errp to errp_in, as it is IN-parameter here (which is unusual > for errp), rename function to be kvmppc_error_append_*_hint. > > Signed-off-by: Vladimir

Re: [PATCH v7 08/21] 9pfs: well form error hint helpers

2019-12-05 Thread Greg Kurz
On Thu, 5 Dec 2019 18:20:06 +0300 Vladimir Sementsov-Ogievskiy wrote: > Make error_append_security_model_hint and > error_append_socket_sockfd_hint hint append helpers well formed: > rename errp to errp_in, as it is IN-parameter here (which is unusual > for errp). > > Signed-off-by: Vladimir Se

Re: [PATCH v7 08/21] 9pfs: well form error hint helpers

2019-12-05 Thread Greg Kurz
On Thu, 5 Dec 2019 18:08:56 +0100 Greg Kurz wrote: > On Thu, 5 Dec 2019 18:20:06 +0300 > Vladimir Sementsov-Ogievskiy wrote: > > > Make error_append_security_model_hint and > > error_append_socket_sockfd_hint hint append helpers well formed: > > rename errp to errp_in, as it is IN-parameter he

Re: [PATCH v5 12/22] target/arm: Implement the STGP instruction

2019-12-05 Thread Peter Maydell
On Fri, 11 Oct 2019 at 14:50, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > v3: Handle atomicity, require pre-cleaned address. > --- > target/arm/translate-a64.c | 20 +++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/target/arm/trans

Re: [PATCH v2 06/13] s390x: protvirt: KVM intercept changes

2019-12-05 Thread Cornelia Huck
On Fri, 29 Nov 2019 04:48:02 -0500 Janosch Frank wrote: > Secure guests no longer intercept with code 4 for an instruction > interception. Instead they have codes 104 and 108 for secure > instruction interception and secure instruction notification > respectively. > > The 104 mirrors the 4 inter

Re: [PATCH v2 11/14] target/arm: default SVE length to 64 bytes for linux-user

2019-12-05 Thread Alex Bennée
Richard Henderson writes: > On 11/30/19 8:45 AM, Alex Bennée wrote: >> The Linux kernel chooses the default of 64 bytes for SVE registers on >> the basis that it is the largest size that won't grow the signal >> frame. When debugging larger sizes are also unwieldy in gdb as each >> zreg will ta

Re: [RFC v5 024/126] error: auto propagated local_err

2019-12-05 Thread Eric Blake
On 12/5/19 8:58 AM, Vladimir Sementsov-Ogievskiy wrote: What about you provide the examples, and then I try to polish the prose? 1: error_fatal problem Assume the following code flow: int f1(errp) { ... ret = f2(errp); if (ret < 0) { error_append_hint(errp, "very u

Re: [PATCH v2 06/13] s390x: protvirt: KVM intercept changes

2019-12-05 Thread Janosch Frank
On 12/5/19 6:15 PM, Cornelia Huck wrote: > On Fri, 29 Nov 2019 04:48:02 -0500 > Janosch Frank wrote: > >> Secure guests no longer intercept with code 4 for an instruction >> interception. Instead they have codes 104 and 108 for secure >> instruction interception and secure instruction notificatio

Re: [PATCH v7 21/21] nbd: assert that Error** is not NULL in nbd_iter_channel_error

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
05.12.2019 20:14, Eric Blake wrote: > On 12/5/19 9:20 AM, Vladimir Sementsov-Ogievskiy wrote: >> The local_err parameter is not here to return information about >> nbd_iter_channel_error failure. Instead it's assumed to be filled when >> passed to the function. This is already stressed by its name

Re: [PATCH v5 13/22] target/arm: Implement the LDGM and STGM instructions

2019-12-05 Thread Peter Maydell
On Fri, 11 Oct 2019 at 14:50, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > v3: Require pre-cleaned addresses. > --- > target/arm/helper-a64.h| 3 ++ > target/arm/mte_helper.c| 96 ++ > target/arm/translate-a64.c | 42 +

Re: [PATCH v2 12/13] s390x: protvirt: Disable address checks for PV guest IO emulation

2019-12-05 Thread Cornelia Huck
On Fri, 29 Nov 2019 04:48:08 -0500 Janosch Frank wrote: > IO instruction data is routed through SIDAD for protected guests, so > adresses do not need to be checked, as this is kernel memory. > > Signed-off-by: Janosch Frank > --- > target/s390x/ioinst.c | 26 +++--- > 1 fil

[PATCH v8 05/21] vnc: drop Error pointer indirection in vnc_client_io_error

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
We don't need Error **, as all callers pass local Error object, which isn't used after the call, or NULL. Use Error * instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Markus Armbruster --- ui/vnc.h | 2 +- ui/vnc.c | 20 +++- 2 files changed, 8 insertions(+), 1

[PATCH v8 13/21] monitor/qmp-cmds: rename Error ** parameter to more common errp

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- monitor/qmp-cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor/qmp-cmds.c b/monitor/qmp-cmds.c index 0880341a2d..c6faa3eaf0 100644 --- a/monitor/qmp-cmds.c +++ b/monitor/qmp-cmds.c @@ -109,7 +109,7 @@ void qmp_system_

[PATCH v8 21/21] nbd: assert that Error** is not NULL in nbd_iter_channel_error

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
The local_err parameter is not here to return information about nbd_iter_channel_error failure. Instead it's assumed to be filled when passed to the function. This is already stressed by its name (local_err, instead of classic errp). Stress it additionally by assertion. Signed-off-by: Vladimir Sem

[PATCH v8 18/21] include/qom/object.h: rename Error ** parameter to more common errp

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé --- include/qom/object.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/qom/object.h b/include/qom/object.h index 128d00c77f..716f6f655d 100644 --- a/include/qom/object.h +++ b/includ

[PATCH v8 09/21] hw/core/qdev: cleanup Error ** variables

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Rename Error ** parameter in check_only_migratable to common errp. In device_set_realized: - Move "if (local_err != NULL)" closer to error setters. - Drop 'Error **local_errp': it doesn't save any LoCs, but it's very unusual. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric B

[PATCH v8 08/21] 9pfs: well form error hint helpers

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Make error_append_security_model_hint and error_append_socket_sockfd_hint hint append helpers well formed: switch errp paramter to Error *const * type, as it has uncommon behavior: not change the pointer to return error, but operate on already existent error object. Signed-off-by: Vladimir Sements

[PATCH v8 06/21] qdev-monitor: well form error hint helpers

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Make qbus_list_bus and qbus_list_dev hint append helpers well formed: switch errp paramter to Error *const * type, as it has uncommon behavior: not change the pointer to return error, but operate on already existent error object. Rename functions to be error_append_*_hint. Signed-off-by: Vladimir

[PATCH v8 04/21] hmp: drop Error pointer indirection in hmp_handle_error

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
We don't need Error **, as all callers pass local Error object, which isn't used after the call. Use Error * instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Acked-by: Dr. David Alan Gilbert Reviewed-by: Markus Armbruster --- include/monitor/hmp.h | 2 +- dump/dump-hmp-cmds.c

[PATCH v8 15/21] hw/sd: drop extra whitespace in sdhci_sysbus_realize() header

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- hw/sd/sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd/sdhci.c b/hw/sd/sdhci.c index 88404d0e9d..18c0c052ce 100644 --- a/hw/sd/sdhci.c +++ b/hw/sd/sdhci.c @@ -1459,7 +1459,7 @@ static void sd

[PATCH v8 03/21] error: make Error **errp const where it is appropriate

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Mostly, Error ** is for returning error from the function, so the callee sets it. However these three functions get already filled errp parameter. They dont change the pointer itself, only change the internal state of referenced Error object. So we can make it Error *const * errp, to stress the beh

[PATCH v8 02/21] net/net: Clean up variable shadowing in net_client_init()

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Variable int err in inner scope shadows Error *err in outer scope. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé --- net/net.c | 17 +++-- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/net/net.c b/net/net.c

[PATCH v8 20/21] hw/vfio/ap: drop local_err from vfio_ap_realize

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
No reason for local_err here, use errp directly instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Markus Armbruster Reviewed-by: Cornelia Huck --- hw/vfio/ap.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c index da6a206

[PATCH v8 17/21] hw/usb: rename Error ** parameter to more common errp

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/usb/dev-network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/dev-network.c b/hw/usb/dev-network.c index 5de6213cc4..b81a8abe83 100644 --- a/hw/usb/dev-network.c +++ b/hw/usb/dev-network.c @@ -1342,7 +1342,7 @@ stat

[PATCH v8 10/21] block/snapshot: rename Error ** parameter to more common errp

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- include/block/snapshot.h | 2 +- block/snapshot.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/block/snapshot.h b/include/block/snapshot.h index b5d5084a12..2bfcd57578 100644 --- a

Re: [PATCH v2 06/13] s390x: protvirt: KVM intercept changes

2019-12-05 Thread Cornelia Huck
On Thu, 5 Dec 2019 18:34:32 +0100 Janosch Frank wrote: > On 12/5/19 6:15 PM, Cornelia Huck wrote: > > On Fri, 29 Nov 2019 04:48:02 -0500 > > Janosch Frank wrote: > > > >> Secure guests no longer intercept with code 4 for an instruction > >> interception. Instead they have codes 104 and 108 fo

Re: [PATCH v5 14/22] target/arm: Implement the access tag cache flushes

2019-12-05 Thread Peter Maydell
On Fri, 11 Oct 2019 at 14:50, Richard Henderson wrote: > > Like the regular data cache flushes, these are nops within qemu. > > Signed-off-by: Richard Henderson > --- > target/arm/helper.c | 48 + > 1 file changed, 48 insertions(+) > > diff --git a/tar

[PATCH v8 01/21] hw/core/loader-fit: fix freeing errp in fit_load_fdt

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
fit_load_fdt forget to check that errp is not NULL and to zero it after freeing. Fix it. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake --- hw/core/loader-fit.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/core/loader-fit.c b/hw/core/loader-fit

[PATCH v8 16/21] hw/tpm: rename Error ** parameter to more common errp

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Berger --- hw/tpm/tpm_emulator.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/tpm/tpm_emulator.c b/hw/tpm/tpm_emulator.c index 22f9113432..10d587ed40 100644 --- a/hw/tpm/tpm_emulator.c +++ b/hw/tpm/

[PATCH v8 07/21] ppc: well form kvmppc_hint_smt_possible error hint helper

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Make kvmppc_hint_smt_possible hint append helper well formed: switch errp paramter to Error *const * type, as it has uncommon behavior: not change the pointer to return error, but operate on already existent error object. Rename function to be kvmppc_error_append_*_hint. Signed-off-by: Vladimir Se

[PATCH v8 19/21] backends/cryptodev: drop local_err from cryptodev_backend_complete()

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
No reason for local_err here, use errp directly instead. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau Reviewed-by: Gonglei --- backends/cryptodev.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a

Re: [PATCH v8 21/21] nbd: assert that Error** is not NULL in nbd_iter_channel_error

2019-12-05 Thread Eric Blake
On 12/5/19 11:46 AM, Vladimir Sementsov-Ogievskiy wrote: The local_err parameter is not here to return information about nbd_iter_channel_error failure. Instead it's assumed to be filled when passed to the function. This is already stressed by its name (local_err, instead of classic errp). Stress

[PATCH v8 14/21] hw/s390x: rename Error ** parameter to more common errp

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cornelia Huck --- hw/s390x/event-facility.c | 2 +- hw/s390x/s390-stattrib.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/s390x/event-facility.c b/hw/s390x/event-facility.c index 66205697ae..dc733ee2af 100644

[PATCH v8 12/21] qga: rename Error ** parameter to more common errp

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- qga/commands-posix.c | 2 +- qga/commands-win32.c | 2 +- qga/commands.c | 12 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 1c1a165dae..3bd7b54c08 100644 --- a/

Re: [PATCH v7 21/21] nbd: assert that Error** is not NULL in nbd_iter_channel_error

2019-12-05 Thread Eric Blake
On 12/5/19 11:39 AM, Vladimir Sementsov-Ogievskiy wrote: 05.12.2019 20:14, Eric Blake wrote: On 12/5/19 9:20 AM, Vladimir Sementsov-Ogievskiy wrote: The local_err parameter is not here to return information about nbd_iter_channel_error failure. Instead it's assumed to be filled when passed to t

Re: [PATCH v2 06/14] target/arm: use gdb_get_reg helpers

2019-12-05 Thread Alex Bennée
Alan Hayward writes: >> On 1 Dec 2019, at 20:05, Philippe Mathieu-Daudé wrote: >> >> On 11/30/19 9:45 AM, Alex Bennée wrote: >>> This is cleaner than poking memory directly and will make later >>> clean-ups easier. >>> Signed-off-by: Alex Bennée >>> --- >>> v2 >>> - make sure we pass hi/lo

[PATCH v8 11/21] hw/i386/amd_iommu: rename Error ** parameter to more common errp

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/i386/amd_iommu.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/i386/amd_iommu.c b/hw/i386/amd_iommu.c index d55dbf07fc..b1175e52c7 100644 --- a/hw/i386/amd_iommu.c +++ b/hw/i386/amd_iommu.c @@ -1533,7 +1533

Re: [PATCH v5 15/22] target/arm: Clean address for DC ZVA

2019-12-05 Thread Peter Maydell
On Fri, 11 Oct 2019 at 14:50, Richard Henderson wrote: > > This data access was forgotten in the previous patch. Do you mean "in the patch where we added support for cleaning addresses of TBI information"? As written it sounds like you're referring to the previous patch in this patchseries. > Fi

[PATCH v8 00/21] error: prepare for auto propagated local_err

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
Hi all! This is the first part of the bit series, which contains mostly simple cleanups. v6 was sent in separate (I'm sorry for inconvenience) v7: by Markus review (and with his prepared fixups, thanks a lot!): - don't rename Error** paramters - switch to Error *const * where appropriate l

[PATCH-for-5.0] roms/edk2-funcs: Force armhf toolchain prefix on Debian

2019-12-05 Thread Philippe Mathieu-Daudé
The Debian (based) distributions historically provides 2 ARM toolchains, documented as [1]: * The ARM EABI (armel) port targets a range of older 32-bit ARM devices, particularly those used in NAS hardware and a variety of *plug computers. * The newer ARM hard-float (armhf) port supports newer,

Re: [PATCH v5 16/22] target/arm: Implement data cache set allocation tags

2019-12-05 Thread Peter Maydell
On Fri, 11 Oct 2019 at 14:50, Richard Henderson wrote: > > This is DC GVA and DC GZVA. > > Signed-off-by: Richard Henderson > --- > v2: Use allocation_tag_mem + memset. > v3: Require pre-cleaned addresses. > --- > diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c > index f1315bae37.

Re: [PATCH v7 21/21] nbd: assert that Error** is not NULL in nbd_iter_channel_error

2019-12-05 Thread Vladimir Sementsov-Ogievskiy
05.12.2019 20:49, Eric Blake wrote: > On 12/5/19 11:39 AM, Vladimir Sementsov-Ogievskiy wrote: >> 05.12.2019 20:14, Eric Blake wrote: >>> On 12/5/19 9:20 AM, Vladimir Sementsov-Ogievskiy wrote: The local_err parameter is not here to return information about nbd_iter_channel_error failure.

Re: [PATCH v8 06/21] qdev-monitor: well form error hint helpers

2019-12-05 Thread Eric Blake
On 12/5/19 12:17 PM, Eric Blake wrote: On 12/5/19 11:46 AM, Vladimir Sementsov-Ogievskiy wrote: Make qbus_list_bus and qbus_list_dev hint append helpers well formed: switch errp paramter to Error *const * type, as it has uncommon behavior: not change the pointer to return error, but operate on a

Re: [PATCH v8 06/21] qdev-monitor: well form error hint helpers

2019-12-05 Thread Eric Blake
On 12/5/19 11:46 AM, Vladimir Sementsov-Ogievskiy wrote: Make qbus_list_bus and qbus_list_dev hint append helpers well formed: switch errp paramter to Error *const * type, as it has uncommon behavior: not change the pointer to return error, but operate on already existent error object. Rename fun

Re: [PATCH v5 18/22] target/arm: Enable MTE

2019-12-05 Thread Peter Maydell
On Fri, 11 Oct 2019 at 14:50, Richard Henderson wrote: > > We now implement all of the components of MTE, without actually > supporting any tagged memory. All MTE instructions will work, > trivially, so we can enable support. > > Signed-off-by: Richard Henderson > --- > target/arm/cpu.c | 10

Re: [PATCH-for-5.0] roms/edk2-funcs: Force armhf toolchain prefix on Debian

2019-12-05 Thread Ard Biesheuvel
On Thu, 5 Dec 2019 at 18:09, Philippe Mathieu-Daudé wrote: > > The Debian (based) distributions historically provides 2 ARM > toolchains, documented as [1]: > > * The ARM EABI (armel) port targets a range of older 32-bit ARM > devices, particularly those used in NAS hardware and a variety > of

Re: [PATCH v5 19/22] target/arm: Cache the Tagged bit for a page in MemTxAttrs

2019-12-05 Thread Peter Maydell
On Fri, 11 Oct 2019 at 14:50, Richard Henderson wrote: > > This "bit" is a particular value of the page's MemAttr. > > Signed-off-by: Richard Henderson > --- > target/arm/helper.c | 25 +++-- > 1 file changed, 15 insertions(+), 10 deletions(-) > > diff --git a/target/arm/help

Re: [PATCH v5 20/22] target/arm: Create tagged ram when MTE is enabled

2019-12-05 Thread Peter Maydell
On Fri, 11 Oct 2019 at 14:50, Richard Henderson wrote: > > Signed-off-by: Richard Henderson > --- > v5: Assign cs->num_ases to the final value first. > Downgrade to ID_AA64PFR1.MTE=1 if tag memory is not available. > v6: Add secure tag memory for EL3. > --- > target/arm/cpu.h | 6 ++ >

Re: [PATCH v2 2/7] iotests: Skip test 060 if it is not possible to create large files

2019-12-05 Thread Cleber Rosa
On Wed, Dec 04, 2019 at 04:46:13PM +0100, Thomas Huth wrote: > Test 060 fails in the arm64, s390x and ppc64le LXD containers on Travis > (which we will hopefully enable in our CI soon). These containers > apparently do not allow large files to be created. The repair process > in test 060 creates a

[PATCH 0/5] ppc/pnv: add a POWER10 PnvChip and a powernv10 machine

2019-12-05 Thread Cédric Le Goater
Hello, The POWER10 and POWER9 processors are very similar and this series adds the basic framework for a POWER10 chip and a machine using this chip. The PSI and LPC models are provided first because there are no changes. XIVE needs some adaptation and will come later. Thanks, C. Cédric Le Goate

[PATCH 1/5] target/ppc: Add POWER10 DD1.0 model information

2019-12-05 Thread Cédric Le Goater
This includes in QEMU a new CPU model for the POWER10 processor with the same capabilities of a POWER9 process. The model will be extended when support is completed. Signed-off-by: Cédric Le Goater --- target/ppc/cpu-models.h | 3 + target/ppc/cpu.h| 1 + target/ppc/c

Re: [PATCH v35 10/13] target/avr: Add limited support for USART and 16 bit timer peripherals

2019-12-05 Thread Aleksandar Markovic
On Tuesday, October 29, 2019, Michael Rolnik wrote: > From: Sarah Harris > > These were designed to facilitate testing but should provide enough > function to be useful in other contexts. > Only a subset of the functions of each peripheral is implemented, mainly > due to the lack of a standard w

[PATCH 3/5] ppc/psi: cleanup definitions

2019-12-05 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater --- hw/ppc/pnv_psi.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/ppc/pnv_psi.c b/hw/ppc/pnv_psi.c index a360515a86f8..f15aaa5c9cc0 100644 --- a/hw/ppc/pnv_psi.c +++ b/hw/ppc/pnv_psi.c @@ -609,9 +609,12 @@ static const TypeInfo pnv_

[PATCH 4/5] ppc/pnv: add a PSI bridge model for POWER10

2019-12-05 Thread Cédric Le Goater
The POWER10 PSIHB controller is very similar to the one on POWER9. We should probably introduce a common PnvPsiXive object. The ESB page size should be changed to 64k when P10 support is ready. Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 9 + include/hw/ppc/pnv_psi

[PATCH 2/5] ppc/pnv: Introduce a POWER10 PnvChip and a powernv10 machine

2019-12-05 Thread Cédric Le Goater
This is an empty shell with the XSCOM bus and cores. The chip controllers will come later. Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 33 include/hw/ppc/pnv_xscom.h | 19 + hw/ppc/pnv.c | 158 +++-- hw/ppc/pnv_cor

[PATCH 5/5] ppc/pnv: add a LPC Controller model for POWER10

2019-12-05 Thread Cédric Le Goater
Same a POWER9, only the MMIO window changes. Signed-off-by: Cédric Le Goater --- include/hw/ppc/pnv.h | 4 include/hw/ppc/pnv_lpc.h | 6 +- hw/ppc/pnv.c | 25 ++--- hw/ppc/pnv_lpc.c | 30 ++ 4 files changed, 53 in

Re: [PATCH v5 15/22] target/arm: Clean address for DC ZVA

2019-12-05 Thread Peter Maydell
On Fri, 11 Oct 2019 at 14:50, Richard Henderson wrote: > > This data access was forgotten in the previous patch. > > Fixes: 3a471103ac1823ba > Signed-off-by: Richard Henderson > --- > target/arm/translate-a64.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/target/arm/t

[PATCH-for-5.0 v2] roms/edk2-funcs: Force softfloat ARM toolchain prefix on Debian

2019-12-05 Thread Philippe Mathieu-Daudé
The Debian (based) distributions currently provides 2 ARM toolchains, documented as [1]: * The ARM EABI (armel) port targets a range of older 32-bit ARM devices, particularly those used in NAS hardware and a variety of *plug computers. * The newer ARM hard-float (armhf) port supports newer, mo

<    1   2   3   >