[PULL 1/2] colo-compare: Remove superfluous NULL-pointer checks for s->iothread

2020-08-04 Thread Jason Wang
From: Lukas Straub s->iothread is checked for NULL on object creation in colo_compare_complete, so it's guaranteed not to be NULL. This resolves a false alert from Coverity (CID 1429969). Signed-off-by: Lukas Straub Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Li Qiang Reviewed-by:

Re: [PATCH 0/3] aio-posix: keep aio_notify_me disabled during polling

2020-08-04 Thread Paolo Bonzini
On 04/08/20 07:28, Stefan Hajnoczi wrote: > This patch series eliminates ctx->notifier EventNotifier activity when > aio_poll() is in polling mode. There is no need to use the EventNotifier since > a polling handler can detect that aio_notify() has been called by monitoring a > field in memory

Re: [PATCH 2/3] async: always set ctx->notified in aio_notify()

2020-08-04 Thread Paolo Bonzini
On 04/08/20 07:28, Stefan Hajnoczi wrote: > @@ -425,19 +425,14 @@ void aio_notify(AioContext *ctx) > smp_mb(); > if (atomic_read(>notify_me)) { > event_notifier_set(>notifier); > -atomic_mb_set(>notified, true); > } > + > +atomic_mb_set(>notified, true); > }

Re: [PATCH for-5.1] Add GitHub action for Windows build

2020-08-04 Thread Philippe Mathieu-Daudé
On 8/3/20 10:20 PM, Stefan Weil wrote: > The GitHub action is restricted to https://github.com/qemu/qemu. > > Signed-off-by: Stefan Weil > --- > > This patch adds a GitHub action for continuous integration builds > of QEMU for Windows. Thanks for this! > > The CI builds run on GitHub and

Re: [PATCH v2 0/3] testing: Build WHPX enabled binaries

2020-08-04 Thread Philippe Mathieu-Daudé
On 8/4/20 9:42 AM, Stefan Weil wrote: > Am 04.08.20 um 09:23 schrieb Philippe Mathieu-Daudé: > >> On 8/4/20 8:55 AM, Stefan Weil wrote: >>> Am 04.08.20 um 08:43 schrieb Thomas Huth: >>> On 03/08/2020 22.25, Stefan Weil wrote: > We can add a CI pipeline on Microsoft infrastructure by

Re: [PATCH v2 0/3] testing: Build WHPX enabled binaries

2020-08-04 Thread Thomas Huth
On 04/08/2020 09.42, Stefan Weil wrote: > Am 04.08.20 um 09:23 schrieb Philippe Mathieu-Daudé: > >> On 8/4/20 8:55 AM, Stefan Weil wrote: >>> Am 04.08.20 um 08:43 schrieb Thomas Huth: >>> On 03/08/2020 22.25, Stefan Weil wrote: > We can add a CI pipeline on Microsoft infrastructure by

[PATCH v7 6/8] io: Document thread-safety of qio_channel_shutdown

2020-08-04 Thread Lukas Straub
Migration and yank code assume that qio_channel_shutdown is thread -safe. Document this after checking the code. Signed-off-by: Lukas Straub Reviewed-by: Daniel P. Berrangé Acked-by: Stefan Hajnoczi --- include/io/channel.h | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH-for-5.1] .travis.yml: Deprecate it in favor of GitLab CI

2020-08-04 Thread Philippe Mathieu-Daudé
As of QEMU 5.2 we prefer to focus our CI development on GitLab. Mark Travis-CI as deprecated (adding a big warning). Signed-off-by: Philippe Mathieu-Daudé --- docs/system/deprecated.rst | 11 +++ .travis.yml| 7 +++ 2 files changed, 18 insertions(+) diff --git

Re: [PATCH] colo-compare: Remove superfluous NULL-pointer checks for s->iothread

2020-08-04 Thread Jason Wang
On 2020/7/31 下午1:06, Lukas Straub wrote: s->iothread is checked for NULL on object creation in colo_compare_complete, so it's guaranteed not to be NULL. This resolves a false alert from Coverity (CID 1429969). Signed-off-by: Lukas Straub --- net/colo-compare.c | 8 ++-- 1 file

Re: [PATCH v2 0/3] testing: Build WHPX enabled binaries

2020-08-04 Thread Thomas Huth
On 03/08/2020 22.25, Stefan Weil wrote: > Am 03.08.20 um 13:28 schrieb Stefan Weil: > >> Am 03.08.20 um 12:51 schrieb Philippe Mathieu-Daudé: >> >>> Hi Sunil, >>> >>> On 8/1/20 1:31 AM, Sunil Muthuswamy wrote: The ask generally sounds reasonable. But, can you help me understand the

Re: [PATCH] schemas: Add vim modeline

2020-08-04 Thread Markus Armbruster
Paolo Bonzini writes: > On 01/08/20 01:12, Nir Soffer wrote: >> I think inventing DSLs and developing tools is wrong. Use standard >> format and tools and spend time on the core of the project. > > Please don't apply 2020 standards to choices that were made in 2009. Or > if you do, be ready to

Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline)

2020-08-04 Thread Markus Armbruster
Kevin Wolf writes: > Am 03.08.2020 um 18:03 hat Markus Armbruster geschrieben: >> Paolo Bonzini writes: >> > This means the two parts might be considered separately: >> > >> > - replacing single-quote with double-quote strings >> > >> > - replacing # comments with // >> >> If all we want is

