Re: [PATCH 0/9] 9pfs: readdir optimization

2019-12-18 Thread Greg Kurz
Hi Christian, It seems that there was an issue with the posting of these series. Threading is inexistant. All the emails appear scattered and unsorted in my mailbox, between 12/16 and 12/18... which is a bit painful. I'll try to find some time to have a look anyway, but this greatly lowers the odd

Re: [PATCH 3/6] hw/net/imx_fec: Rewrite fall through comments

2019-12-18 Thread Aleksandar Markovic
On Tuesday, December 17, 2019, Philippe Mathieu-Daudé wrote: > GCC9 is confused by this comment when building with CFLAG > -Wimplicit-fallthrough=2: > > hw/net/imx_fec.c: In function ‘imx_eth_write’: > hw/net/imx_fec.c:906:12: error: this statement may fall through > [-Werror=implicit-fallthr

Re: [PATCH 1/6] audio/audio: Add missing fall through comment

2019-12-18 Thread Aleksandar Markovic
On Tuesday, December 17, 2019, Philippe Mathieu-Daudé wrote: > GCC9 is confused by this comment when building with > CFLAG -Wimplicit-fallthrough=2: > > Gcc is not confused whatsoever. > audio/audio.c: In function ‘audio_pcm_init_info’: > audio/audio.c:306:14: error: this statement may fal

Re: [PATCH 4/7] configure: Always detect -no-pie toolchain support

2019-12-18 Thread Thomas Huth
On 18/12/2019 04.19, Richard Henderson wrote: > The CFLAGS_NOPIE and LDFLAGS_NOPIE variables are used > in pc-bios/optionrom/Makefile, which has nothing to do > with the PIE setting of the main qemu executables. > > This overrides any operating system default to build > all executables as PIE, whi

Re: [PATCH 5/7] configure: Unnest detection of -z,relro and -z,now

2019-12-18 Thread Thomas Huth
On 18/12/2019 04.19, Richard Henderson wrote: > There is nothing about these options that is related to PIE. > Nor is there anything that specifically ties them to each other. > Use them unconditionally. > > Signed-off-by: Richard Henderson > --- > configure | 13 ++--- > 1 file changed,

Re: [PATCH 6/7] configure: Override the os default with --disable-pie

2019-12-18 Thread Thomas Huth
On 18/12/2019 04.19, Richard Henderson wrote: > Some distributions, e.g. Ubuntu 19.10, enable PIE by default. > If for some reason one wishes to build a non-pie binary, we > must provide additional options to override. > > At the same time, reorg the code to an elif chain. > > Signed-off-by: Rich

Re: [PATCH 7/7] configure: Support -static-pie if requested

2019-12-18 Thread Thomas Huth
On 18/12/2019 04.19, Richard Henderson wrote: > Recent toolchains support static and pie at the same time. > > As with normal dynamic builds, allow --static to default to PIE > if supported by the toolchain. Allow --enable/--disable-pie to > override the default. > > Signed-off-by: Richard Hende

[PULL v2 00/35] Error reporting patches for 2019-12-17

2019-12-18 Thread Markus Armbruster
v2: * New PATCH 20: Resolve conflict with David Gibson's pull request The following changes since commit aceeaa69d28e6f08a24395d0aa6915b687d0a681: Merge remote-tracking branch 'remotes/huth-gitlab/tags/pull-request-2019-12-17' into staging (2019-12-17 15:55:20 +) are available in the Git

[PULL v2 06/35] exec: Fix file_ram_alloc() error API violations

2019-12-18 Thread Markus Armbruster
When os_mem_prealloc() fails, file_ram_alloc() calls qemu_ram_munmap() and returns null. Except it doesn't when its @errp argument is null, because it checks for failure with (errp && *errp). Introduced in commit 056b68af77 "fix qemu exit on memory hotplug when allocation fails at prealloc time".

[PULL v2 01/35] error: Fix -msg timestamp default

2019-12-18 Thread Markus Armbruster
-msg parameter "timestamp" defaults to "off" if you don't specify msg, and to "on" if you do. Messed up right in commit 5e2ac51917 "add timestamp to error_report()". Mostly harmless, because "timestamp" is the only parameter, so "if you do" is "-msg ''", which nobody does. Change the default to

[PULL v2 07/35] hw/acpi: Fix legacy CPU plug error API violations

2019-12-18 Thread Markus Armbruster
legacy_acpi_cpu_plug_cb() dereferences @errp when acpi_set_cpu_present_bit() fails. That's wrong; see the big comment in error.h. Introduced in commit cc43364de7 "acpi/cpu-hotplug: introduce helper function to keep bit setting in one place". No caller actually passes null, and acpi_set_cpu_prese

[PULL v2 14/35] tests-blockjob: Use error_free_or_abort()

2019-12-18 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Reviewed-by: Eric Blake Message-Id: <20191204093625.14836-19-arm...@redhat.com> --- tests/test-blockjob.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test-blockjob.c b/tests/test-blockjob.c index e670a20617..4eeb184caf 100644 --- a

[PULL v2 18/35] vnc: drop Error pointer indirection in vnc_client_io_error

2019-12-18 Thread Markus Armbruster
From: 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 Message-Id: <20191205174635.18758-6-vsement...@virtuozzo.

[PULL v2 02/35] crypto: Fix certificate file error handling crash bug

2019-12-18 Thread Markus Armbruster
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 message and leaves @gerr unchanged. qcrypto_tls_cre

[PULL v2 20/35] Revert "ppc: well form kvmppc_hint_smt_possible error hint helper"

2019-12-18 Thread Markus Armbruster
This reverts commit cdcca22aabafc0496894ce05c80097684832c7d9. Commit cdcca22aaba is a superseded version of the next commit that crept in by accident. Revert it, so the final version applies. Signed-off-by: Markus Armbruster --- target/ppc/kvm_ppc.h | 4 ++-- hw/ppc/spapr.c | 2 +- targe

[PULL v2 10/35] qga: Fix guest-get-fsinfo error API violations

2019-12-18 Thread Markus Armbruster
build_guest_fsinfo_for_virtual_device() dereferences @errp when build_guest_fsinfo_for_device() fails. That's wrong; see the big comment in error.h. Introduced in commit 46d4c5723e "qga: Add guest-get-fsinfo command". No caller actually passes null. Fix anyway: splice in a local Error *err, and

[PULL v2 05/35] tests: Clean up initialization of Error *err variables

2019-12-18 Thread Markus Armbruster
Declaring a local Error *err without initializer looks suspicious. Fuse the declaration with the initialization to avoid that. Signed-off-by: Markus Armbruster Message-Id: <20191204093625.14836-5-arm...@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Vladimi

[PULL v2 11/35] memory-device: Fix memory pre-plug error API violations

2019-12-18 Thread Markus Armbruster
memory_device_get_free_addr() dereferences @errp when memory_device_check_addable() fails. That's wrong; see the big comment in error.h. Introduced in commit 1b6d6af21b "pc-dimm: factor out capacity and slot checks into MemoryDevice". No caller actually passes null. Fix anyway: splice in a loca

[PULL v2 21/35] ppc: make Error **errp const where it is appropriate

2019-12-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Mostly, Error ** is for returning error from the function, so the callee sets it. However kvmppc_hint_smt_possible gets already filled errp parameter. It doesn't change the pointer itself, only change the internal state of referenced Error object. So we can make

[PULL v2 19/35] qdev-monitor: make Error **errp const where it is appropriate

2019-12-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Mostly, Error ** is for returning error from the function, so the callee sets it. However qbus_list_bus and qbus_list_dev get already filled errp parameter. They don't change the pointer itself, only change the internal state of referenced Error object. So we ca

[PULL v2 29/35] hw/sd: drop extra whitespace in sdhci_sysbus_realize() header

2019-12-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20191205174635.18758-16-vsement...@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster --- hw/sd/sdhci.c | 2 +- 1 file changed, 1 insertion(+),

[PULL v2 32/35] include/qom/object.h: rename Error ** parameter to more common errp

2019-12-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20191205174635.18758-19-vsement...@virtuozzo.com> Signed-off-by: Markus Armbruster --- include/qom/object.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)

