Re: [PATCH v6 02/12] monitor: Use getter/setter functions for cur_mon

2020-08-05 Thread Markus Armbruster
Kevin Wolf writes: > Am 04.08.2020 um 14:46 hat Markus Armbruster geschrieben: >> > diff --git a/monitor/hmp.c b/monitor/hmp.c >> > index d598dd02bb..f609fcf75b 100644 >> > --- a/monitor/hmp.c >> > +++ b/monitor/hmp.c >> > @@ -1301,11 +1301,11 @@ cleanup: >> > static void monitor_read(void *opaq

Re: [PATCH v6 06/12] monitor: Make current monitor a per-coroutine property

2020-08-05 Thread Markus Armbruster
Kevin Wolf writes: > Am 04.08.2020 um 15:50 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > This way, a monitor command handler will still be able to access the >> > current monitor, but when it yields, all other code code will correctly >> > get NULL from monitor_cur(). >> > >

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

2020-08-05 Thread Markus Armbruster
John Snow writes: > On 8/4/20 4:03 AM, Markus Armbruster wrote: >> The pain of tweaking the parser is likely dwarved several times over by >> the pain of the flag day. > > You mention this often; I wonder if I misunderstand the critique, > because the pain of a "flag day" for a new file format se

Re: [PATCH v2 2/4] iotests: Make qemu_nbd_popen() a contextmanager

2020-08-05 Thread Vladimir Sementsov-Ogievskiy
28.07.2020 19:05, Nir Soffer wrote: On Tue, Jul 28, 2020 at 4:43 PM Vladimir Sementsov-Ogievskiy wrote: 28.07.2020 00:58, Nir Soffer wrote: Instead of duplicating the code to wait until the server is ready and remember to terminate the server and wait for it, make it possible to use like this

Re: [PATCH v11 09/11] qcow2_format.py: collect fields to dump in JSON format

2020-08-05 Thread Vladimir Sementsov-Ogievskiy
29.07.2020 08:56, Andrey Shinkevich wrote: On 28.07.2020 14:09, Vladimir Sementsov-Ogievskiy wrote: 17.07.2020 11:14, Andrey Shinkevich wrote: As __dict__ is being extended with class members we do not want to print, add the to_dict() method to classes that returns a dictionary with desired fie

[Bug 1890395] [NEW] qmp/hmp: crash if client closes socket too early

2020-08-05 Thread Raphael Pour
Public bug reported: Qemu crashes on qmp/hmp command if client closes connection before reading the whole response from the socket. Reproducer: 1. Start arbitrary vm via qemu 2. Send e.g. hmp command 'info mem' 3. Abort before whole response came back Stack Trace: Stack trace of thread 6493:

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

2020-08-05 Thread Marc Zyngier
Hi Peter, On 2020-08-04 20:39, Peter Maydell wrote: When a coprocessor instruction in an AArch32 guest traps to AArch32 Hyp mode, the syndrome register (HSR) includes Rt and Rt2 fields which are simply copies of the Rt and Rt2 fields from the trapped instruction. However, if the instruction is

Re: device compatibility interface for live migration with assigned devices

2020-08-05 Thread Jason Wang
On 2020/8/5 下午3:56, Jiri Pirko wrote: Wed, Aug 05, 2020 at 04:41:54AM CEST, jasow...@redhat.com wrote: On 2020/8/5 上午10:16, Yan Zhao wrote: 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

Re: qapi-schema esotera

2020-08-05 Thread Markus Armbruster
John Snow writes: > On 8/4/20 1:33 AM, Markus Armbruster wrote: >> John Snow writes: >> >>> On 8/3/20 1:25 PM, Eric Blake wrote: On 8/3/20 11:49 AM, John Snow wrote: > UNION is split into two primary forms: > > 1. Simple (No discriminator nor base) > 2. Flat (Discriminator a

Re: [PATCH 0/2] qcow2: Release read-only bitmaps when inactivated

2020-08-05 Thread Vladimir Sementsov-Ogievskiy
30.07.2020 15:02, Max Reitz wrote: Hi, When beginning migration, the qcow2 driver syncs all persistent bitmaps to disk and then releases them. If the user decides to continue on the source after migration, those bitmaps are re-loaded from the qcow2 image. However, we only do this for bitmaps t

Re: [PATCH v6 02/12] monitor: Use getter/setter functions for cur_mon

2020-08-05 Thread Kevin Wolf
Am 05.08.2020 um 09:19 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 04.08.2020 um 14:46 hat Markus Armbruster geschrieben: > >> > diff --git a/monitor/hmp.c b/monitor/hmp.c > >> > index d598dd02bb..f609fcf75b 100644 > >> > --- a/monitor/hmp.c > >> > +++ b/monitor/hmp.c > >> >

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

2020-08-05 Thread Paolo Bonzini
On 05/08/20 09:36, Markus Armbruster wrote: > There's also the longer term pain of having to work around git-blame > unable to see beyond the flag day. Do you really use "git blame" that much? "git log -S" does more or less the same function (in a different way) and is not affected as much by lar

Re: [PATCH v6 06/12] monitor: Make current monitor a per-coroutine property

2020-08-05 Thread Kevin Wolf
Am 05.08.2020 um 09:28 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 04.08.2020 um 15:50 hat Markus Armbruster geschrieben: > >> Kevin Wolf writes: > >> > >> > This way, a monitor command handler will still be able to access the > >> > current monitor, but when it yields, all

Re: Question on implementation detail of `temp_sync`

2020-08-05 Thread Alex Bennée
lrwei writes: > Sorry for the unintentional sending of an uncompleted message. Questions about the internals of the TCG are very much in the remit of qemu-devel so are likely to get missed on qemu-discuss which is more aimed at user questions. > > I understands that the current code works,

Re: [RFC v3 2/8] cpus: prepare new CpusAccel cpu accelerator interface

2020-08-05 Thread Claudio Fontana
Hi all, could you give a check to this detail, marked as a comment here? While doing the refactoring and looking at the history, I _think_ I noticed something that could be wrong related to whpx and hax, and I marked this as a comment. Maybe Paolo? On 8/3/20 11:05 AM, Claudio Fontana wrote: [.

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

2020-08-05 Thread Dr. David Alan Gilbert
* Paolo Bonzini (pbonz...@redhat.com) wrote: > On 05/08/20 09:36, Markus Armbruster wrote: > > There's also the longer term pain of having to work around git-blame > > unable to see beyond the flag day. > > Do you really use "git blame" that much? "git log -S" does more or less > the same functio

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

2020-08-05 Thread Markus Armbruster
Markus Armbruster writes: > Paolo Bonzini writes: [...] >> That said, after a bit more research I'm skeptical about the possibility >> of using an off-the-shelf parser because most of them either don't >> support comments, or are based on YAJL which simply discards comments. >> >> Since '//' com

Re: [PATCH 02/11] target/riscv/vector_helper: Fix build on 32-bit big endian targets

2020-08-05 Thread Thomas Huth
On 04/08/2020 19.46, Philippe Mathieu-Daudé wrote: > On 8/4/20 7:00 PM, Thomas Huth wrote: >> The code currently fails to compile on 32-bit big endian targets: > > s/target/host/ here and in subject? Yes, "host" is better, I'll change that. Thanks, Thomas

Re: [RFC v3 2/8] cpus: prepare new CpusAccel cpu accelerator interface

2020-08-05 Thread Paolo Bonzini
On 05/08/20 10:40, Claudio Fontana wrote: >> #ifdef _WIN32 >> -/* Eat dummy APC queued by qemu_cpu_kick_thread. */ >> +/* Eat dummy APC queued by qemu_cpu_kick_thread. */ >> +/* NB!!! Should not this be if (hax_enabled)? Is this wrong for whpx? */ >> if (!tcg_enabled()) { >>

Re: cleanups with long-term benefits

2020-08-05 Thread Cornelia Huck
On Wed, 5 Aug 2020 10:25:30 +0200 Paolo Bonzini wrote: > On 05/08/20 09:36, Markus Armbruster wrote: > > There's also the longer term pain of having to work around git-blame > > unable to see beyond the flag day. > > Do you really use "git blame" that much? "git log -S" does more or less > th

Re: [PATCH v2 2/4] iotests: Make qemu_nbd_popen() a contextmanager

2020-08-05 Thread Nir Soffer
On Wed, Aug 5, 2020 at 10:38 AM Vladimir Sementsov-Ogievskiy wrote: > > 28.07.2020 19:05, Nir Soffer wrote: > > On Tue, Jul 28, 2020 at 4:43 PM Vladimir Sementsov-Ogievskiy > > wrote: > >> > >> 28.07.2020 00:58, Nir Soffer wrote: > >>> Instead of duplicating the code to wait until the server is r

Re: [RFC v3 2/8] cpus: prepare new CpusAccel cpu accelerator interface

2020-08-05 Thread Claudio Fontana
On 8/5/20 10:47 AM, Paolo Bonzini wrote: > On 05/08/20 10:40, Claudio Fontana wrote: >>> #ifdef _WIN32 >>> -/* Eat dummy APC queued by qemu_cpu_kick_thread. */ >>> +/* Eat dummy APC queued by qemu_cpu_kick_thread. */ >>> +/* NB!!! Should not this be if (hax_enabled)? Is this wrong for

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

2020-08-05 Thread Paolo Bonzini
On 05/08/20 10:39, Dr. David Alan Gilbert wrote: >> Do you really use "git blame" that much? "git log -S" does more or less >> the same function (in a different way) and is not affected as much by >> large code movement and transformation patches. > > I use it a lot! Following stuff back to find

[PATCH-for-5.1 v2 0/2] stubs: Fix notify-event stub linkage error on MinGW

2020-08-05 Thread Philippe Mathieu-Daudé
2 trivial patches to fix the link error reported by Thomas: LINKtests/test-timed-average.exe libqemuutil.a(main-loop.o): In function `qemu_notify_event': util/main-loop.c:139: multiple definition of `qemu_notify_event' tests/test-timed-average.o:/builds/huth/qemu/tests/../stubs/notify-eve

[PATCH-for-5.1 v2 2/2] stubs: Remove qemu_notify_event()

2020-08-05 Thread Philippe Mathieu-Daudé
We don't need the qemu_notify_event() stub anymore. Signed-off-by: Philippe Mathieu-Daudé --- stubs/cpu-get-icount.c | 2 +- stubs/notify-event.c | 6 -- stubs/Makefile.objs| 1 - 3 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 stubs/notify-event.c diff --git a/stu

[PATCH-for-5.1 v2 1/2] exec: Restrict icount to softmmu

2020-08-05 Thread Philippe Mathieu-Daudé
'icount' feature is only meaningful when using softmmu. Move it out of the globally used exec.c, and define it as 'false' in user-mode emulation. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/cpus.h | 4 exec.c| 4 softmmu/cpus.c| 7 +++ 3 files c

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

2020-08-05 Thread Markus Armbruster
Paolo Bonzini writes: > On 05/08/20 09:36, Markus Armbruster wrote: >> There's also the longer term pain of having to work around git-blame >> unable to see beyond the flag day. > > Do you really use "git blame" that much? "git log -S" does more or less > the same function (in a different way) a

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

2020-08-05 Thread Stefan Hajnoczi
On Tue, Aug 04, 2020 at 06:53:09PM +0200, Paolo Bonzini wrote: > On 04/08/20 12:29, Stefan Hajnoczi wrote: > > 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_p

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

2020-08-05 Thread Daniel P . Berrangé
On Wed, Aug 05, 2020 at 10:49:35AM +0200, Paolo Bonzini wrote: > On 05/08/20 10:39, Dr. David Alan Gilbert wrote: > >> Do you really use "git blame" that much? "git log -S" does more or less > >> the same function (in a different way) and is not affected as much by > >> large code movement and tra

Re: [PATCH 11/11] dockerfiles/debian-win64-cross: Download WHPX MinGW headers

2020-08-05 Thread Daniel P . Berrangé
On Tue, Aug 04, 2020 at 08:32:18PM +0200, Stefan Weil wrote: > Am 04.08.20 um 19:00 schrieb Thomas Huth: > > > To compile-test the WHPX accelerator, we need to download these system > > headers first (they are unfortunately not part of any released and > > packaged MinGW toolchain yet). > > > > Id

Re: cleanups with long-term benefits

2020-08-05 Thread Cornelia Huck
On Wed, 5 Aug 2020 10:05:40 +0100 Daniel P. Berrangé wrote: > On Wed, Aug 05, 2020 at 10:49:35AM +0200, Paolo Bonzini wrote: > > On 05/08/20 10:39, Dr. David Alan Gilbert wrote: > > >> Do you really use "git blame" that much? "git log -S" does more or less > > >> the same function (in a differ

Re: [PATCH for-5.2 2/6] pc-bios/s390-ccw: Move ipl-related code from main() into a separate function

2020-08-05 Thread Cornelia Huck
On Wed, 29 Jul 2020 13:05:08 +0200 Thomas Huth wrote: > On 29/07/2020 10.47, Cornelia Huck wrote: > > On Tue, 28 Jul 2020 20:37:30 +0200 > > Thomas Huth wrote: > > > >> Let's move this part of the code into a separate function to be able > >> to use it from multiple spots later. > >> > >> Sig

[PATCH v2 4/5] hw/arm/virt: Move kvm pmu setup to virt_cpu_post_init

2020-08-05 Thread Andrew Jones
Move the KVM PMU setup part of fdt_add_pmu_nodes() to virt_cpu_post_init(), which is a more appropriate location. Now fdt_add_pmu_nodes() is also named more appropriately, because it no longer does anything but fdt node creation. No functional change intended. Signed-off-by: Andrew Jones --- hw

[PATCH v2 0/5] hw/arm/virt: Introduce kvm-steal-time

2020-08-05 Thread Andrew Jones
v2: - Changed the introduction of the feature to 5.2 from 5.1 (The 5.2 machine type patch posted by Cornelia was thrown in for completeness, but I suppose that'll get picked up separately.) - Added a patch adding g_assert_not_reached() to many KVM stubs. (This isn't exactly re

[PATCH v2 1/5] hw: add compat machines for 5.2

2020-08-05 Thread Andrew Jones
From: Cornelia Huck Add 5.2 machine types for arm/i440fx/q35/s390x/spapr. Signed-off-by: Cornelia Huck --- hw/arm/virt.c | 9 - hw/core/machine.c | 3 +++ hw/i386/pc.c | 6 -- hw/i386/pc_piix.c | 14 +- hw/i386/pc_q35.c

[PATCH v2 5/5] hw/arm/virt: Implement kvm-steal-time

2020-08-05 Thread Andrew Jones
We add the kvm-steal-time CPU property and implement it for machvirt. A tiny bit of refactoring was also done to allow pmu and pvtime to use the same vcpu device helper functions. Signed-off-by: Andrew Jones --- docs/system/arm/cpu-features.rst | 11 + hw/arm/virt.c| 43 +

[PATCH v2 3/5] hw/arm/virt: Move post cpu realize check into its own function

2020-08-05 Thread Andrew Jones
We'll add more to this new function in coming patches so we also state the gic must be created and call it below create_gic(). No functional change intended. Signed-off-by: Andrew Jones Reviewed-by: Peter Maydell --- hw/arm/virt.c | 43 +++ 1 file change

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

2020-08-05 Thread Cornelia Huck
On Wed, 29 Jul 2020 13:13:17 +0200 Thomas Huth wrote: > On 29/07/2020 10.54, Cornelia Huck wrote: > > 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: Thom

[PATCH v2 2/5] target/arm/kvm: Make uncalled stubs explicitly unreachable

2020-08-05 Thread Andrew Jones
When we compile without KVM support !defined(CONFIG_KVM) we generate stubs for functions that the linker will still encounter. Sometimes these stubs can be executed safely and are placed in paths where they get executed with or without KVM. Other functions should never be called without KVM. Those

[PATCH] qcow2-cluster: Fix integer left shift error in qcow2_alloc_cluster_link_l2()

2020-08-05 Thread Tuguoyi
When calculating the offset, the result of left shift operation will be promoted to type int64 automatically because the left operand of + operator is uint64_t. but the result after integer promotion may be produce an error value for us and trigger the following asserting error. For example, consi

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

2020-08-05 Thread Peter Maydell
On Tue, 4 Aug 2020 at 21:38, Richard Henderson wrote: > > 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: > > +

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

2020-08-05 Thread Cornelia Huck
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. But so far, it > stops at the very first block device (including virtio-scsi controllers > without attached

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

2020-08-05 Thread Thomas Huth
On 05/08/2020 11.36, Cornelia Huck wrote: > 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. But so far, it >> stops at the very first block device (in

Re: [PATCH-for-5.1 v2 2/2] stubs: Remove qemu_notify_event()

2020-08-05 Thread Philippe Mathieu-Daudé
On 8/5/20 10:55 AM, Philippe Mathieu-Daudé wrote: > We don't need the qemu_notify_event() stub anymore. > > Signed-off-by: Philippe Mathieu-Daudé > --- > stubs/cpu-get-icount.c | 2 +- > stubs/notify-event.c | 6 -- > stubs/Makefile.objs| 1 - > 3 files changed, 1 insertion(+), 8 delet

Re: device compatibility interface for live migration with assigned devices

2020-08-05 Thread Dr. David Alan Gilbert
* Yan Zhao (yan.y.z...@intel.com) wrote: > > > 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

Re: device compatibility interface for live migration with assigned devices

2020-08-05 Thread Yan Zhao
On Wed, Aug 05, 2020 at 04:02:48PM +0800, Jason Wang wrote: > > On 2020/8/5 下午3:56, Jiri Pirko wrote: > > Wed, Aug 05, 2020 at 04:41:54AM CEST, jasow...@redhat.com wrote: > > > On 2020/8/5 上午10:16, Yan Zhao wrote: > > > > On Wed, Aug 05, 2020 at 10:22:15AM +0800, Jason Wang wrote: > > > > > On 202

[PULL 3/6] gitlab-ci.yml: Add build-system-debian and build-system-centos jobs

2020-08-05 Thread Thomas Huth
We were missing the two new targets avr-softmmu and rx-softmmu in the gitlab-CI so far, and did not add some of the "other endianess" targets like sh4eb-softmmu yet. Since the current build-system-* jobs run already for a very long time, let's do not add these missing targets there, but introduce t

[PULL 1/6] tests/docker: Add python3-venv and netcat to the debian-amd64 container

2020-08-05 Thread Thomas Huth
Without python3-venv, I get the following message when trying to run the acceptance tests within the debian container: The virtual environment was not created successfully because ensurepip is not available. On Debian/Ubuntu systems, you need to install the python3-venv package using the follo

[PULL 0/6] Improve gitlab-CI and fix a compiler warning

2020-08-05 Thread Thomas Huth
Hi Peter, the following changes since commit fd3cd581f9dcd11286daacaa5272e721c65aece8: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200804' into staging (2020-08-04 18:20:32 +0100) are available in the Git repository at: https://gitlab.com/huth/qemu.git tags/pull-

[PULL 4/6] gitlab-ci: Fix Avocado cache usage

2020-08-05 Thread Thomas Huth
In commit 6957fd98dc ("gitlab: add avocado asset caching") we tried to save the Avocado cache (as in commit c1073e44b4 with Travis-CI) however it doesn't work as expected. For some reason Avocado uses /root/avocado_cache/ which we can not select later. Manually generate a Avocado config to force t

[PULL 2/6] tests/acceptance: Disable the rx sash and arm cubieboard replay test on Gitlab

2020-08-05 Thread Thomas Huth
These tests always time out on Gitlab, not sure what's happening here. Let's disable them until somebody has enough spare time to debug the issues. Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Cleber Rosa Message-Id: <20200730141326.8260-3-th...@redhat.com> Reviewed-by: Alex Bennée Sig

[PULL 6/6] Get rid of the libqemustub.a remainders

2020-08-05 Thread Thomas Huth
libqemustub.a has been removed in commit ebedb37c8d ("Makefile: Remove libqemustub.a"). Some remainders have been missed. Remove them now. Message-Id: <20200804170055.2851-8-th...@redhat.com> Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- Makefile|

Re: [PATCH-for-5.1 v2 2/2] stubs: Remove qemu_notify_event()

2020-08-05 Thread Philippe Mathieu-Daudé
On 8/5/20 11:42 AM, Philippe Mathieu-Daudé wrote: > On 8/5/20 10:55 AM, Philippe Mathieu-Daudé wrote: >> We don't need the qemu_notify_event() stub anymore. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >> stubs/cpu-get-icount.c | 2 +- >> stubs/notify-event.c | 6 -- >> stubs/Makefile

[PULL 5/6] target/riscv/vector_helper: Fix build on 32-bit big endian hosts

2020-08-05 Thread Thomas Huth
The code currently fails to compile on 32-bit big endian hosts: target/riscv/vector_helper.c: In function 'vext_clear': target/riscv/vector_helper.c:154:16: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast] memset((void *)((uintptr_t)tail & ~(7ULL)), 0

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

2020-08-05 Thread Stefan Hajnoczi
aio_notify() does not set ctx->notified when called with ctx->aio_notify_me disabled. Therefore aio_notify_me needs to be enabled during polling. This is suboptimal since expensive event_notifier_set(&ctx->notifier) and event_notifier_test_and_clear(&ctx->notifier) calls are required when ctx->aio

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

2020-08-05 Thread Stefan Hajnoczi
v2: * Added smp_mb() in aio_notify_accept() [Paolo] * Added comments about memory barrier pairing [Paolo] * Eliminated extra aio_compute_timeout() before calling ppoll() This patch series eliminates ctx->notifier EventNotifier activity when aio_poll() is in polling mode. There is no need to use

[PATCH v2 1/3] async: rename event_notifier_dummy_cb/poll()

2020-08-05 Thread Stefan Hajnoczi
The event_notifier_*() prefix can be confused with the EventNotifier APIs that are also called event_notifier_*(). Rename the functions to aio_context_notifier_*() to make it clear that they relate to the AioContext::notifier field. Signed-off-by: Stefan Hajnoczi --- util/async.c | 8

[PATCH-for-5.1 v3 1/2] exec: Restrict icount to softmmu

2020-08-05 Thread Philippe Mathieu-Daudé
'icount' feature is only meaningful when using softmmu. Move it out of the globally used exec.c, and define it as 'false' in user-mode emulation. Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/cpus.h | 4 exec.c| 4 softmmu/cpus.c| 7 +++ 3 files c

[PATCH v2] qapi/block-core.json: Remove stale description of 'blockdev-add'

2020-08-05 Thread Kashyap Chamarthy
On a 'qemu-discuss' thread[1], Kevin identifies that the current doc blurb for @blockdev-add is stale: This is actually a documentation bug. @id doesn't exist, blockdev-add never creates a BlockBackend. This was different in the very first versions of the patches to add blockdev-add an

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

2020-08-05 Thread Stefan Hajnoczi
Polling only monitors the ctx->notified field and does not need the ctx->notifier EventNotifier to be signalled. Keep ctx->aio_notify_me disabled while polling to avoid unnecessary EventNotifier syscalls. This optimization improves virtio-blk 4KB random read performance by 18%. The following resul

[PATCH-for-5.1 v3 0/2] stubs: Fix notify-event stub linkage error on MinGW

2020-08-05 Thread Philippe Mathieu-Daudé
2 trivial patches to fix the link error reported by Thomas: LINKtests/test-timed-average.exe libqemuutil.a(main-loop.o): In function `qemu_notify_event': util/main-loop.c:139: multiple definition of `qemu_notify_event' tests/test-timed-average.o:/builds/huth/qemu/tests/../stubs/notify-eve

[PATCH-for-5.1 v3 2/2] stubs: Remove qemu_notify_event()

2020-08-05 Thread Philippe Mathieu-Daudé
We don't need the qemu_notify_event() stub anymore. Signed-off-by: Philippe Mathieu-Daudé --- stubs/cpu-get-icount.c | 2 +- stubs/notify-event.c | 6 -- stubs/Makefile.objs| 1 - 3 files changed, 1 insertion(+), 8 deletions(-) delete mode 100644 stubs/notify-event.c diff --git a/stu

[PATCH v2 0/3] block: add logging facility for long standing IO requests

2020-08-05 Thread Denis V. Lunev
There are severe delays with IO requests processing if QEMU is running in virtual machine or over software defined storage. Such delays potentially results in unpredictable guest behavior. For example, guests over IDE or SATA drive could remount filesystem read-only if write is performed longer tha

Re: [PATCH v6 08/12] qmp: Move dispatcher to a coroutine

2020-08-05 Thread Markus Armbruster
Kevin Wolf writes: > This moves the QMP dispatcher to a coroutine and runs all QMP command > handlers that declare 'coroutine': true in coroutine context so they > can avoid blocking the main loop while doing I/O or waiting for other > events. > > For commands that are not declared safe to run in

[PATCH 2/3] block: add logging facility for long standing IO requests

2020-08-05 Thread Denis V. Lunev
There are severe delays with IO requests processing if QEMU is running in virtual machine or over software defined storage. Such delays potentially results in unpredictable guest behavior. For example, guests over IDE or SATA drive could remount filesystem read-only if write is performed longer tha

Re: [PATCH for-5.2 6/6] pc-bios/s390-ccw: Allow booting in case the first virtio-blk disk is bad

2020-08-05 Thread Cornelia Huck
On Tue, 28 Jul 2020 20:37:34 +0200 Thomas Huth wrote: > If you try to boot with two virtio-blk disks (without bootindex), and > only the second one is bootable, the s390-ccw bios currently stops at > the first disk and does not continue booting from the second one. This > is annoying - and all ot

Re: [PATCH for-5.2 6/6] pc-bios/s390-ccw: Allow booting in case the first virtio-blk disk is bad

2020-08-05 Thread Thomas Huth
On 05/08/2020 12.04, Cornelia Huck wrote: > On Tue, 28 Jul 2020 20:37:34 +0200 > Thomas Huth wrote: > >> If you try to boot with two virtio-blk disks (without bootindex), and >> only the second one is bootable, the s390-ccw bios currently stops at >> the first disk and does not continue booting f

Re: cleanups with long-term benefits

2020-08-05 Thread Daniel P . Berrangé
On Wed, Aug 05, 2020 at 11:11:55AM +0200, Cornelia Huck wrote: > On Wed, 5 Aug 2020 10:05:40 +0100 > Daniel P. Berrangé wrote: > > > On Wed, Aug 05, 2020 at 10:49:35AM +0200, Paolo Bonzini wrote: > > > On 05/08/20 10:39, Dr. David Alan Gilbert wrote: > > > >> Do you really use "git blame" that

[PATCH 3/3] block: enable long IO requests report by default

2020-08-05 Thread Denis V. Lunev
Latency threshold is set to 10 seconds following guest request timeout on legacy storage controller. Signed-off-by: Denis V. Lunev CC: Vladimir Sementsov-Ogievskiy CC: Stefan Hajnoczi CC: Kevin Wolf CC: Max Reitz --- blockdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --

[PATCH 1/3] block/block-backend: add converter from BlockAcctStats to BlockBackend

2020-08-05 Thread Denis V. Lunev
Right now BlockAcctStats is always reside on BlockBackend. This structure is not used in any other place. Thus we are able to create a converter from one pointer to another. Signed-off-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy CC: Stefan Hajnoczi CC: Kevin Wolf CC: Max Reitz

Re: [PATCH-for-5.1 v3 1/2] exec: Restrict icount to softmmu

2020-08-05 Thread Claudio Fontana
Hi Philippe, could you take a look if this series already addresses the issue? https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg00067.html Everything icount related is already moved to softmmu and made TCG only. I will post a new version of the series today with a couple changes; the s

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

2020-08-05 Thread Alex Bennée
Markus Armbruster writes: > Paolo Bonzini writes: > >> On 05/08/20 09:36, Markus Armbruster wrote: >>> There's also the longer term pain of having to work around git-blame >>> unable to see beyond the flag day. >> >> Do you really use "git blame" that much? "git log -S" does more or less >> t

Re: cleanups with long-term benefits

2020-08-05 Thread Cornelia Huck
On Wed, 5 Aug 2020 11:08:02 +0100 Daniel P. Berrangé wrote: > On Wed, Aug 05, 2020 at 11:11:55AM +0200, Cornelia Huck wrote: > > On Wed, 5 Aug 2020 10:05:40 +0100 > > Daniel P. Berrangé wrote: > > > > > On Wed, Aug 05, 2020 at 10:49:35AM +0200, Paolo Bonzini wrote: > > > > On 05/08/20 10:39

Re: [PATCH for-5.2 6/6] pc-bios/s390-ccw: Allow booting in case the first virtio-blk disk is bad

2020-08-05 Thread Cornelia Huck
On Wed, 5 Aug 2020 12:08:59 +0200 Thomas Huth wrote: > On 05/08/2020 12.04, Cornelia Huck wrote: > > On Tue, 28 Jul 2020 20:37:34 +0200 > > Thomas Huth wrote: > > > >> If you try to boot with two virtio-blk disks (without bootindex), and > >> only the second one is bootable, the s390-ccw bios

Re: [PATCH v3 3/7] device-core: use RCU for list of childs of a bus

2020-08-05 Thread Stefan Hajnoczi
On Wed, Jul 15, 2020 at 06:01:55PM +0300, Maxim Levitsky wrote: > This fixes the race between device emulation code that tries to find > a child device to dispatch the request to (e.g a scsi disk), > and hotplug of a new device to that bus. > > Note that this doesn't convert all the readers of the

Re: [PATCH v3 4/7] device-core: use atomic_set on .realized property

2020-08-05 Thread Stefan Hajnoczi
On Wed, Jul 15, 2020 at 06:01:56PM +0300, Maxim Levitsky wrote: > Some code might race with placement of new devices on a bus. > We currently first place a (unrealized) device on the bus > and then realize it. > > As a workaround, users that scan the child device list, can > check the realized pro

Re: [PATCH v6 09/12] hmp: Add support for coroutine command handlers

2020-08-05 Thread Markus Armbruster
Kevin Wolf writes: > Often, QMP command handlers are not only called to handle QMP commands, > but also from a corresponding HMP command handler. In order to give them > a consistent environment, optionally run HMP command handlers in a > coroutine, too. > > The implementation is a lot simpler th

Re: [PATCH-for-5.1 v3 1/2] exec: Restrict icount to softmmu

2020-08-05 Thread Philippe Mathieu-Daudé
On 8/5/20 12:12 PM, Claudio Fontana wrote: > Hi Philippe, > > could you take a look if this series already addresses the issue? > > https://lists.gnu.org/archive/html/qemu-devel/2020-08/msg00067.html I had tagged this series as "after-release" review and hadn't looked at it yet :) > > Everythi

Re: [PATCH v3 6/7] scsi: Add scsi_device_get

2020-08-05 Thread Stefan Hajnoczi
On Wed, Jul 15, 2020 at 06:01:58PM +0300, Maxim Levitsky wrote: > Add scsi_device_get which finds the scsi device > and takes a reference to it. > > Suggested-by: Stefan Hajnoczi > Signed-off-by: Maxim Levitsky > --- > hw/scsi/scsi-bus.c | 31 --- > include/hw/sc

Re: [PATCH 02/18] migration/vmstate: Introduce vmstate_no_state_to_migrate

2020-08-05 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On Fri, 3 Jul 2020 at 21:19, Philippe Mathieu-Daudé wrote: > > > > Introduce a special state to indicate when an object doesn't > > have anything in its state to migrate. > > > > Suggested-by: Peter Maydell > > Signed-off-by: Philippe Mathieu-D

Re: [PATCH v3 0/7] Fix scsi devices plug/unplug races w.r.t virtio-scsi iothread

2020-08-05 Thread Stefan Hajnoczi
On Wed, Jul 15, 2020 at 06:01:52PM +0300, Maxim Levitsky wrote: > Hi! > > This is a patch series that is a result of my discussion with Paulo on > how to correctly fix the root cause of the BZ #1812399. Reviewed-by: Stefan Hajnoczi signature.asc Description: PGP signature

Re: [PATCH v2 4/4] net/colo: Match is-enabled probe to tracepoint

2020-08-05 Thread Stefan Hajnoczi
On Wed, Jul 29, 2020 at 01:34:52PM +0100, Daniel P. Berrangé wrote: > On Wed, Jul 29, 2020 at 03:33:22PM +0300, Roman Bolshakov wrote: > > On Tue, Jul 21, 2020 at 03:06:57PM +0100, Daniel P. Berrangé wrote: > > > On Sat, Jul 18, 2020 at 05:58:56PM +, Zhang, Chen wrote: > > > > > > > > > > > >

Re: [PULL 0/6] Improve gitlab-CI and fix a compiler warning

2020-08-05 Thread Peter Maydell
On Wed, 5 Aug 2020 at 10:58, Thomas Huth wrote: > > Hi Peter, > > the following changes since commit fd3cd581f9dcd11286daacaa5272e721c65aece8: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20200804' into staging (2020-08-04 > 18:20:32 +0100) > > are available in th

[Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64

2020-08-05 Thread Peter Maydell
v2 is here https://patches.linaro.org/patch/247434/ -- hoping to put that in master today... -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1879587 Title: Register number in ESR is incorrect for cer

Re: [PATCH 1/2] qcow2: Release read-only bitmaps when inactivated

2020-08-05 Thread Vladimir Sementsov-Ogievskiy
30.07.2020 15:02, Max Reitz wrote: During migration, we release all bitmaps after storing them on disk, as long as they are (1) stored on disk, (2) not read-only, and (3) consistent. (2) seems arbitrary, though. The reason we do not release them is because we do not write them, as there is no n

v8.1M cpu emulation and target-arm feature-identification strategy

2020-08-05 Thread Peter Maydell
Mostly recently we've been aiming for QEMU emulation code in target/arm to use ID register fields to determine whether a feature is present or not (the isar_feature_* functions) rather than the old style of defining ARM_FEATURE_* flags. This seems to be working out well for A-profile. However, for

Re: [PATCH v12 01/11] iotests: add test for QCOW2 header dump

2020-08-05 Thread Vladimir Sementsov-Ogievskiy
30.07.2020 17:15, Andrey Shinkevich wrote: The simple script creates a QCOW2 image and fills it with some data. Two bitmaps are created as well. Then the script reads the image header with extensions from the disk by running the script qcow2.py and dumps the information to the output. Other entit

Re: [PATCH v6 00/12] monitor: Optionally run handlers in coroutines

2020-08-05 Thread Markus Armbruster
Markus Armbruster writes: > I let this series slide to get my Error API rework done, along with much > else. My sincere apologies! > > Unsurprisingly, it needs a rebase now. I suggest to let me review it as > is first. I'm done with v6. Summary: * A few trivial things to correct here and the

Re: device compatibility interface for live migration with assigned devices

2020-08-05 Thread Sean Mooney
On Wed, 2020-08-05 at 12:53 +0200, Jiri Pirko wrote: > Wed, Aug 05, 2020 at 11:33:38AM CEST, yan.y.z...@intel.com wrote: > > On Wed, Aug 05, 2020 at 04:02:48PM +0800, Jason Wang wrote: > > > > > > On 2020/8/5 下午3:56, Jiri Pirko wrote: > > > > Wed, Aug 05, 2020 at 04:41:54AM CEST, jasow...@redhat.c

Re: [PATCH-for-5.1 v3 0/2] stubs: Fix notify-event stub linkage error on MinGW

2020-08-05 Thread Thomas Huth
On 05/08/2020 12.01, Philippe Mathieu-Daudé wrote: > 2 trivial patches to fix the link error reported by Thomas: > > LINKtests/test-timed-average.exe > libqemuutil.a(main-loop.o): In function `qemu_notify_event': > util/main-loop.c:139: multiple definition of `qemu_notify_event' > > test

Re: [PATCH-for-5.1 v2 2/2] stubs: Remove qemu_notify_event()

2020-08-05 Thread Thomas Huth
On 05/08/2020 11.59, Philippe Mathieu-Daudé wrote: > On 8/5/20 11:42 AM, Philippe Mathieu-Daudé wrote: >> On 8/5/20 10:55 AM, Philippe Mathieu-Daudé wrote: >>> We don't need the qemu_notify_event() stub anymore. >>> >>> Signed-off-by: Philippe Mathieu-Daudé >>> --- >>> stubs/cpu-get-icount.c | 2

Re: virtio-fs performance

2020-08-05 Thread Stefan Hajnoczi
On Tue, Aug 04, 2020 at 03:37:26PM +0800, Derek Su wrote: > 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=1

Re: Any reason VIRTQUEUE_MAX_SIZE is 1024? Can we increase this limit?

2020-08-05 Thread Stefan Hajnoczi
On Thu, Jul 30, 2020 at 07:46:09AM +, Yajun Wu wrote: > I'm doing iperf test on VIRTIO net through vhost-user(HW VDPA). > Find maximal acceptable tx_queue_size/rx_queue_size is 1024. > Basically increase queue size can get better RX rate for my case. > > Can we increase the limit(VIRTQUEUE_MAX

Re: [PATCH v12 01/11] iotests: add test for QCOW2 header dump

2020-08-05 Thread Andrey Shinkevich
On 05.08.2020 14:23, Vladimir Sementsov-Ogievskiy wrote: 30.07.2020 17:15, Andrey Shinkevich wrote: The simple script creates a QCOW2 image and fills it with some data. Two bitmaps are created as well. Then the script reads the image header with extensions from the disk by running the script qco

Re: Any reason VIRTQUEUE_MAX_SIZE is 1024? Can we increase this limit?

2020-08-05 Thread Michael S. Tsirkin
On Wed, Aug 05, 2020 at 01:11:07PM +0100, Stefan Hajnoczi wrote: > On Thu, Jul 30, 2020 at 07:46:09AM +, Yajun Wu wrote: > > I'm doing iperf test on VIRTIO net through vhost-user(HW VDPA). > > Find maximal acceptable tx_queue_size/rx_queue_size is 1024. > > Basically increase queue size can get

Re: v8.1M cpu emulation and target-arm feature-identification strategy

2020-08-05 Thread Philippe Mathieu-Daudé
On 8/5/20 1:08 PM, Peter Maydell wrote: > Mostly recently we've been aiming for QEMU emulation code in > target/arm to use ID register fields to determine whether a > feature is present or not (the isar_feature_* functions) rather > than the old style of defining ARM_FEATURE_* flags. This seems to

[PATCH] Following SHA-1: b8d89ba83bf42be1f7b1d7d45236eaf6960d1c4e * crypto: move common bits for all emulators to libqemuutil

2020-08-05 Thread luoyonggang
From: Yonggang Luo qcrypto_random_*, AES and qcrypto_init do not need to be linked as a whole and are the only parts that are used by user-mode emulation. Place them in libqemuutil, so that whatever needs them will pick them up automatically. Signed-off-by: Yonggang Luo --- crypto/Makefile.ob

Re: [PATCH 1/3] tools/virtiofsd: xattr name mappings: Add option

2020-08-05 Thread Stefan Hajnoczi
On Mon, Aug 03, 2020 at 08:15:09PM +0100, Dr. David Alan Gilbert (git) wrote: > diff --git a/docs/tools/virtiofsd.rst b/docs/tools/virtiofsd.rst > index 824e713491..82b6f6d90a 100644 > --- a/docs/tools/virtiofsd.rst > +++ b/docs/tools/virtiofsd.rst > @@ -107,6 +107,51 @@ Options >performance.

Re: [PATCH 11/11] dockerfiles/debian-win64-cross: Download WHPX MinGW headers

2020-08-05 Thread Yonggang Luo
Fixes in mingw seems not possible and would broken lots of things, the better way may change all include of Windows API headers to lowercase, On Wed, Aug 5, 2020 at 5:12 PM Daniel P. Berrangé wrote: > On Tue, Aug 04, 2020 at 08:32:18PM +0200, Stefan Weil wrote: > > Am 04.08.20 um 19:00 schrieb

Re: [PATCH v4 00/18] Convert QAPI doc comments to generate rST instead of texinfo

2020-08-05 Thread Markus Armbruster
I let this series slide to get my Error API rework done, along with much else. My sincere apologies! Unsurprisingly, it needs a rebase now. I suggest to let me resume review first.

  1   2   3   >