Re: [Virtio-fs] virtio-fs performance

2020-08-04 Thread Derek Su
Vivek Goyal 於 2020年7月28日 週二 下午11:27寫道: > > On Tue, Jul 28, 2020 at 02:49:36PM +0100, Stefan Hajnoczi wrote: > > > I'm trying and testing the virtio-fs feature in QEMU v5.0.0. > > > My host and guest OS are both ubuntu 18.04 with kernel 5.4, and the > > > underlying storage is one single SSD. > >

[PATCH v7 5/8] io/channel-tls.c: make qio_channel_tls_shutdown thread-safe

2020-08-04 Thread Lukas Straub
Make qio_channel_tls_shutdown thread-safe by using atomics when accessing tioc->shutdown. Signed-off-by: Lukas Straub Reviewed-by: Daniel P. Berrangé Acked-by: Stefan Hajnoczi --- io/channel-tls.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/io/channel-tls.c

Re: [PATCH v2 0/3] testing: Build WHPX enabled binaries

2020-08-04 Thread Philippe Mathieu-Daudé
On 8/4/20 8:55 AM, Stefan Weil wrote: > Am 04.08.20 um 08:43 schrieb Thomas Huth: > >> On 03/08/2020 22.25, Stefan Weil wrote: >>> We can add a CI pipeline on Microsoft infrastructure by using a GitHub >>> action. >> Sorry for being ignorant, but how does that solve the legal questions >> just

Re: virtio-fs performance