[PULL v2 27/35] monitor/qmp-cmds: rename Error ** parameter to more common errp

2019-12-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20191205174635.18758-14-vsement...@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster --- monitor/qmp-cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PULL v2 16/35] error: make Error **errp const where it is appropriate

2019-12-18 Thread Markus Armbruster
From: 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 don't change the pointer itself, only change the internal state of referenced Error object. So we can make it

[PULL v2 22/35] 9pfs: make Error **errp const where it is appropriate

2019-12-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Mostly, Error ** is for returning error from the function, so the callee sets it. However error_append_security_model_hint and error_append_socket_sockfd_hint get already filled errp parameter. They don't change the pointer itself, only change the internal state

[PULL v2 31/35] hw/usb: rename Error ** parameter to more common errp

2019-12-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20191205174635.18758-18-vsement...@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster --- hw/usb/dev-network.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

Re: [PATCH 4/6] hw/timer/aspeed_timer: Add a fall through comment

2019-12-18 Thread Aleksandar Markovic
On Tue, Dec 17, 2019 at 6:37 PM Philippe Mathieu-Daudé wrote: > > Reported by GCC9 when building with CFLAG -Wimplicit-fallthrough=2: > > hw/timer/aspeed_timer.c: In function ‘aspeed_timer_set_value’: > hw/timer/aspeed_timer.c:283:24: error: this statement may fall through > [-Werror=implicit

[PULL v2 13/35] hw/intc/s390: Simplify error handling in kvm_s390_flic_realize()

2019-12-18 Thread Markus Armbruster
Cc: Halil Pasic Cc: Cornelia Huck Cc: Christian Borntraeger Signed-off-by: Markus Armbruster Reviewed-by: Cornelia Huck Acked-by: Halil Pasic Message-Id: <20191204093625.14836-18-arm...@redhat.com> --- hw/intc/s390_flic_kvm.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-)

[PULL v2 23/35] hw/core/qdev: cleanup Error ** variables

2019-12-18 Thread Markus Armbruster
From: 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 Sem

[PULL v2 25/35] hw/i386/amd_iommu: rename Error ** parameter to more common errp

2019-12-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20191205174635.18758-12-vsement...@virtuozzo.com> Signed-off-by: Markus Armbruster --- hw/i386/amd_iommu.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hw/i386/amd_

[PULL v2 26/35] qga: rename Error ** parameter to more common errp

2019-12-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Message-Id: <20191205174635.18758-13-vsement...@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Signed-off-by: Markus Armbruster --- qga/commands-posix.c | 2 +- qga/commands-win

[PULL v2 12/35] error: Clean up unusual names of Error * variables

2019-12-18 Thread Markus Armbruster
Local Error * variables are conventionally named @err or @local_err, and Error ** parameters @errp. Naming local variables like parameters is confusing. Clean that up. Naming parameters like local variables is also confusing. Left for another day. Signed-off-by: Markus Armbruster Reviewed-by:

Re: [kvm-unit-tests PATCH 05/16] arm/arm64: ITS: Introspection tests

2019-12-18 Thread Auger Eric
Hi Zenghui, On 12/18/19 4:46 AM, Zenghui Yu wrote: > Hi Eric, > > I have to admit that this is the first time I've looked into > the kvm-unit-tests code, so only some minor comments inline :) no problem. Thank you for looking at this. By the way, with patch 16 I was able to test yout fix: "KVM:

[PULL v2 30/35] hw/tpm: rename Error ** parameter to more common errp

2019-12-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Stefan Berger Message-Id: <20191205174635.18758-17-vsement...@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Markus Armbruster --- hw/tpm/tpm_emulator.c | 8 1 file changed

[PULL v2 04/35] io: Fix Error usage in a comment

2019-12-18 Thread Markus Armbruster
Cc: "Daniel P. Berrangé" Signed-off-by: Markus Armbruster Message-Id: <20191204093625.14836-4-arm...@redhat.com> Acked-by: Daniel P. Berrangé Reviewed-by: Vladimir Sementsov-Ogievskiy --- include/io/task.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/io/task.h b/

[PULL v2 17/35] hmp: drop Error pointer indirection in hmp_handle_error

2019-12-18 Thread Markus Armbruster
From: 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 Message-Id: <20191205174635.1875

[PULL v2 24/35] block/snapshot: rename Error ** parameter to more common errp

2019-12-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Message-Id: <20191205174635.18758-11-vsement...@virtuozzo.com> Signed-off-by: Markus Armbruster --- include/block/snapshot.h | 2 +- block/snapshot.c | 4 ++-- 2 files changed, 3 ins

[PULL v2 35/35] nbd: assert that Error** is not NULL in nbd_iter_channel_error