2020-08-04 Thread Derek Su
Hello, Set the cache=none in virtiofsd and direct=1 in fio, here are the results and kvm-exit count in 5 seconds. --thread-pool-size=64 (default) seq read: 307 MB/s (kvm-exit count=1076463) seq write: 430 MB/s (kvm-exit count=1302493) rand 4KB read: 65.2k IOPS (kvm-exit

[PATCH-for-5.1 v2 1/1] accel/xen: Fix xen_enabled() behavior on target-agnostic objects

2020-08-04 Thread Philippe Mathieu-Daudé
CONFIG_XEN is generated by configure and stored in "config-target.h", which is (obviously) only include for target-specific objects. This is a problem for target-agnostic objects as CONFIG_XEN is never defined and xen_enabled() is always inlined as 'false'. Fix by following the KVM schema,

[PATCH v7 7/8] MAINTAINERS: Add myself as maintainer for yank feature

2020-08-04 Thread Lukas Straub
I'll maintain this for now as the colo usecase is the first user of this functionality. Signed-off-by: Lukas Straub Reviewed-by: Daniel P. Berrangé Acked-by: Stefan Hajnoczi --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

Re: [RFC v3 1/8] cpu-timers, icount: new modules

2020-08-04 Thread Claudio Fontana
Hi Alex, Paolo and all, thank you for your feedback, could you help me answer the question below? On 8/3/20 11:05 AM, Claudio Fontana wrote: > ... > diff --git a/dma-helpers.c b/dma-helpers.c > index 2a77b5a9cb..240ef4d5b8 100644 > --- a/dma-helpers.c > +++ b/dma-helpers.c > @@ -13,7 +13,7 @@ >

Re: [PATCH v2 0/3] testing: Build WHPX enabled binaries

2020-08-04 Thread Stefan Weil
Am 04.08.20 um 08:43 schrieb Thomas Huth: > On 03/08/2020 22.25, Stefan Weil wrote: >> We can add a CI pipeline on Microsoft infrastructure by using a GitHub >> action. > Sorry for being ignorant, but how does that solve the legal questions > just because it is running on GitHub instead of a

Re: [PATCH v2 0/3] testing: Build WHPX enabled binaries

2020-08-04 Thread Stefan Weil
Am 04.08.20 um 09:23 schrieb Philippe Mathieu-Daudé: > On 8/4/20 8:55 AM, Stefan Weil wrote: >> Am 04.08.20 um 08:43 schrieb Thomas Huth: >> >>> On 03/08/2020 22.25, Stefan Weil wrote: We can add a CI pipeline on Microsoft infrastructure by using a GitHub action. >>> Sorry for being

[PATCH-for-5.1 v2 0/1] accel/xen: Fix xen_enabled() behavior on target-agnostic objects

2020-08-04 Thread Philippe Mathieu-Daudé
Since v1: Fix build error reported by Peter: https://www.mail-archive.com/qemu-devel@nongnu.org/msg727251.html Now following KVM implementation closely. Philippe Mathieu-Daudé (1): accel/xen: Fix xen_enabled() behavior on target-agnostic objects include/sysemu/xen.h | 18 ++

RE: [PATCH-for-5.1 v2 1/1] accel/xen: Fix xen_enabled() behavior on target-agnostic objects

2020-08-04 Thread Paul Durrant
> -Original Message- > From: Philippe Mathieu-Daudé > Sent: 04 August 2020 08:50 > To: qemu-devel@nongnu.org > Cc: Peter Maydell ; Anthony Perard > ; Paolo > Bonzini ; Stefano Stabellini ; > xen- > de...@lists.xenproject.org; Paul Durrant ; Philippe > Mathieu-Daudé ; > Paul Durrant >

Re: [PATCH for-5.1] Add GitHub action for Windows build

2020-08-04 Thread Stefan Weil
Am 04.08.20 um 09:29 schrieb Philippe Mathieu-Daudé: > But I'm not keen on not using GitLab instead. > > The only point I see of using GitHub/Azureus is if we then install > and run testing in the Windows Server 2019 environment: > >

[PATCH v7 4/8] migration: Add yank feature

2020-08-04 Thread Lukas Straub
Register yank functions on sockets to shut them down. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- migration/channel.c | 12 migration/migration.c | 25 - migration/multifd.c | 10 ++

[PATCH v7 2/8] block/nbd.c: Add yank feature

2020-08-04 Thread Lukas Straub
Register a yank function which shuts down the socket and sets s->state = NBD_CLIENT_QUIT. This is the same behaviour as if an error occured. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- block/nbd.c | 129 1 file changed, 80

[PATCH v7 8/8] tests/test-char.c: Wait for the chardev to connect in char_socket_client_dupid_test

2020-08-04 Thread Lukas Straub
A connecting chardev object has an additional reference by the connecting thread, so if the chardev is still connecting by the end of the test, then the chardev object won't be freed. This in turn means that the yank instance won't be unregistered and when running the next test-case

Re: [RFC v3 1/8] cpu-timers, icount: new modules

2020-08-04 Thread Paolo Bonzini
On 04/08/20 10:13, Claudio Fontana wrote: >> -if (mem && use_icount && dbs->dir == DMA_DIRECTION_FROM_DEVICE) { >> +if (mem && icount_enabled() && dbs->dir == >> DMA_DIRECTION_FROM_DEVICE) { > > > > In this specific case, where dma_blk_cb() changes its behaviour to be more >

Re: [PATCH-for-5.1 v2 1/1] accel/xen: Fix xen_enabled() behavior on target-agnostic objects

2020-08-04 Thread Philippe Mathieu-Daudé
Hi Paul, On 8/4/20 9:57 AM, Paul Durrant wrote: >> -Original Message- >> From: Philippe Mathieu-Daudé >> Sent: 04 August 2020 08:50 >> To: qemu-devel@nongnu.org >> Cc: Peter Maydell ; Anthony Perard >> ; Paolo >> Bonzini ; Stefano Stabellini ; >> xen- >> de...@lists.xenproject.org;

Re: [PATCH v2] hw/net/net_tx_pkt: fix assertion failure in net_tx_pkt_add_raw_fragment()

2020-08-04 Thread Jason Wang
On 2020/8/2 上午12:42, Mauro Matteo Cascella wrote: An assertion failure issue was found in the code that processes network packets while adding data fragments into the packet context. It could be abused by a malicious guest to abort the QEMU process on the host. This patch replaces the affected

Re: [PATCH 3/7] minikconf: Pass variables for modules

2020-08-04 Thread Gerd Hoffmann
On Thu, Jul 23, 2020 at 07:46:11PM +0200, Christophe de Dinechin wrote: > Signed-off-by: Christophe de Dinechin > --- > scripts/minikconf.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/scripts/minikconf.py b/scripts/minikconf.py > index bcd91015d3..d60add97f6

Re: [PATCH 4/7] spice: Make spice a module configuration

2020-08-04 Thread Gerd Hoffmann
On Thu, Jul 23, 2020 at 07:46:12PM +0200, Christophe de Dinechin wrote: > This commit changes the spice configuration 'm' by default, and moves > the spice components to obj-m variables. It is sufficient to build > without modules enable, but does not link correctly yet, since no > shims have been

[PULL 2/2] hw/net/net_tx_pkt: fix assertion failure in net_tx_pkt_add_raw_fragment()

2020-08-04 Thread Jason Wang
From: Mauro Matteo Cascella An assertion failure issue was found in the code that processes network packets while adding data fragments into the packet context. It could be abused by a malicious guest to abort the QEMU process on the host. This patch replaces the affected assert() with a

[PULL 0/2] Net patches

2020-08-04 Thread Jason Wang
The following changes since commit 5c1c3e4f02e458cf280c677c817ae4fd1ed9bf10: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200803' into staging (2020-08-03 20:34:26 +0100) are available in the git repository at: https://github.com/jasowang/qemu.git

Re: cleanups with long-term benefits (was Re: [PATCH] schemas: Add vim modeline)

2020-08-04 Thread Markus Armbruster
Paolo Bonzini writes: > On 03/08/20 18:03, Markus Armbruster wrote: >>> In general it seems like a good idea to use a standard file format and >>> not "a standard file format except for two characters". :) We also >>> wouldn't be having discussions on editors. >> >> No argument. But towards

[PATCH v7 1/8] Introduce yank feature

2020-08-04 Thread Lukas Straub
The yank feature allows to recover from hanging qemu by "yanking" at various parts. Other qemu systems can register themselves and multiple yank functions. Then all yank functions for selected instances can be called by the 'yank' out-of-band qmp command. Available instances can be queried by a

[PATCH v7 3/8] chardev/char-socket.c: Add yank feature

2020-08-04 Thread Lukas Straub
Register a yank function to shutdown the socket on yank. Signed-off-by: Lukas Straub Acked-by: Stefan Hajnoczi --- chardev/char-socket.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index

[PATCH v7 0/8] Introduce 'yank' oob qmp command to recover from hanging qemu

2020-08-04 Thread Lukas Straub
Hello Everyone, In many cases, if qemu has a network connection (qmp, migration, chardev, etc.) to some other server and that server dies or hangs, qemu hangs too. These patches introduce the new 'yank' out-of-band qmp command to recover from these kinds of hangs. The different subsystems register

RE: [PATCH-for-5.1 v2 1/1] accel/xen: Fix xen_enabled() behavior on target-agnostic objects

2020-08-04 Thread Paul Durrant
> -Original Message- > From: Philippe Mathieu-Daudé > Sent: 04 August 2020 09:35 > To: p...@xen.org; qemu-devel@nongnu.org > Cc: 'Peter Maydell' ; 'Anthony Perard' > ; 'Paolo > Bonzini' ; 'Stefano Stabellini' > ; xen- > de...@lists.xenproject.org; 'Paul Durrant' > Subject: Re:

Re: [PATCH-for-5.1] .travis.yml: Deprecate it in favor of GitLab CI

2020-08-04 Thread Thomas Huth
On 04/08/2020 10.30, Philippe Mathieu-Daudé wrote: > As of QEMU 5.2 we prefer to focus our CI development on GitLab. > Mark Travis-CI as deprecated (adding a big warning). > > Signed-off-by: Philippe Mathieu-Daudé > --- > docs/system/deprecated.rst | 11 +++ > .travis.yml

[Bug 1718719] Re: qemu can't capture keys properly under wayland

2020-08-04 Thread Timo Aaltonen
upstream can't reproduce this bug, so I wonder if the backport was incomplete and it's fixed in the current release (1.20.8), could you test again? ** Changed in: xserver Importance: Medium => Unknown ** Changed in: xserver Remote watch: freedesktop.org Bugzilla #102475 =>

Re: [PATCH-for-5.1 v2 1/1] accel/xen: Fix xen_enabled() behavior on target-agnostic objects

2020-08-04 Thread Anthony PERARD
On Tue, Aug 04, 2020 at 09:49:30AM +0200, Philippe Mathieu-Daudé wrote: > CONFIG_XEN is generated by configure and stored in "config-target.h", > which is (obviously) only include for target-specific objects. > This is a problem for target-agnostic objects as CONFIG_XEN is never > defined and

Re: [PATCH for-5.1] docs/devel: Document decodetree no-overlap groups

2020-08-04 Thread Peter Maydell
On Mon, 3 Aug 2020 at 21:57, Richard Henderson wrote: > > When support for this feature went in, the update to the > documentation was forgotten. > > Fixes: 067e8b0f45d6 > Reported-by: Peter Maydell > Signed-off-by: Richard Henderson > --- > docs/devel/decodetree.rst | 29

Re: [RFC PATCH 0/3] .github/workflows: Add GitHub action for Windows WHPX build

2020-08-04 Thread Thomas Huth
On 04/08/2020 10.48, Philippe Mathieu-Daudé wrote: > Reposting Stefan's patch in case we want to merge it in > (I 'd rather not, adding them as GitLab jobs instead): Yeah, we should rather try to consolidate our CI zoo instead of adding yet another one... As mentioned in another mail, I'm

Re: [PATCH v2 1/1] docs: adding NUMA documentation for pseries

2020-08-04 Thread David Gibson
On Mon, Aug 03, 2020 at 10:34:40AM -0300, Daniel Henrique Barboza wrote: > This patch adds a new documentation file, ppc-spapr-numa.rst, > informing what developers and user can expect of the NUMA distance > support for the pseries machine, up to QEMU 5.1. > > In the (hopefully soon) future, when

Re: [PATCH 2/3] async: always set ctx->notified in aio_notify()

2020-08-04 Thread Stefan Hajnoczi
On Tue, Aug 04, 2020 at 09:12:46AM +0200, Paolo Bonzini wrote: > On 04/08/20 07:28, Stefan Hajnoczi wrote: > > @@ -425,19 +425,14 @@ void aio_notify(AioContext *ctx) > > smp_mb(); > > if (atomic_read(>notify_me)) { > > event_notifier_set(>notifier); > > -

[PATCH v1 3/7] tests/qtest/vhost-user-test: prepare the tests for adding new dev class

2020-08-04 Thread Dima Stepanov
For now only vhost-user-net device is supported by the test. Other vhost-user devices are not tested. As a first step make source code refactoring so new devices can reuse the same test routines. To make this provide a new vhost_user_ops structure with the methods to initialize device, its command

[PATCH v1 2/7] vhost: check queue state in the vhost_dev_set_log routine

2020-08-04 Thread Dima Stepanov
If the vhost-user-blk daemon provides only one virtqueue, but device was added with several queues, then QEMU will send more VHOST-USER command than expected by daemon side. The vhost_virtqueue_start() routine handles such case by checking the return value from the virtio_queue_get_desc_addr()

[PATCH v1 7/7] tests/qtest/vhost-user-test: enable the reconnect tests

2020-08-04 Thread Dima Stepanov
For now a QTEST_VHOST_USER_FIXME environment variable is used to separate reconnect tests for the vhost-user-net device. Looks like the reconnect functionality is pretty stable, so this separation is deprecated. Remove it and enable these tests for the default run. Signed-off-by: Dima Stepanov

Re: [PATCH] schemas: Add vim modeline

2020-08-04 Thread Alex Bennée
Daniel P. Berrangé writes: > On Thu, Jul 30, 2020 at 11:07:26AM +0200, Markus Armbruster wrote: >> Andrea Bolognani writes: >> >> > The various schemas included in QEMU use a JSON-based format which >> > is, however, strictly speaking not valid JSON. >> > >> > As a consequence, when vim

Re: [PATCH v2 0/3] testing: Build WHPX enabled binaries

2020-08-04 Thread Daniel P . Berrangé
On Tue, Aug 04, 2020 at 10:10:31AM +0200, Thomas Huth wrote: > On 04/08/2020 09.42, Stefan Weil wrote: > > Am 04.08.20 um 09:23 schrieb Philippe Mathieu-Daudé: > > > >> On 8/4/20 8:55 AM, Stefan Weil wrote: > >>> Am 04.08.20 um 08:43 schrieb Thomas Huth: > >>> > On 03/08/2020 22.25, Stefan

[PULL 0/1] xen queue 2020-08-04

2020-08-04 Thread Anthony PERARD
-dm.git tags/pull-xen-20200804 for you to fetch changes up to 8e0ef068942e4152f0d23e76ca1f5e35dc4456f7: accel/xen: Fix xen_enabled() behavior on target-agnostic objects (2020-08-04 10:21:35 +0100) xen patch Bug fix

[PULL 1/1] accel/xen: Fix xen_enabled() behavior on target-agnostic objects

2020-08-04 Thread Anthony PERARD
From: Philippe Mathieu-Daudé CONFIG_XEN is generated by configure and stored in "config-target.h", which is (obviously) only include for target-specific objects. This is a problem for target-agnostic objects as CONFIG_XEN is never defined and xen_enabled() is always inlined as 'false'. Fix by

Re: [PATCH v2 1/1] docs: adding NUMA documentation for pseries

2020-08-04 Thread Greg Kurz
On Mon, 3 Aug 2020 10:34:40 -0300 Daniel Henrique Barboza wrote: > This patch adds a new documentation file, ppc-spapr-numa.rst, > informing what developers and user can expect of the NUMA distance > support for the pseries machine, up to QEMU 5.1. > > In the (hopefully soon) future, when we

Re: [PATCH 6/7] build: Add SPICE_CFLAGS and SPICE_LIBS to relevant files

2020-08-04 Thread Gerd Hoffmann
On Thu, Jul 23, 2020 at 07:46:14PM +0200, Christophe de Dinechin wrote: > Instead of adding the spice build flags to the top-level build > options, add them where they are necessary. This is a step to move the > burden of linking with spice libraries away from the top-level qemu. > >

Re: [PATCH 5/7] spice: Move all the spice-related code in spice-app.so

2020-08-04 Thread Gerd Hoffmann
On Thu, Jul 23, 2020 at 07:46:13PM +0200, Christophe de Dinechin wrote: > If we want to build spice as a separately loadable module, we need to > put all the spice code in one loadable module, because the build > system does not know how to deal with dependencies yet. I'd tend to think teaching

[PATCH 2/3] hostmem-file: add readonly=on|off option

2020-08-04 Thread Stefan Hajnoczi
Let -object memory-backend-file work on read-only files when the readonly=on option is given. This can be used to share the contents of a file between multiple guests while preventing them from consuming Copy-on-Write memory if guests dirty the pages, for example. Signed-off-by: Stefan Hajnoczi

Re: [PATCH 7/7] spice: Call qemu spice functions indirectly

2020-08-04 Thread Gerd Hoffmann
> > #ifdef CONFIG_SPICE > > +SpiceInfo *qmp_query_spice(Error **errp) > > +{ > > +if (!using_spice) { > > +return NULL; > > +} > > +return qemu_spice.query(errp); > > +} > > + > > It's a bit weird to put the qmp function in the hmp file. Yes, it should go to qmp-cmds.c

[PATCH v1 5/7] tests/qtest/vhost-user-test: add support for the vhost-user-blk device

2020-08-04 Thread Dima Stepanov
Add vhost_user_ops structure for the vhost-user-blk device class. Add the test_reconnect and test_migrate tests for this device. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 140 +- 1 file changed, 138 insertions(+), 2 deletions(-)

[PATCH v1 4/7] tests/qtest/libqos/virtio-blk: add support for vhost-user-blk

2020-08-04 Thread Dima Stepanov
Add support for the vhost-user-blk-pci device. This node can be used by the vhost-user-blk tests. Tests for the vhost-user-blk device are added in the following patches. Signed-off-by: Dima Stepanov --- tests/qtest/libqos/virtio-blk.c | 14 ++ 1 file changed, 14 insertions(+) diff

Re: [PATCH v8 03/20] multi-process: setup PCI host bridge for remote device

2020-08-04 Thread Stefan Hajnoczi
On Fri, Jul 31, 2020 at 02:20:10PM -0400, Jagannathan Raman wrote: > + * This PCI host is purely a container for PCI devices. It's fake in the > + * sense that the guest never sees this PCI host and has no way of > + * accessing it. It's job is just to provide the environment that QEMU

[PATCH v3 2/7] avocado_qemu: Introduce pick_qemu_util to pick qemu utility binaries

2020-08-04 Thread Lukas Straub
This introduces a generic function to pick qemu utility binaries from the build dir, system or via test parameter. Signed-off-by: Lukas Straub --- tests/acceptance/avocado_qemu/__init__.py | 15 +++ 1 file changed, 15 insertions(+) diff --git

Re: [PULL 0/2] Net patches

2020-08-04 Thread Peter Maydell
On Tue, 4 Aug 2020 at 07:41, Jason Wang wrote: > > The following changes since commit 5c1c3e4f02e458cf280c677c817ae4fd1ed9bf10: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20200803' into staging (2020-08-03 > 20:34:26 +0100) > > are available in the git

Re: [PATCH for-5.2 3/6] pc-bios/s390-ccw: Move the inner logic of find_subch() to a separate function

2020-08-04 Thread Claudio Imbrenda
On Tue, 28 Jul 2020 20:37:31 +0200 Thomas Huth wrote: > Move the code to a separate function to be able to re-use it from a > different spot later. > > Signed-off-by: Thomas Huth > --- > pc-bios/s390-ccw/main.c | 99 > - 1 file changed, 57 >

[RFC PATCH 3/3] .github/workflows: Use matrix strategy to parallelize builds

2020-08-04 Thread Philippe Mathieu-Daudé
Using sequencial builds, both jobs take almost 2h to build. By using the matrix strategy we can build the jobs in parallel, reducing the total build time to 1h12m (as of v5.1.0-rc2). Signed-off-by: Philippe Mathieu-Daudé --- .github/workflows/build.sh | 8 .github/workflows/win.yml |

Re: [PATCH for-5.1] Add GitHub action for Windows build

2020-08-04 Thread Daniel P . Berrangé
On Tue, Aug 04, 2020 at 09:29:50AM +0200, Philippe Mathieu-Daudé wrote: > > diff --git a/.github/workflows/win.yml b/.github/workflows/win.yml > > new file mode 100644 > > index 00..81cf48530f > > --- /dev/null > > +++ b/.github/workflows/win.yml > > @@ -0,0 +1,34 @@ > > +# GitHub actions

[Bug 1880326] Re: memory writes make artist_rop8() crash

2020-08-04 Thread Helge Deller
** Changed in: qemu Assignee: (unassigned) => Helge Deller (hdeller) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1880326 Title: memory writes make artist_rop8() crash Status in QEMU: New

Re: [PATCH] target/arm: Rename function disas_ldst_pac to disas_ld_pac

2020-08-04 Thread Peter Maydell
On Tue, 4 Aug 2020 at 01:27, Peter Collingbourne wrote: > > The name disas_ldst_pac is misleading as it implies the existence > of authenticating store instructions, so rename it to avoid that > implication. > > Signed-off-by: Peter Collingbourne The use of ldst here matches the name of this

[PATCH 1/3] memory: add readonly support to memory_region_init_ram_from_file()

2020-08-04 Thread Stefan Hajnoczi
There is currently no way to open(O_RDONLY) and mmap(PROT_READ) when creating a memory region from a file. This functionality is needed since the underlying host file may not allow writing. Add a bool readonly argument to memory_region_init_ram_from_file() and the APIs it calls. Extend

[PATCH 3/3] nvdimm: honor -object memory-backend-file, readonly=on option

2020-08-04 Thread Stefan Hajnoczi
Make it possible to present read-only files to the guest as "unarmed" NVDIMMs. The Linux NVDIMM device (/dev/pmemX) is read-only. Signed-off-by: Stefan Hajnoczi --- docs/nvdimm.txt | 8 +++- hw/mem/nvdimm.c | 4 2 files changed, 11 insertions(+), 1 deletion(-) diff --git

[PATCH 0/3] nvdimm: read-only file support

2020-08-04 Thread Stefan Hajnoczi
There is currently no way to back an NVDIMM with a read-only file so it can be safely shared between untrusted guests. Introduce an -object memory-backend-file,readonly=on|off option. Julio Montes sent an earlier patch here: https://patchew.org/QEMU/20190708211936.8037-1-julio.mon...@intel.com/

Re: [PATCH 7/7] spice: Call qemu spice functions indirectly

2020-08-04 Thread Gerd Hoffmann
Hi, These stubs (picked two examples) ... > -static inline int qemu_spice_set_passwd(const char *passwd, > -bool fail_if_connected, > -bool disconnect_if_connected) > -{ > -return -1; > -} > -static inline

Re: [PATCH 3/3] aio-posix: keep aio_notify_me disabled during polling

2020-08-04 Thread Stefan Hajnoczi
On Tue, Aug 04, 2020 at 06:28:04AM +0100, Stefan Hajnoczi wrote: > @@ -597,15 +574,38 @@ bool aio_poll(AioContext *ctx, bool blocking) > * system call---a single round of run_poll_handlers_once suffices. > */ > if (timeout || ctx->fdmon_ops->need_wait(ctx)) { > +/* > +

Re: [PATCH v2 4/5] virtiofsd: Open lo->source while setting up root in sandbox=NONE mode

2020-08-04 Thread Stefan Hajnoczi
On Mon, Aug 03, 2020 at 09:57:15AM -0400, Vivek Goyal wrote: > On Mon, Aug 03, 2020 at 10:54:59AM +0100, Stefan Hajnoczi wrote: > > On Thu, Jul 30, 2020 at 03:47:35PM -0400, Vivek Goyal wrote: > > > In sandbox=NONE mode, lo->source points to the directory which is being > > > exported. We have not

[PATCH v3 5/7] colo: Introduce high-level test suite

2020-08-04 Thread Lukas Straub
Add high-level test relying on the colo resource-agent to test all failover cases while checking guest network connectivity. Signed-off-by: Lukas Straub --- scripts/colo-resource-agent/crm_master | 44 ++ scripts/colo-resource-agent/crm_resource | 12 + tests/acceptance/colo.py

[PATCH v3 1/7] block/quorum.c: stable children names

2020-08-04 Thread Lukas Straub
If we remove the child with the highest index from the quorum, decrement s->next_child_index. This way we get stable children names as long as we only remove the last child. Signed-off-by: Lukas Straub Fixes: https://bugs.launchpad.net/bugs/1881231 Reviewed-by: Zhang Chen Reviewed-by: Alberto

[PATCH v3 0/7] colo: Introduce resource agent and test suite/CI

2020-08-04 Thread Lukas Straub
Hello Everyone, So here is v3. Patch 1 can already be merged independently of the others. Please review. Regards, Lukas Straub Based-on: "Introduce 'yank' oob qmp command to recover from hanging qemu" Changes: v3: -resource-agent: Don't determine local qemu state by remote master-score,

[PATCH v3 4/7] colo: Introduce resource agent

2020-08-04 Thread Lukas Straub
Introduce a resource agent which can be used to manage qemu COLO in a pacemaker cluster. Signed-off-by: Lukas Straub --- scripts/colo-resource-agent/colo | 1501 ++ 1 file changed, 1501 insertions(+) create mode 100755 scripts/colo-resource-agent/colo diff --git

[PATCH v3 7/7] MAINTAINERS: Add myself as maintainer for COLO resource agent

2020-08-04 Thread Lukas Straub
While I'm not going to have much time for this, I'll still try to test and review patches. Signed-off-by: Lukas Straub --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0886eb3d2b..02090a728b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@

Re: [PATCH for-5.2 5/6] pc-bios/s390-ccw: Scan through all boot devices if none has been specified

2020-08-04 Thread Claudio Imbrenda
On Tue, 28 Jul 2020 20:37:33 +0200 Thomas Huth wrote: > If no boot device has been specified (via "bootindex=..."), the > s390-ccw bios scans through all devices to find a bootable device. maybe a better title for the patch is "scan through all devices if no boot device specified" then, since

[RFC PATCH 1/3] .github/workflows: Add GitHub action for Windows build

2020-08-04 Thread Philippe Mathieu-Daudé
From: Stefan Weil The GitHub action is restricted to https://github.com/qemu/qemu. Signed-off-by: Stefan Weil Message-Id: <20200803202042.1869013-1...@weilnetz.de> Signed-off-by: Philippe Mathieu-Daudé --- .github/workflows/build.sh| 112 ++

Re: device compatibility interface for live migration with assigned devices

2020-08-04 Thread Yan Zhao
> > yes, include a device_api field is better. > > for mdev, "device_type=vfio-mdev", is it right? > > No, vfio-mdev is not a device API, it's the driver that attaches to the > mdev bus device to expose it through vfio. The device_api exposes the > actual interface of the vfio device, it's also

[RFC PATCH 0/3] .github/workflows: Add GitHub action for Windows WHPX build

2020-08-04 Thread Philippe Mathieu-Daudé
Reposting Stefan's patch in case we want to merge it in (I 'd rather not, adding them as GitLab jobs instead): - add MAINTAINERS entry - improve speed by parallelizing jobs Philippe Mathieu-Daudé (2): MAINTAINERS: Add entry for GitHub 'Actions' config files .github/workflows: Use matrix

[RFC PATCH 2/3] MAINTAINERS: Add entry for GitHub 'Actions' config files

2020-08-04 Thread Philippe Mathieu-Daudé
Add an entry for the GitHub 'Actions' configuration files used to build the WHPX Windows installer. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0886eb3d2b..075728421d 100644 --- a/MAINTAINERS +++

Re: [RFC PATCH 3/3] .github/workflows: Use matrix strategy to parallelize builds

2020-08-04 Thread Stefan Weil
Hi Philippe, just a side note: GitHub action runs parallel jobs by default. I use two jobs (32 and 64 bit builds), so both are built at the same time, see https://github.com/stweil/qemu/actions. Regards, Stefan Am 04.08.20 um 10:48 schrieb Philippe Mathieu-Daudé: > Using sequencial builds,

Re: [RFC PATCH 3/3] .github/workflows: Use matrix strategy to parallelize builds

2020-08-04 Thread Philippe Mathieu-Daudé
On 8/4/20 11:04 AM, Stefan Weil wrote: > Hi Philippe, > > just a side note: GitHub action runs parallel jobs by default. I use two > jobs (32 and 64 bit builds), so both are built at the same time, see > https://github.com/stweil/qemu/actions. Indeed... Not sure why my tests ran serialized,

Re: [PATCH-for-5.1] .travis.yml: Deprecate it in favor of GitLab CI

2020-08-04 Thread Daniel P . Berrangé
On Tue, Aug 04, 2020 at 10:30:40AM +0200, Philippe Mathieu-Daudé wrote: > As of QEMU 5.2 we prefer to focus our CI development on GitLab. > Mark Travis-CI as deprecated (adding a big warning). > > Signed-off-by: Philippe Mathieu-Daudé > --- > docs/system/deprecated.rst | 11 +++ >

[PATCH v1 0/7] vhost-user-blk: fix the migration issue and enhance qtests

2020-08-04 Thread Dima Stepanov
Reference e-mail threads: - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg01509.html - https://lists.gnu.org/archive/html/qemu-devel/2020-05/msg05241.html If vhost-user daemon is used as a backend for the vhost device, then we should consider a possibility of disconnect at any

[PATCH v1 6/7] tests/qtest/vhost-user-test: add migrate_reconnect test

2020-08-04 Thread Dima Stepanov
Add new migrate_reconnect test for the vhost-user-blk device. Perform a disconnect after sending response for the VHOST_USER_SET_LOG_BASE command. Signed-off-by: Dima Stepanov --- tests/qtest/vhost-user-test.c | 25 + 1 file changed, 25 insertions(+) diff --git

[PATCH v1 1/7] vhost: recheck dev state in the vhost_migration_log routine

2020-08-04 Thread Dima Stepanov
vhost-user devices can get a disconnect in the middle of the VHOST-USER handshake on the migration start. If disconnect event happened right before sending next VHOST-USER command, then the vhost_dev_set_log() call in the vhost_migration_log() function will return error. This error will lead to

[PATCH v3 3/7] boot_linux.py: Use pick_qemu_util

2020-08-04 Thread Lukas Straub
Replace duplicate code with pick_qemu_util. Signed-off-by: Lukas Straub --- tests/acceptance/boot_linux.py | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py index 0055dc7cee..0d3629cabb 100644 ---

[PATCH v3 6/7] configure,Makefile: Install colo resource-agent

2020-08-04 Thread Lukas Straub
Optionally install the resouce-agent so it gets picked up by pacemaker. Signed-off-by: Lukas Straub --- Makefile | 5 + configure | 10 ++ 2 files changed, 15 insertions(+) diff --git a/Makefile b/Makefile index c2120d8d48..dccc20b120 100644 --- a/Makefile +++ b/Makefile @@

Re: [PATCH 1/2] hw/core: Add bql_interrupt flag to CPUClass

2020-08-04 Thread Eduardo Habkost
On Sun, Aug 02, 2020 at 05:05:04PM +0100, Alex Bennée wrote: > > Eduardo Habkost writes: > > > On Fri, Jul 31, 2020 at 03:14:02PM -0400, Robert Foley wrote: > >> On Fri, 31 Jul 2020 at 13:44, Eduardo Habkost wrote: > >> > > > >> > > +static inline void cpu_class_disable_bql_interrupt(CPUClass

Re: [PATCH 3/7] target/arm: Convert A32 coprocessor insns to decodetree

2020-08-04 Thread Richard Henderson
On 8/3/20 4:18 AM, Peter Maydell wrote: > Convert the A32 coprocessor instructions to decodetree. > > Note that this corrects an underdecoding: for the 64-bit access case > (MRRC/MCRR) we did not check that bits [24:21] were 0b0010, so we > would incorrectly treat LDC/STC as MRRC/MCRR rather than

Re: [PATCH] target/arm: Fix Rt/Rt2 in ESR_ELx for copro traps from AArch32 to 64

2020-08-04 Thread Richard Henderson
On 8/3/20 9:54 AM, Peter Maydell wrote: > +case 14: > +switch (mode) { > +case ARM_CPU_MODE_USR: > +case ARM_CPU_MODE_SYS: > +return 14; > +case ARM_CPU_MODE_HYP: > +return 16; Hyp uses LR_usr... > +case ARM_CPU_MODE_IRQ: > +

[PATCH v8 0/4] Introduce Xilinx ZynqMP CAN controller

2020-08-04 Thread Vikram Garhwal
Changelog: v7 -> v8: Change CAN controller to keep one canbus per controller. Add canbus connections at machine level. Remove ctrl_idx from CAN controller. v6 -> v7: Remove '-m 4G' option from xlnx-can-test. This option causes the fail of docker-quick@centos7 build test. v5

Re: [Bug 1890360] [NEW] Assertion failure in address_space_unmap through virtio-blk

2020-08-04 Thread Alexander Bulekov
Hi Stefan, This looks an awful lot like the one you looked at here: https://www.mail-archive.com/qemu-devel@nongnu.org/msg705719.html though this one is for virtio-pci, while that one was for virtio-mmio: They are probably the same issue, but the original reproducer no longer causes an asserion

Re: device compatibility interface for live migration with assigned devices

2020-08-04 Thread Yan Zhao
On Wed, Aug 05, 2020 at 10:22:15AM +0800, Jason Wang wrote: > > On 2020/8/5 上午12:35, Cornelia Huck wrote: > > [sorry about not chiming in earlier] > > > > On Wed, 29 Jul 2020 16:05:03 +0800 > > Yan Zhao wrote: > > > > > On Mon, Jul 27, 2020 at 04:23:21PM -0600, Alex Williamson wrote: > > (...)

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

2020-08-04 Thread Peter Xu
On Mon, Aug 03, 2020 at 06:00:34PM +0200, Eugenio Pérez wrote: > On Fri, 2020-07-03 at 15:24 +0800, Jason Wang wrote: > > On 2020/7/2 下午11:45, Peter Xu wrote: > > > On Thu, Jul 02, 2020 at 11:01:54AM +0800, Jason Wang wrote: > > > > So I think we agree that a new notifier is needed? > > > Good to

[Bug 1890360] [NEW] Assertion failure in address_space_unmap through virtio-blk

2020-08-04 Thread Alexander Bulekov
Public bug reported: Hello, Reproducer: cat << EOF | ./i386-softmmu/qemu-system-i386 \ -drive id=mydrive,file=null-co://,size=2M,format=raw,if=none \ -device virtio-blk,drive=mydrive \ -nodefaults -nographic -qtest stdio outl 0xcf8 0x80001010 outl 0xcfc 0xc001 outl 0xcf8 0x80001014 outl 0xcf8

  1   2   3   >