2019-12-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy All callers of nbd_iter_channel_error() pass the address of a local_err variable, and only call this function if an error has already occurred, using this function to propagate that error. This is already implied by its name (local_err instead of the classic err

[PULL v2 09/35] hw/ipmi: Fix realize() error API violations

2019-12-18 Thread Markus Armbruster
isa_ipmi_bt_realize(), ipmi_isa_realize(), pci_ipmi_bt_realize(), and pci_ipmi_kcs_realize() dereference @errp when IPMIInterfaceClass method init() fails. That's wrong; see the big comment in error.h. Introduced in commit 0719029c47 "ipmi: Add an ISA KCS low-level interface", then imitated in com

[PULL v2 15/35] net/net: Clean up variable shadowing in net_client_init()

2019-12-18 Thread Markus Armbruster
From: 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é Message-Id: <20191205174635.18758-3-vsement...@virtuozzo.com> Signed-off-by: Markus Arm

[PULL v2 28/35] hw/s390x: rename Error ** parameter to more common errp

2019-12-18 Thread Markus Armbruster
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Cornelia Huck Message-Id: <20191205174635.18758-15-vsement...@virtuozzo.com> Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Hildenbrand Signed-off-by: Markus Armbruster --- hw/s390x/event-fac

[PULL v2 33/35] backends/cryptodev: drop local_err from cryptodev_backend_complete()

2019-12-18 Thread Markus Armbruster
From: 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 Message-Id: <20191205174635.18758-20-vsement...@virtuozzo.com> Signe

[PULL v2 08/35] hw/core: Fix fit_load_fdt() error API violations

2019-12-18 Thread Markus Armbruster
fit_load_fdt() passes @errp to fit_image_addr(), then recovers from ENOENT failures. Passing @errp is wrong, because it works only as long as @errp is neither @error_fatal nor @error_abort. Error recovery dereferences @errp. That's also wrong; see the big comment in error.h. Error recovery can

Re: [PULL 0/6] QAPI patches for 2019-12-17

2019-12-18 Thread Markus Armbruster
Peter Maydell writes: > On Tue, 17 Dec 2019 at 08:16, Markus Armbruster wrote: >> >> The following changes since commit cb88904a54903ef6ba21a68a61d9cd51e2166304: >> >> Merge remote-tracking branch >> 'remotes/amarkovic/tags/mips-queue-dec-16-2019' into staging (2019-12-16 >> 14:07:56 +)

[PULL v2 03/35] crypto: Fix typo in QCryptoTLSSession's comment

2019-12-18 Thread Markus Armbruster
Cc: "Daniel P. Berrangé" Signed-off-by: Markus Armbruster Message-Id: <20191204093625.14836-3-arm...@redhat.com> Acked-by: Daniel P. Berrangé Reviewed-by: Vladimir Sementsov-Ogievskiy --- include/crypto/tlssession.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/cr

[PULL v2 34/35] hw/vfio/ap: drop local_err from vfio_ap_realize

2019-12-18 Thread Markus Armbruster
From: 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 Message-Id: <20191205174635.18758-21-vsement...@virtuozzo.com> Signed-off-by: Markus Armbruster --

Re: [PATCH v3 ppc-for-5.0 2/2] ppc/spapr: Support reboot of secure pseries guest

2019-12-18 Thread Cédric Le Goater
On 18/12/2019 05:32, Bharata B Rao wrote: > A pseries guest can be run as a secure guest on Ultravisor-enabled > POWER platforms. When such a secure guest is reset, we need to > release/reset a few resources both on ultravisor and hypervisor side. > This is achieved by invoking this new ioctl KVM_P

Re: [PULL 34/34] nbd: assert that Error** is not NULL in nbd_iter_channel_error

2019-12-18 Thread Markus Armbruster
Markus Armbruster writes: > Eric Blake writes: > >> On 12/17/19 12:26 AM, Markus Armbruster wrote: >>> From: Vladimir Sementsov-Ogievskiy >>> >>> All callers of nbd_iter_channel_error() pass the address of a >>> local_err variable, and only call this function if an error has >>> already occurre

Re: [PATCH 1/9] tests/virtio-9p: v9fs_string_read() didn't terminate string

2019-12-18 Thread Greg Kurz
An affirmative form would provide a better one-line summary of what this patch does, eg: Add terminating nul in v9fs_string_read(). And maybe explain that, despite it is well known that strings don't have a terminating nul in 9P, this will allow future users of v9fs_string_read() to use regular C

Re: [PULL 00/62] Misc patches for 2019-12-16

2019-12-18 Thread Juan Quintela
"Dr. David Alan Gilbert" wrote: >> (and others similar) >> >> and in the migration-test: >> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} >> QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386 >> QTEST_QEMU_IMG=qemu-img tests/migration-test -m=quick -k --tap < >> /dev/null | ./scri

Re: bdrv_co_pwritev: Assertion `!waited || !use_local_qiov' failed.

2019-12-18 Thread Kevin Wolf
Am 17.12.2019 um 17:38 hat Peter Lieven geschrieben: > Am 17.12.19 um 16:52 schrieb Kevin Wolf: > > Am 17.12.2019 um 15:14 hat Peter Lieven geschrieben: > > > I have a vserver running Qemu 4.0 that seems to reproducibly hit the > > > following assertion: > > > > > >  bdrv_co_pwritev: Assertion `!

[PATCH] i386: pass CLZERO to guests with EPYC CPU model on AMD ZEN platform

2019-12-18 Thread Ani Sinha
CLZERO CPUID should be passed on to the guests that use EPYC or EPYC-IBPB CPU model when the AMD ZEN based host supports it. This change makes it recognize this CPUID for guests which use EPYC or EPYC-IBPB CPU model. Signed-off-by: Ani Sinha --- target/i386/cpu.c | 2 ++ 1 file changed, 2 insert

Re: [PATCH 0/4] colo: Introduce resource agent and high-level test

2019-12-18 Thread Lukas Straub
On Wed, 27 Nov 2019 22:11:34 +0100 Lukas Straub wrote: > On Fri, 22 Nov 2019 09:46:46 + > "Dr. David Alan Gilbert" wrote: > > > * Lukas Straub (lukasstra...@web.de) wrote: > > > Hello Everyone, > > > These patches introduce a resource agent for use with the Pacemaker CRM > > > and a > > > h

Re: [PATCH] qcow2: Move error check of local_err near its assignment

2019-12-18 Thread Kevin Wolf
Am 18.12.2019 um 03:26 hat Tuguoyi geschrieben: > > Signed-off-by: Guoyi Tu Empty commit messages are rarely acceptable. You should explain here why you are making the change and why it's correct (for example by comparing with when it was introduced). In this case, the local_err check outside o

[PATCH v4 5/6] linux-user: Add support for getting/setting RTC PLL correction using ioctls

2019-12-18 Thread Filip Bozuta
This patch implements functionalities of following ioctls: RTC_PLL_GET - Getting PLL correction Read the PLL correction for RTCs that support PLL. The PLL correction is returned in the following structure: struct rtc_pll_info { int pll_ctrl;/* placeholder for

[PATCH v4 2/6] linux-user: Add support for getting/setting RTC time and alarm using ioctls

2019-12-18 Thread Filip Bozuta
This patch implements functionalities of following ioctls: RTC_RD_TIME - Getting RTC time Returns this RTC's time in the following structure: struct rtc_time { int tm_sec; int tm_min; int tm_hour; int tm_mday; int tm_mon;

[PATCH v4 3/6] linux-user: Add support for getting/setting RTC periodic interrupt and epoch using ioctls

2019-12-18 Thread Filip Bozuta
This patch implements functionalities of following ioctls: RTC_IRQP_READ, RTC_IRQP_SET - Getting/Setting IRQ rate Read and set the frequency for periodic interrupts, for RTCs that support periodic interrupts. The periodic interrupt must be separately enabled or disabled using the RTC_

[PATCH v4 6/6] linux-user: Add support for read/clear RTC voltage low detector using ioctls

2019-12-18 Thread Filip Bozuta
RTC_VL_READ - Read voltage low detection information Read the voltage low for RTCs that support voltage low. The third ioctl's' argument points to an int in which the voltage low is returned. RTC_VL_CLR - Clear voltage low information Clear the information about voltage low for R

[PATCH v4 4/6] linux-user: Add support for getting/setting RTC wakeup alarm using ioctls

2019-12-18 Thread Filip Bozuta
This patch implements functionalities of following ioctls: RTC_WKALM_SET, RTC_WKALM_GET - Getting/Setting wakeup alarm Some RTCs support a more powerful alarm interface, using these ioctls to read or write the RTC's alarm time (respectively) with this structure: struct rtc_wk

[PATCH v4 0/6] linux-user: Add support for real time clock ioctls

2019-12-18 Thread Filip Bozuta
Add ioctls for all RTC features that are currently supported in linux kernel. This series covers following 22 iocts: * RTC_AIE_ON * RTC_ALM_SET * RTC_WKALM_SET * RTC_AIE_OFF * RTC_ALM_READ* RTC_WKALM_RD * RTC_UIE_ON * RTC_RD_TIME * RTC

[PATCH v4 1/6] linux-user: Add support for enabling/disabling RTC features using ioctls

2019-12-18 Thread Filip Bozuta
This patch implements functionalities of following ioctls: RTC_AIE_ON, RTC_AIE_OFF - Alarm interrupt enabling on/off Enable or disable the alarm interrupt, for RTCs that support alarms. The third ioctl's argument is ignored. RTC_UIE_ON, RTC_UIE_OFF - Update interrupt enabling on/off

Re: [PATCH] qcow2: Move error check of local_err near its assignment

2019-12-18 Thread Vladimir Sementsov-Ogievskiy
18.12.2019 5:26, Tuguoyi wrote: > > Signed-off-by: Guoyi Tu Reviewed-by: Vladimir Sementsov-Ogievskiy > --- > block/qcow2.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/block/qcow2.c b/block/qcow2.c > index 7c18721..ce3db29 100644 > --- a/block/qcow2.

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

2019-12-18 Thread iveskim
I tested the patch in Comment #34, and it was also failed to pass 5 iterations. Copyright (C) 2018 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to

Re: [PATCH v2] blockjob: Fix error message for negative speed

2019-12-18 Thread Max Reitz
On 17.12.19 16:04, Kevin Wolf wrote: > The error message for a negative speed uses QERR_INVALID_PARAMETER, > which implies that the 'speed' option doesn't even exist: > > {"error": {"class": "GenericError", "desc": "Invalid parameter 'speed'"}} > > Make it use QERR_INVALID_PARAMETER_VALUE ins

Re: [PATCH 1/6] audio/audio: Add missing fall through comment

2019-12-18 Thread Philippe Mathieu-Daudé
On 12/18/19 9:02 AM, Aleksandar Markovic wrote: On Tuesday, December 17, 2019, Philippe Mathieu-Daudé > wrote: GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=2: Gcc is not confused whatsoever. It is right! I'll update the

Re: [PATCH 2/6] hw/display/tcx: Add missing fall through comments

2019-12-18 Thread Philippe Mathieu-Daudé
On 12/18/19 8:54 AM, Aleksandar Markovic wrote: On Tuesday, December 17, 2019, Philippe Mathieu-Daudé > wrote: GCC9 is confused by this comment when building with CFLAG -Wimplicit-fallthrough=2:   hw/display/tcx.c: In function ‘tcx_dac_writel’:   h

[Bug 1856834] [NEW] softmmu qemu-system-ppc freezes at virtio vda

2019-12-18 Thread ecsdn
Public bug reported: The same qemu -M mpc... command that works on qemu-system-ppc version 2.8.0 freezes guest on bootup and shows error for qemu-system-ppc version 4.2.0release and 4.19dirtygit: qemu-system-ppc: virtio-blk failed to set guest notifier (-24), ensure -accel kvm is set. qemu-syste

[PATCH v2 2/7] tests/ptimer: Remove unnecessary inclusion of libqtest.h

2019-12-18 Thread Thomas Huth
ptimer-test is a unit test, not a qtest, so libqtest.h is not required here. Signed-off-by: Thomas Huth --- tests/ptimer-test.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/ptimer-test.c b/tests/ptimer-test.c index e16c30ce57..9176b96c1c 100644 --- a/tests/ptimer-test.c +++ b/tests/p

[PATCH v2 3/7] tests/Makefile: Remove 'tests/' and '$(EXESUF)' from the check-qtest variables

2019-12-18 Thread Thomas Huth
It's much easier if we simply add the folder prefix and the exe suffix later via a substitution instead. Signed-off-by: Thomas Huth --- tests/Makefile.include | 258 + 1 file changed, 130 insertions(+), 128 deletions(-) diff --git a/tests/Makefile.include

[PATCH v2 0/7] Move qtests to a separate folder

2019-12-18 Thread Thomas Huth
Our "tests" directory is very overcrowded - we store the qtests, unit test and other files there. That makes it difficult to determine which file belongs to each test subsystem, and the wildcards in the MAINTAINERS file are inaccurate, too. Let's clean up this mess. The first patches disentangle s

[PATCH v2 5/7] test: Move qtests to a separate directory

2019-12-18 Thread Thomas Huth
The tests directory itself is pretty overcrowded, and it's hard to see which test belongs to which test subsystem (unit, qtest, ...). Let's move the qtests to a separate folder for more clarity. Signed-off-by: Thomas Huth --- .gitlab-ci.yml| 11 +- MAINTAINERS

[PATCH v2 4/7] tests/Makefile: Separate unit test dependencies from qtest dependencies

2019-12-18 Thread Thomas Huth
Some of the unit test dependencies are declared right in the block of the qtest dependencies. Let's move them to the other unit tests instead. Signed-off-by: Thomas Huth --- tests/Makefile.include | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Makefile.inclu

[PATCH v2 1/7] tests/Makefile: test-char does not need libqtest

2019-12-18 Thread Thomas Huth
No need to link the libqtest objects here. Reviewed-by: John Snow Signed-off-by: Thomas Huth --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index b381387048..16eb4aa7ba 100644 --- a/tests/Makefile.in

[PATCH v2 7/7] tests/libqos: Move the libqos files under tests/qtest/

2019-12-18 Thread Thomas Huth
The qos stuff belongs to qtest, so move it into that directory, too. Signed-off-by: Thomas Huth --- MAINTAINERS | 9 +-- configure | 4 +- tests/Makefile.include| 2 +- tests/qtest/Makefile.include

[PATCH v2 6/7] tests/Makefile: Move qtest-related settings to a separate Makefile.include

2019-12-18 Thread Thomas Huth
tests/Makefile.include is pretty much overcrowded. Now that we have a dedicated folder for the qtests, let's move the related settings to a Makefile.include file in that directory instead. Signed-off-by: Thomas Huth --- tests/Makefile.include | 311 +-- test

Re: [PATCH v2 01/10] migration-test: Create cmd_soure and cmd_target

2019-12-18 Thread Thomas Huth
On 18/12/2019 02.55, Juan Quintela wrote: > We are repeating almost everything for each machine while creating the > command line for migration. And once for source and another for > destination. We start putting there opts_src and opts_dst. > > Signed-off-by: Juan Quintela > --- > tests/migra

[Bug 1856834] Re: softmmu qemu-system-ppc freezes at virtio vda

2019-12-18 Thread ecsdn
** Description changed: The same qemu -M mpc... command that works on qemu-system-ppc version 2.8.0 freezes guest on bootup and shows error for qemu-system-ppc version 4.2.0release and 4.19dirtygit: qemu-system-ppc: virtio-blk failed to set guest notifier (-24), ensure -accel kvm is se

Re: [PATCH v2 08/10] migration-test: Move -incomming handling to common commandline

2019-12-18 Thread Thomas Huth
You've got a typo in the subject: Please replace "incomming" with "incoming". Thanks, Thomas

Re: [PATCH v2 09/10] migration-test: Rename cmd_src/dst to arch_source/arch_target

2019-12-18 Thread Thomas Huth
On 18/12/2019 02.55, Juan Quintela wrote: > This explains better what they do and avoid confussino with > command_src/target. s/confussino/confusion/ Cheers, Thomas

[PATCH 0/2] iotests: Minor fixes

2019-12-18 Thread Max Reitz
Hi, These are just two minor fixes for things I noticed recently. Max Max Reitz (2): iotests/273: Filter format-specific information iotests: Fix IMGOPTSSYNTAX for nbd tests/qemu-iotests/273 | 3 ++- tests/qemu-iotests/273.out | 27 --- tests/qemu-iotests

[PATCH 2/2] iotests: Fix IMGOPTSSYNTAX for nbd

2019-12-18 Thread Max Reitz
There is no $SOCKDIR, only $SOCK_DIR. Fixes: f3923a72f199b2c63747a7032db74730546f55c6 Signed-off-by: Max Reitz --- tests/qemu-iotests/common.rc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index ffb47c3d5c..d088

[PATCH 1/2] iotests/273: Filter format-specific information

2019-12-18 Thread Max Reitz
Doing this allows running this test with e.g. -o compat=0.10 or -o compat=refcount_bits=1. Signed-off-by: Max Reitz --- tests/qemu-iotests/273 | 3 ++- tests/qemu-iotests/273.out | 27 --- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/tests/qemu-iot

Re: [PATCH v2 01/10] migration-test: Create cmd_soure and cmd_target

2019-12-18 Thread Juan Quintela
Thomas Huth wrote: > On 18/12/2019 02.55, Juan Quintela wrote: >> We are repeating almost everything for each machine while creating the >> command line for migration. And once for source and another for >> destination. We start putting there opts_src and opts_dst. >> >> Signed-off-by: Juan Qui

[Bug 1856837] [NEW] qemu 4.2.0 arm segmentation fault with gcc 9.2

2019-12-18 Thread Fabian Godehardt
Public bug reported: As discussed with f4bug yesterday on IRC here comes the bug description. I'm building/configured qemu-4.2.0 on an x86_64 (gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516) with target-list "arm-softmmu,arm- linux-user" and debug enabled. I use the arm-linux-user variant, "qemu- ar

Re: [PATCH 1/3] MAINTAINERS: Add hw/sd/ssi-sd.c in the SD section

2019-12-18 Thread Laurent Vivier
Le 18/11/2019 à 13:26, Philippe Mathieu-Daudé a écrit : > Cc'ing qemu-trivial@ > > On 10/12/19 8:54 AM, Philippe Mathieu-Daudé wrote: >> The hw/sd/ssi-sd.c file is orphean, add it to the SD section. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >>   MAINTAINERS | 1 + >>   1 file changed, 1 i

Re: [PATCH] monitor: Remove unused define

2019-12-18 Thread Laurent Vivier
Le 19/11/2019 à 12:07, Yury Kotov a écrit : > Remove the definition of QMP_ACCEPT_UNKNOWNS as it is unused since > refactoring 5c678ee8d940 > > Signed-off-by: Yury Kotov > --- > monitor/misc.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/monitor/misc.c b/monitor/misc.c > index 3ba

Re: [PATCH 2/2] test-keyval: Tighten test of trailing crap after size

2019-12-18 Thread Laurent Vivier
Le 25/11/2019 à 14:38, Markus Armbruster a écrit : > test_keyval_visit_size() should test for trailing crap after size with > and without suffix. It does test the latter: "sz2=16Gi" has size > "16G" followed by crap "i". It fails to test the former "sz1=16E" is > a syntactically valid size that o

[PATCH] usbredir: Prevent recursion in usbredir_write

2019-12-18 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" I've got a case where usbredir_write manages to call back into itself via spice; this patch causes the recursion to fail (0 bytes) the write; this seems to avoid the deadlock I was previously seeing. I can't say I fully understand the interaction of usbredir and sp

Re: [PATCH] target/sparc: Remove old TODO file

2019-12-18 Thread Laurent Vivier
Le 30/09/2019 à 19:10, Thomas Huth a écrit : > This file hasn't seen a real (non-trivial) update since 2008 anymore, > so we can assume that it is pretty much out of date and nobody cares > for it anymore. Let's simply remove it. > > Signed-off-by: Thomas Huth > --- > target/sparc/TODO | 88

Re: [PATCH v2] Revert "qemu-options.hx: Update for reboot-timeout parameter"

2019-12-18 Thread Laurent Vivier
Le 05/12/2019 à 03:48, Han Han a écrit : > This reverts commit bbd9e6985ff342cbe15b9cb7eb30e842796fbbe8. > > In 20a1922032 we allowed reboot-timeout=-1 again, so update the doc > accordingly. > > Signed-off-by: Han Han > --- > qemu-options.hx | 4 ++-- > 1 file changed, 2 insertions(+), 2 delet

RE: [PATCH] qcow2: Move error check of local_err near its assignment

2019-12-18 Thread Tuguoyi
On 18.12.2019 17:33 Kevin Wolf wrote: > > Am 18.12.2019 um 03:26 hat Tuguoyi geschrieben: > > > > Signed-off-by: Guoyi Tu > > Empty commit messages are rarely acceptable. You should explain here why > you are making the change and why it's correct (for example by comparing > with when it was int

Re: [PATCH v12 0/3] qcow2: advanced compression options

2019-12-18 Thread Andrey Shinkevich
Pinging... (please) On 02/12/2019 15:15, Andrey Shinkevich wrote: > The compression filter driver is introduced as suggested by Max. > A sample usage of the filter can be found in the test #214. > Now, multiple clusters can be written compressed. > It is useful for the backup job. > > v12: >0

Re: [PATCH] tests/boot-sector: Fix the bad s390x assembler code

2019-12-18 Thread Cornelia Huck
On Tue, 17 Dec 2019 16:06:42 +0100 Thomas Huth wrote: > There are currently two bugs in s390x_code[]: First, the initial jump > uses the wrong offset, so it was jumping to 0x1014 instead of 0x1010. > Second, LHI only loads the lower 32-bit of the register. > > Everything worked fine as long as t

Re: [PULL 00/62] Misc patches for 2019-12-16

2019-12-18 Thread Paolo Bonzini
On 18/12/19 09:54, Juan Quintela wrote: > "Dr. David Alan Gilbert" wrote: >>> (and others similar) >>> >>> and in the migration-test: >>> MALLOC_PERTURB_=${MALLOC_PERTURB_:-$(( ${RANDOM:-0} % 255 + 1))} >>> QTEST_QEMU_BINARY=i386-softmmu/qemu-system-i386 >>> QTEST_QEMU_IMG=qemu-img tests/migration

Re: [PATCH] i386: pass CLZERO to guests with EPYC CPU model on AMD ZEN platform

2019-12-18 Thread Paolo Bonzini
On 18/12/19 10:05, Ani Sinha wrote: > CLZERO CPUID should be passed on to the guests that use EPYC or EPYC-IBPB CPU > model when the AMD ZEN based host supports it. This change makes it recognize > this CPUID for guests which use EPYC or EPYC-IBPB CPU model. > > Signed-off-by: Ani Sinha > --- >

[PATCH v2] qcow2: Move error check of local_err near its assignment

2019-12-18 Thread Tuguoyi
The local_err check outside of the if block was necessary when it was introduced in commit d1258dd0c87 because it needed to be executed even if qcow2_load_autoloading_dirty_bitmaps() returned false. After some modifications that all required the error check to remain where it is, commit 9c98f145df

Re: [PATCH v2 0/7] Move qtests to a separate folder

2019-12-18 Thread Paolo Bonzini
On 18/12/19 11:30, Thomas Huth wrote: > Our "tests" directory is very overcrowded - we store the qtests, > unit test and other files there. That makes it difficult to > determine which file belongs to each test subsystem, and the > wildcards in the MAINTAINERS file are inaccurate, too. > > Let's c

Re: [PATCH-for-5.0 v3 1/6] hw/pci-host/i440fx: Correct the header description

2019-12-18 Thread Laurent Vivier
Le 09/12/2019 à 11:02, Thomas Huth a écrit : > On 09/12/2019 10.49, Philippe Mathieu-Daudé wrote: >> Missed during the refactor in commits 14a026dd58 and 0f25d865a, >> this file is now only about the i440FX chipset. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> hw/pci-host/i440fx.c | 2 +-

Re: [PATCH-for-5.0 v3 3/6] hw/pci-host/i440fx: Use size_t to iterate over ARRAY_SIZE()

2019-12-18 Thread Laurent Vivier
Le 09/12/2019 à 11:05, Thomas Huth a écrit : > On 09/12/2019 10.49, Philippe Mathieu-Daudé wrote: >> We don't enforce the -Wsign-conversion CPPFLAG, but it doesn't hurt >> to avoid this warning: >> >> warning: implicit conversion changes signedness: 'int' to 'size_t' (aka >> 'unsigned long') [-W

Re: [PATCH-for-5.0 v3 3/6] hw/pci-host/i440fx: Use size_t to iterate over ARRAY_SIZE()

2019-12-18 Thread Paolo Bonzini
On 18/12/19 12:57, Laurent Vivier wrote: > Le 09/12/2019 à 11:05, Thomas Huth a écrit : >> On 09/12/2019 10.49, Philippe Mathieu-Daudé wrote: >>> We don't enforce the -Wsign-conversion CPPFLAG, but it doesn't hurt >>> to avoid this warning: >>> >>> warning: implicit conversion changes signedness:

  1   2   3   4   5   >