Re: [Qemu-devel] [RFC PATCH qemu] spapr: Stop providing RTAS blob

2019-07-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190716053522.78813-1-...@ozlabs.ru/ Hi, This series failed build test on FreeBSD host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that has

[Qemu-devel] [RFC PATCH qemu] spapr: Stop providing RTAS blob

2019-07-15 Thread Alexey Kardashevskiy
SLOF implements one itself so let's remove it from QEMU. It is one less image and simpler setup as the RTAS blob never stays in its initial place anyway as the guest OS always decides where to put it. This totally depends on https://patchwork.ozlabs.org/patch/1132440/ , hence RFC. Signed-off-by:

Re: [Qemu-devel] [PATCH v2 10/11] block/backup: support bitmap sync modes for non-bitmap backups

2019-07-15 Thread Markus Armbruster
John Snow writes: > Accept bitmaps and sync policies for the other backup modes. > This allows us to do things like create a bitmap synced to a full backup > without a transaction, or start a resumable backup process. > > Some combinations don't make sense, though: > > - NEVER policy combined

[Qemu-devel] [PATCH] ppc/pnv: Warn when using -initrd and low ram

2019-07-15 Thread Joel Stanley
When booting with the default amount of RAM the powernv machine will load the initrd above the top of RAM and cause the Linux kernel to crash when it attempts to access the initrd: Linux/PowerPC load: Finalizing device tree... flat tree at 0x202770c0 [0.070476] nvram: Failed to find or

[Qemu-devel] [PULL 0/3] Build system and documentation patches for 2019-07-15

2019-07-15 Thread Markus Armbruster
The following changes since commit 5ea8ec2fcf57cb9af24ad2cf17b4d64adb03afdf: Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-07-15' into staging (2019-07-15 16:11:47 +0100) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git

[Qemu-devel] [PULL 3/3] qemu-tech: Fix dangling @menu entries

2019-07-15 Thread Markus Armbruster
Recent commit 2f2c4e4731 "Convert "translator internals" docs to RST, move to devel manual" and commit 282d36b5e2 "qemu-tech.texi: Remove "QEMU compared to other emulators" section" removed @node, but left their @menu entries behind. This broke building qemu-doc.info (but not

[Qemu-devel] [PULL 2/3] Makefile: Fix missing dependency of on qemu-tech.texi

2019-07-15 Thread Markus Armbruster
The qemu-doc.{html,info,pdf,txt} depend on qemu-doc.texi and its include files. Except qemu-tech.texi is missing. Has always been missing as far as I can see. Fix it. Signed-off-by: Markus Armbruster Message-Id: <20190715055736.15214-2-arm...@redhat.com> Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PULL 1/3] Makefile: Fix "make install" when "make all" needs work

2019-07-15 Thread Markus Armbruster
Until recently, target install used to recurse into target directories in its recipe: it ran make install in a for-loop. Since target install depends on target all, this trivially ensured we run the sub-make install only after completing target all. Commit 1338a4b "Makefile: Reuse all's

[Qemu-devel] [PATCH] ppc: Improve SMT experience with TCG accel

2019-07-15 Thread Jose Ricardo Ziviani
It's not possible to specify the number of threads of a guest when running QEMU/TCG. Today, users can have setups like: ... -accel tcg,thread=multi -smp 8,threads=1,cores=8 ... or ... -accel tcg,thread=multi -smp 8,sockets=2,cores=4,threads=1 ... However, the following is not possible: ...

[Qemu-devel] [PATCH 1/1] virtio-net: check guest header length is valid

2019-07-15 Thread Oleinik, Alexander
virtio-net checks that the "out" sg is longer than the guest header, but this check can be skipped if has_net_hdr is 0. Also perform this check if host_hdr_len != guest_hdr_len Signed-off-by: Alexander Oleinik --- hw/net/virtio-net.c | 13 - 1 file changed, 12 insertions(+), 1

[Qemu-devel] [PATCH 0/1] Add check for header length in virtio-net-tx

2019-07-15 Thread Oleinik, Alexander
While fuzzing the virtio-net tx vq, I ran into an assertion failure due to iov_copy offsets larger than the total iov size. Though there is a check to cover this, it does not execute when !n->has_vnet_hdr. This patch tries to fix this. The call stack for the assertion failure: #8 in

Re: [Qemu-devel] [PATCH v4 0/5] spapr: implement dispatch and suspend calls

2019-07-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190716024726.17864-1-npig...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v4 0/5] spapr: implement dispatch and suspend calls Message-id:

[Qemu-devel] [PATCH v4 4/5] spapr: Implement H_JOIN

2019-07-15 Thread Nicholas Piggin
This has been useful to modify and test the Linux pseries suspend code but it requires modification to the guest to call it (due to being gated by other unimplemented features). It is not otherwise used by Linux yet, but work is slowly progressing there. Signed-off-by: Nicholas Piggin ---

[Qemu-devel] [PATCH v4 5/5] spapr: Implement ibm,suspend-me

2019-07-15 Thread Nicholas Piggin
This has been useful to modify and test the Linux pseries suspend code but it requires modification to the guest to call it (due to being gated by other unimplemented features). It is not otherwise used by Linux yet, but work is slowly progressing there. This allows a (lightly modified) guest

[Qemu-devel] [PATCH v4 3/5] spapr: Implement H_CONFER

2019-07-15 Thread Nicholas Piggin
This does not do directed yielding and is not quite as strict as PAPR specifies in terms of precise dispatch behaviour. This generally will mean suboptimal performance, rather than guest misbehaviour. Linux does not rely on exact dispatch behaviour. Signed-off-by: Nicholas Piggin ---

[Qemu-devel] [PATCH v4 0/5] spapr: implement dispatch and suspend calls

2019-07-15 Thread Nicholas Piggin
This series follows on from the previous that added H_PROD and H_CONFER, but I've now aimed to make it conform better to PAPR. It's still not completely there (as explained in comments), but it's better than before and actually better matches KVM that does implement the prod bit and dispatch

[Qemu-devel] [PATCH v4 1/5] spapr: Implement dispatch counter and prod bit on tcg

2019-07-15 Thread Nicholas Piggin
Implement cpu_exec_enter/exit on ppc which calls into new methods of the same name in PPCVirtualHypervisorClass. These are used by spapr to implement these splpar elements, used in subsequent changes. Signed-off-by: Nicholas Piggin --- hw/ppc/spapr.c | 25

[Qemu-devel] [PATCH v4 2/5] spapr: Implement H_PROD

2019-07-15 Thread Nicholas Piggin
H_PROD is added, and H_CEDE is modified to test the prod bit according to PAPR. Signed-off-by: Nicholas Piggin --- hw/ppc/spapr_hcall.c | 29 + 1 file changed, 29 insertions(+) diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c index e615881ac4..8b208ab259

Re: [Qemu-devel] [Qemu-ppc] [PULL 41/44] spapr: change default interrupt mode to 'dual'

2019-07-15 Thread David Gibson
On Mon, Jul 15, 2019 at 12:19:03PM +0200, Cédric Le Goater wrote: > On 11/07/2019 03:26, David Gibson wrote: > > On Wed, Jul 10, 2019 at 06:26:09PM +0200, Laurent Vivier wrote: > >> On 29/05/2019 08:50, David Gibson wrote: > >>> From: Cédric Le Goater > >>> > >>> Now that XIVE support is complete

[Qemu-devel] Fwd: virtio_scsi_ctx_check failed when detach virtio_scsi disk

2019-07-15 Thread l00284672
Forwarded Message Subject:virtio_scsi_ctx_check failed when detach virtio_scsi disk Date: Mon, 15 Jul 2019 23:34:24 +0800 From: l00284672 To: kw...@redhat.com, be...@igalia.com, Stefan Hajnoczi , Paolo Bonzini CC: lizhen...@huawei.com I found a problem 

[Qemu-devel] [PATCH v2] qapi: add dirty-bitmaps to query-named-block-nodes result

2019-07-15 Thread John Snow
From: Vladimir Sementsov-Ogievskiy Let's add a possibility to query dirty-bitmaps not only on root nodes. It is useful when dealing both with snapshots and incremental backups. Signed-off-by: Vladimir Sementsov-Ogievskiy [Added deprecation and feature flag information. --js] Signed-off-by:

[Qemu-devel] [PATCH] migration: consolidate time info into populate_time_info

2019-07-15 Thread Wei Yang
Consolidate time information fill up into its function for better readability. Signed-off-by: Wei Yang --- migration/migration.c | 40 ++-- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index

Re: [Qemu-devel] [PATCH] qapi: add dirty-bitmaps to query-named-block-nodes result

2019-07-15 Thread John Snow
On 6/5/19 8:46 AM, Markus Armbruster wrote: > John Snow writes: > >> On 5/31/19 10:55 AM, Eric Blake wrote: >>> On 5/30/19 11:26 AM, John Snow wrote: On 5/30/19 10:39 AM, Vladimir Sementsov-Ogievskiy wrote: > Let's add a possibility to query dirty-bitmaps not only on root

[Qemu-devel] [PATCH v2 05/11] iotests/257: test API failures

2019-07-15 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/257 | 67 ++ tests/qemu-iotests/257.out | 85 ++ 2 files changed, 152 insertions(+) diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257 index aaa8f59504..53ab31c92e

[Qemu-devel] [PATCH v2 06/11] block/backup: improve sync=bitmap work estimates

2019-07-15 Thread John Snow
When making backups based on bitmaps, the work estimate can be more accurate. Update iotests to reflect the new strategy. TOP work estimates are broken, but do not get worse with this commit. That issue is addressed in the following commits instead. Signed-off-by: John Snow --- block/backup.c

[Qemu-devel] [PATCH v2 11/11] iotests/257: test traditional sync modes

2019-07-15 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/257 | 41 +- tests/qemu-iotests/257.out | 3089 2 files changed, 3128 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257 index 53ab31c92e..c2a72c577a 100755 ---

[Qemu-devel] [PATCH v2 08/11] block/backup: add backup_is_cluster_allocated

2019-07-15 Thread John Snow
Modify the existing bdrv_is_unallocated_range to utilize the pnum return from bdrv_is_allocated; optionally returning a full number of clusters that share the same allocation status. This will be used to carefully toggle bits in the bitmap for sync=top initialization in the following commits.

[Qemu-devel] [PATCH v2 07/11] block/backup: centralize copy_bitmap initialization

2019-07-15 Thread John Snow
Just a few housekeeping changes that keeps the following commit easier to read; perform the initial copy_bitmap initialization in one place. Signed-off-by: John Snow --- block/backup.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git

[Qemu-devel] [PATCH v2 03/11] iotests/257: Refactor backup helpers

2019-07-15 Thread John Snow
This test needs support for non-bitmap backups and missing or unspecified bitmap sync modes, so rewrite the helpers to be a little more generic. Signed-off-by: John Snow --- tests/qemu-iotests/257 | 56 ++- tests/qemu-iotests/257.out | 192 ++--- 2

[Qemu-devel] [PATCH v2 04/11] block/backup: hoist bitmap check into QMP interface

2019-07-15 Thread John Snow
This is nicer to do in the unified QMP interface that we have now, because it lets us use the right terminology back at the user. Signed-off-by: John Snow Reviewed-by: Max Reitz --- block/backup.c | 13 - blockdev.c | 10 ++ 2 files changed, 14 insertions(+), 9

[Qemu-devel] [PATCH v2 09/11] block/backup: teach TOP to never copy unallocated regions

2019-07-15 Thread John Snow
Presently, If sync=TOP is selected, we mark the entire bitmap as dirty. In the write notifier handler, we dutifully copy out such regions. Fix this in three parts: 1. Mark the bitmap as being initialized before the first yield. 2. After the first yield but before the backup loop, interrogate the

[Qemu-devel] [PATCH v2 01/11] iotests/257: add Pattern class

2019-07-15 Thread John Snow
Just kidding, this is easier to manage with a full class instead of a namedtuple. Signed-off-by: John Snow --- tests/qemu-iotests/257 | 58 +++--- 1 file changed, 32 insertions(+), 26 deletions(-) diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257

[Qemu-devel] [PATCH v2 00/11] bitmaps: allow bitmaps to be used with full and top

2019-07-15 Thread John Snow
Based-on: https://github.com/jnsnow/qemu/tree/bitmaps This follows the previous series which adds the 'bitmap' sync mode and uses it to add interactions with bitmaps to the 'full' and 'top' modes to blockdev-backup and drive-backup. Why? on-success: Can conveniently synchronize a bitmap to a

[Qemu-devel] [PATCH v2 02/11] iotests/257: add EmulatedBitmap class

2019-07-15 Thread John Snow
Represent a bitmap with an object that we can mark and clear bits in. This makes it easier to manage partial writes when we don't write a full group's worth of patterns before an error. Signed-off-by: John Snow --- tests/qemu-iotests/257 | 124 + 1 file

[Qemu-devel] [PATCH v2 10/11] block/backup: support bitmap sync modes for non-bitmap backups

2019-07-15 Thread John Snow
Accept bitmaps and sync policies for the other backup modes. This allows us to do things like create a bitmap synced to a full backup without a transaction, or start a resumable backup process. Some combinations don't make sense, though: - NEVER policy combined with any non-BITMAP mode doesn't

Re: [Qemu-devel] [PATCH-for-4.1 v2 9/9] NSIS: Add missing firmware blobs

2019-07-15 Thread Laszlo Ersek
On 07/15/19 19:48, Philippe Mathieu-Daudé wrote: > Various firmwares has been added in the pc-bios/ directory: > > - CCW (since commit 0c1fecdd523) > - Skiboot (since commit bcad45de6a0) > - EDK2(since commit f7fa38b74c3) > > Since we install qemu-system able to run the architectures >

[Qemu-devel] Any function to access nested guest virtual address space?

2019-07-15 Thread Jidong Xiao
Hi, All, I know this function cpu_memory_rw_debug() allows us to access a virtual machine's virtual memory address. Is there any similar function that allows us to access the virtual memory space of a nested virtual machine? i.e., L2. Thanks. -Jidong

Re: [Qemu-devel] [Qemu-riscv] [PATCH 2/2] riscv: sifive_u: Update the plic hart config to support multicore

2019-07-15 Thread Alistair Francis
On Sat, Jul 13, 2019 at 8:23 PM Bin Meng wrote: > > Hi Fabien, > > On Tue, Jul 9, 2019 at 12:31 AM Fabien Chouteau wrote: > > > > Hi Bin, > > > > Thanks for this patch. > > > > I know I am very late to the game but I have a comment here. > > > > On 17/05/2019 17:51, Bin Meng wrote: > > > +/*

Re: [Qemu-devel] [PATCH v2 00/14] Multiple simultaneous audio backends

2019-07-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/cover.1563224628.git.dirty.ice...@gmail.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: cover.1563224628.git.dirty.ice...@gmail.com Type: series Subject: [Qemu-devel] [PATCH v2 00/14]

[Qemu-devel] [PATCH v2 13/14] audio: use size_t where makes sense

2019-07-15 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio.h | 4 +- audio/audio_int.h | 26 +++ audio/audio_template.h | 14 ++-- audio/mixeng.h | 9 +-- audio/rate_template.h | 2 +- include/sysemu/replay.h | 4 +- audio/alsaaudio.c | 26 +++

Re: [Qemu-devel] [RFC PATCH-for-4.1? v2 0/5] semihosting: Build with CONFIG_SEMIHOSTING disabled

2019-07-15 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190715152225.26135-1-phi...@redhat.com/ Hi, This series failed build test on s390x host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that

[Qemu-devel] [PATCH v2 09/14] audio: remove audio_MIN, audio_MAX

2019-07-15 Thread Kővágó, Zoltán
There's already a MIN and MAX macro in include/qemu/osdep.h, use them instead. Signed-off-by: Kővágó, Zoltán Reviewed-by: Marc-André Lureau --- audio/audio.h | 17 - audio/alsaaudio.c | 6 +++--- audio/audio.c | 20 ++--

[Qemu-devel] [PATCH v2 08/14] paaudio: properly disconnect streams in fini_*

2019-07-15 Thread Kővágó, Zoltán
Currently this needs a workaround due to bug #247 in pulseaudio. Signed-off-by: Kővágó, Zoltán Reviewed-by: Marc-André Lureau --- audio/paaudio.c | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index

[Qemu-devel] [PATCH v2 10/14] audio: do not run each backend in audio_run

2019-07-15 Thread Kővágó, Zoltán
audio_run is called manually by alsa and oss backends when polling. In this case only the requesting backend should be run, not all of them. Signed-off-by: Kővágó, Zoltán Reviewed-by: Marc-André Lureau --- audio/audio_int.h | 2 +- audio/alsaaudio.c | 7 +-- audio/audio.c | 14

[Qemu-devel] [PATCH v2 07/14] paaudio: do not move stream when sink/source name is specified

2019-07-15 Thread Kővágó, Zoltán
Unless we disable stream moving, pulseaudio can easily move the stream on connect, effectively ignoring the source/sink specified by the user. Signed-off-by: Kővágó, Zoltán Reviewed-by: Marc-André Lureau --- audio/paaudio.c | 5 + 1 file changed, 5 insertions(+) diff --git

[Qemu-devel] [PATCH v2 14/14] audio: fix memory leak reported by ASAN

2019-07-15 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- audio/audio.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/audio/audio.c b/audio/audio.c index d3c639211d..ebe49f3ca1 100644 --- a/audio/audio.c +++ b/audio/audio.c @@ -1343,6 +1343,12 @@ static void free_audio_state(AudioState *s)

[Qemu-devel] [PATCH v2 06/14] audio: audiodev= parameters no longer optional when -audiodev present

2019-07-15 Thread Kővágó, Zoltán
This means you should probably stop using -soundhw (as it doesn't allow you to specify any options) and add the device manually with -device. The exception is pcspk, it's currently not possible to manually add it. To use it with audiodev, use something like this: -audiodev id=foo,... -global

[Qemu-devel] [PATCH v2 11/14] paaudio: fix playback glitches

2019-07-15 Thread Kővágó, Zoltán
Pulseaudio normally assumes that when the server wants it, the client can generate the audio samples and send it right away. Unfortunately this is not the case with QEMU -- it's up to the emulated system when does it generate the samples. Buffering the samples and sending them from a background

[Qemu-devel] [PATCH v2 12/14] audio: remove read and write pcm_ops

2019-07-15 Thread Kővágó, Zoltán
They just called audio_pcm_sw_read/write anyway, so it makes no sense to have them too. (The noaudio's read is the only exception, but it should work with the generic code too.) Signed-off-by: Kővágó, Zoltán --- audio/audio_int.h | 5 - audio/alsaaudio.c | 12

[Qemu-devel] [PATCH v2 05/14] paaudio: prepare for multiple audiodev

2019-07-15 Thread Kővágó, Zoltán
Have a pool of refcounted connections per server, so if the user creates multiple audiodevs to the same pa server, it will use a single connection. (It will still create different streams, so the user can manage those streams separately in pulseaudio.) Signed-off-by: Kővágó, Zoltán ---

[Qemu-devel] [PATCH v2 02/14] audio: basic support for multi backend audio

2019-07-15 Thread Kővágó, Zoltán
Audio functions no longer access glob_audio_state, instead they get an AudioState as a parameter. This is required in order to support multiple backends. glob_audio_state is also gone, and replaced with a tailq so we can store more than one states. Signed-off-by: Kővágó, Zoltán --- Notes:

[Qemu-devel] [PATCH v2 00/14] Multiple simultaneous audio backends

2019-07-15 Thread Kővágó, Zoltán
Hello, This is the v2 of my audio patches. Copmpared to the previous version, the only major change is the splitting of 2 commits ("basic support for multi backend audio" and "audio: audiodev= parameters no longer optional when -audiodev present") to ease review. I also included a patch that

[Qemu-devel] [PATCH v2 01/14] audio: reduce glob_audio_state usage

2019-07-15 Thread Kővágó, Zoltán
Remove glob_audio_state from functions, where possible without breaking the API. This means that most static functions in audio.c now take an AudioState pointer instead of implicitly using glob_audio_state. Also included a pointer in SWVoice*, HWVoice* structs, so that functions dealing them can

[Qemu-devel] [PATCH v2 04/14] audio: add audiodev properties to frontends

2019-07-15 Thread Kővágó, Zoltán
Finally add audiodev= options to audio frontends so users can specify which backend to use when multiple backends exist. Not specifying an audiodev= option currently causes the first audiodev to be used, this is fixed in the next commit. Example usage: -audiodev pa,id=foo -device

[Qemu-devel] [PATCH v2 03/14] audio: add audiodev property to vnc and wav_capture

2019-07-15 Thread Kővágó, Zoltán
Signed-off-by: Kővágó, Zoltán --- ui/vnc.h| 2 ++ monitor/misc.c | 12 +++- ui/vnc.c| 15 ++- hmp-commands.hx | 13 - qemu-options.hx | 6 ++ 5 files changed, 41 insertions(+), 7 deletions(-) diff --git a/ui/vnc.h b/ui/vnc.h index

[Qemu-devel] [PULL 2/3] target/mips: Add missing 'break' for certain cases of MFTR handling

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic This was found by GCC 8.3 static analysis. Fixes: ead9360e2fb Reported-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Aleksandar Markovic Message-Id:

[Qemu-devel] [PULL 3/3] target/mips: Add missing 'break' for certain cases of MTTR handling

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic This was found by GCC 8.3 static analysis. Fixes: ead9360e2fb Reported-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Aleksandar Markovic Message-Id:

[Qemu-devel] [PULL 1/3] target/mips: Add missing 'break' for a case of MTHC0 handling

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic This was found by GCC 8.3 static analysis. Fixes: 5fb2dcd1792 Reported-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Aleksandar Markovic Message-Id:

[Qemu-devel] [PULL 0/3] MIPS queue for July 15th, 2019

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic The following changes since commit 5ea8ec2fcf57cb9af24ad2cf17b4d64adb03afdf: Merge remote-tracking branch 'remotes/maxreitz/tags/pull-block-2019-07-15' into staging (2019-07-15 16:11:47 +0100) are available in the git repository at:

[Qemu-devel] [PATCH 2/3] block/io_uring: fix EINTR request resubmission

2019-07-15 Thread Stefan Hajnoczi
Adding the request to sq_overflow isn't enough: 1. luringcb->sqeq is uninitialized if there was space in the sq ring at submission time. 2. Not all code paths invoke ioq_submit() after processing completions, so the request could hang. Additional bugs include checking for EINTR instead of

[Qemu-devel] [PATCH 1/3] block/io_uring: add submission and completion trace events

2019-07-15 Thread Stefan Hajnoczi
It is useful to follow individual requests as they are submitted. Add trace events that show details of each request. Signed-off-by: Stefan Hajnoczi --- block/io_uring.c | 5 + block/trace-events | 3 +++ 2 files changed, 8 insertions(+) diff --git a/block/io_uring.c b/block/io_uring.c

[Qemu-devel] [PATCH 3/3] block/io_uring: resubmit short buffered reads

2019-07-15 Thread Stefan Hajnoczi
The io_uring API had unusual read behavior up until recently, where short reads could occur when the start of the file range was in the page cache and a later portion was not in the page cache. Normally read(2) does not expose this detail to applications and this behavior has been fixed in Linux

[Qemu-devel] [PATCH 0/3] block/io_uring: fix EINTR and resubmit short reads

2019-07-15 Thread Stefan Hajnoczi
Short reads are possible with cache=writeback (see Patch 3 for details). Handle this by resubmitting requests until the read is completed. Patch 1 adds trace events useful for debugging io_uring. Patch 2 fixes EINTR. This lays the groundwork for resubmitting requests in Patch 3. Aarushi: Feel

Re: [Qemu-devel] [PATCH v4 00/18] bitmaps: introduce 'bitmap' sync mode

2019-07-15 Thread John Snow
On 7/9/19 7:25 PM, John Snow wrote: > This series adds a new "BITMAP" sync mode that is meant to replace the > existing "INCREMENTAL" sync mode. > > This mode can have its behavior modified by issuing any of three bitmap sync > modes, passed as arguments to the job. > > The three bitmap sync

[Qemu-devel] [PATCH for 4.1 v4 0/5] target/mips: Fixes for 4.1 rc1

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic At the moment, this includes fixes for problems in switch statements found by GCC 8.3 improved code analysis features, and one big endian host fix. v3->v4: - complete the last patch v2->v3: - fix handling of MSA pack instructions on big endian host v1->v2: -

[Qemu-devel] [PATCH for 4.1 v4 3/5] target/mips: Add missing 'break' for certain cases of MFTR handling

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic This was found by GCC 8.3 static analysis. Fixes: ead9360e2fb Reported-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 2 ++ 1 file changed, 2 insertions(+)

[Qemu-devel] [PATCH for 4.1 v4 5/5] target/mips: Fix emulation of MSA pack instructions on big endian hosts

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic Fix emulation of MSA pack instructions on big endian hosts. Signed-off-by: Aleksandar Markovic --- target/mips/msa_helper.c | 74 1 file changed, 74 insertions(+) diff --git a/target/mips/msa_helper.c

[Qemu-devel] [PATCH for 4.1 v4 1/5] target/mips: Add 'fall through' comments for handling nanoMips' SHXS, SWXS

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic This was found by GCC 8.3 static analysis. Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/mips/translate.c b/target/mips/translate.c index f96f141..2be5e2d 100644 ---

[Qemu-devel] [PATCH for 4.1 v4 2/5] target/mips: Add missing 'break' for a case of MTHC0 handling

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic This was found by GCC 8.3 static analysis. Fixes: 5fb2dcd1792 Reported-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 1 + 1 file changed, 1 insertion(+) diff

[Qemu-devel] [PATCH for 4.1 v4 4/5] target/mips: Add missing 'break' for certain cases of MTTR handling

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic This was found by GCC 8.3 static analysis. Fixes: ead9360e2fb Reported-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 2 ++ 1 file changed, 2 insertions(+)

[Qemu-devel] [PATCH for 4.1 v3 5/5] target/mips: Fix emulation of MSA pack instructions on big endian hosts

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic Fix emulation of MSA pack instructions on big endian hosts. Signed-off-by: Aleksandar Markovic --- target/mips/msa_helper.c | 66 1 file changed, 66 deletions(-) diff --git a/target/mips/msa_helper.c

[Qemu-devel] [PATCH for 4.1 v3 4/5] target/mips: Add missing 'break' for certain cases of MTTR handling

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic This was found by GCC 8.3 static analysis. Fixes: ead9360e2fb Reported-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 2 ++ 1 file changed, 2 insertions(+)

[Qemu-devel] [PATCH for 4.1 v3 0/5] target/mips: Fixes for 4.1 rc1

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic At the moment, this includes fixes for problems in switch statements found by GCC 8.3 improved code analysis features, and one big endian host fix. v2->v3: - fix handling of MSA pack instructions on big endian host v1->v2: - excluded the patch on "ucontext" that

[Qemu-devel] [PATCH for 4.1 v3 3/5] target/mips: Add missing 'break' for certain cases of MFTR handling

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic This was found by GCC 8.3 static analysis. Fixes: ead9360e2fb Reported-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 2 ++ 1 file changed, 2 insertions(+)

[Qemu-devel] [PATCH for 4.1 v3 1/5] target/mips: Add 'fall through' comments for handling nanoMips' SHXS, SWXS

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic This was found by GCC 8.3 static analysis. Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/target/mips/translate.c b/target/mips/translate.c index f96f141..2be5e2d 100644 ---

[Qemu-devel] [PATCH for 4.1 v3 2/5] target/mips: Add missing 'break' for a case of MTHC0 handling

2019-07-15 Thread Aleksandar Markovic
From: Aleksandar Markovic This was found by GCC 8.3 static analysis. Fixes: 5fb2dcd1792 Reported-by: Stefan Weil Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Aleksandar Markovic --- target/mips/translate.c | 1 + 1 file changed, 1 insertion(+) diff

Re: [Qemu-devel] [PATCH v3 0/3] qapi: block-dirty-bitmap-remove transaction action

2019-07-15 Thread John Snow
On 7/8/19 6:04 PM, John Snow wrote: > Hi, this is a proposal based off of Vladimir's patchset: > [Qemu-devel] [PATCH 0/4] qapi: block-dirty-bitmap-remove transaction action > > === > V3: > === > > 001/3:[] [--] 'blockdev: reduce aio_context locked sections in bitmap > add/remove' >

Re: [Qemu-devel] [BUG] nanoMIPS support problem related to extract2 support for i386 TCG target

2019-07-15 Thread Aleksandar Markovic
On Sat, Jul 13, 2019 at 9:21 AM Alex Bennée wrote: > > Please see the fix: > > Subject: [PATCH for-4.1] tcg: Fix constant folding of INDEX_op_extract2_i32 > Date: Tue, 9 Jul 2019 14:19:00 +0200 > Message-Id: <20190709121900.25644-1-richard.hender...@linaro.org> > Thanks, this fixed the

[Qemu-devel] [PATCH v5 20/20] hmp: call the asynchronous QMP screendump to fix outdated/glitches

2019-07-15 Thread Marc-André Lureau
In order to fix the bad screendumps (same as rhbz#1230527), call into the asynchonous version of the QMP command. Signed-off-by: Marc-André Lureau --- hmp-commands.hx | 3 ++- include/ui/console.h | 5 ++--- monitor/hmp-cmds.c | 6 ++ ui/console.c | 24

[Qemu-devel] [PATCH v5 18/20] monitor: start making qmp_human_monitor_command() asynchronous

2019-07-15 Thread Marc-André Lureau
This prepares the work for HMP commands to be asynchronous. Start making QMP human-monitor-command asynchronous, although QmpReturn is used synchronously on error or after handle_hmp_command(). Signed-off-by: Marc-André Lureau --- monitor/misc.c | 14 -- qapi/misc.json | 3 ++- 2

[Qemu-devel] [PATCH v5 19/20] monitor: teach HMP about asynchronous commands

2019-07-15 Thread Marc-André Lureau
Similar to how we handle both synchronous and asynchronous commands in QMP, HMP gains a new async_cmd() that will allow the command to complete asynchronously. For interactive reasons, and command ordering, the HMP monitor is suspended until the asynchronous command completes. It is expected that

[Qemu-devel] [PATCH v5 17/20] console: make screendump asynchronous

2019-07-15 Thread Marc-André Lureau
Make screendump asynchronous to provide correct screendumps. For now, HMP doesn't have async support, so it has to remain synchronous and potentially incorrect to avoid races (following patches will add HMP asynchronous commands) Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1230527

[Qemu-devel] [PATCH v5 16/20] console: add graphic_hw_update_done()

2019-07-15 Thread Marc-André Lureau
Add a function to be called when a graphic update is done. Declare the QXL renderer as async: render_update_cookie_num counts the number of outstanding updates, and graphic_hw_update_done() is called when it reaches none. Signed-off-by: Marc-André Lureau Reviewed-by: Gerd Hoffmann ---

[Qemu-devel] [PATCH v5 15/20] monitor: add qmp_return_get_monitor()

2019-07-15 Thread Marc-André Lureau
If necessary, add an helper that can be used to retrieve the associated monitor. This is useful for asynchronous commands that may have to update cur_mon for various reasons. Signed-off-by: Marc-André Lureau --- include/monitor/monitor.h | 3 +++ monitor/qmp.c | 11 +++ 2

[Qemu-devel] [PATCH v5 13/20] scripts: learn 'async' qapi commands

2019-07-15 Thread Marc-André Lureau
Commands with the 'async' key will be registered as async type (see related commit), and will allow a synchronous (in scope callback) or asynchronous return (out-of-scope when ready, in idle etc) by keeping the given QmpReturn and calling qmp_return function later. Ex: { 'command': 'foo-async,

[Qemu-devel] [PATCH v5 14/20] qmp: add qmp_return_is_cancelled()

2019-07-15 Thread Marc-André Lureau
If the client is gone, and the session finished, no need to return. The async handler can use this information to avoid unnecessary work and exit earlier. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/dispatch.h | 8 qapi/qmp-dispatch.c | 10 ++

[Qemu-devel] [PATCH v5 11/20] QmpSession: return orderly

2019-07-15 Thread Marc-André Lureau
QEMU will gain support for asynchronous commands, and may thus finish commands in various order. However, the clients expect replies in order. Let's enforce ordering of replies in QmpReturn: starting from the older command, process each pending QmpReturn, and return until reaching one that is

[Qemu-devel] [PATCH v5 12/20] qmp: introduce asynchronous command type

2019-07-15 Thread Marc-André Lureau
Add a new type of command, QmpCommandFuncAsync: those commands can return later thanks to QmpReturn. This commit introduces the new type and register function and teach qmp_dipatch() to call it without qmp_return(). The async_fn callback will be responsible for calling qmp_return(), either

[Qemu-devel] [PATCH v5 10/20] QmpSession: keep a queue of pending commands

2019-07-15 Thread Marc-André Lureau
The following commit will introduce asynchronous commands. Let's keep the session aware of the pending commands, so we can do interesting things like order the replies, or cancel pending operations when the client is gone. The queue needs a lock, since QmpReturn may be called from any thread.

[Qemu-devel] [PATCH v5 08/20] QmpSession: introduce QmpReturn

2019-07-15 Thread Marc-André Lureau
QmpReturn (and associated functions) is used during synchronous dispatch return for now. It helps to factor out some code for handling a reply context. In the following patches, the QmpReturn will be the basis upon which asynchronous reply will be handled: it will hold the context for a QMP

[Qemu-devel] [PATCH v5 09/20] qmp: simplify qmp_return_error()

2019-07-15 Thread Marc-André Lureau
It's simple, probably more efficient, to hand-craft the dict. Signed-off-by: Marc-André Lureau --- qapi/qmp-dispatch.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/qapi/qmp-dispatch.c b/qapi/qmp-dispatch.c index 405cb291b1..5f75dc27bd 100644 ---

[Qemu-devel] [PATCH v5 07/20] qga: simplify dispatch_return_cb

2019-07-15 Thread Marc-André Lureau
Fold send_response(). qobject_to_json() can't return NULL (it will crash if allocation failed, either in memcpy() or abort from g_realloc()). Signed-off-by: Marc-André Lureau --- qga/main.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/qga/main.c

[Qemu-devel] [PATCH v5 06/20] monitor: use qmp session to parse json feed

2019-07-15 Thread Marc-André Lureau
Use the QmpSession json parser introduced in previous patch to generalize the handling in both qemu & qemu-ga. Unfortunately, since the introduction of OOB, it's not as common as it was before that. We may want to move some of OOB logic in common qmp-dispatch.c/QmpSession though. The QEMU monitor

[Qemu-devel] [PATCH v5 05/20] QmpSession: add json parser and use it in qga

2019-07-15 Thread Marc-André Lureau
Move JSON parser to QmpSession, and implement a simple handler to check the parsed tokens and call qmp_dispatch(). This is enough for a simple QMP client, like QGA. The QEMU monitor has more complicated handling of dispatching which will be addressed in a following patch to benefit from more

[Qemu-devel] [PATCH v5 04/20] QmpSession: add a return callback

2019-07-15 Thread Marc-André Lureau
Introduce a return_cb to allow delaying finishing the dispatch and sending the response asynchronously. For now, this is just modifying qmp_dispatch() to call the callback synchronously. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/dispatch.h | 10 -- monitor/qmp.c |

[Qemu-devel] [PATCH v5 03/20] qmp: add QmpSession

2019-07-15 Thread Marc-André Lureau
This structure will hold various data related to a QMP client session: the list of commands, the parser, the callbacks, the pending operations... Signed-off-by: Marc-André Lureau --- include/qapi/qmp/dispatch.h | 10 +- monitor/misc.c | 6 +++--- monitor/monitor-internal.h

[Qemu-devel] [PATCH v5 02/20] json-lexer: make it safe to call destroy multiple times

2019-07-15 Thread Marc-André Lureau
We can easily avoid the burden of checking if the lexer was initialized prior to calling destroy by the caller, let's do it. This allows simplification in state tracking with the following patch, "qmp: add QmpSession" can call qmp_session_destroy() multiple times, which in turns calls

[Qemu-devel] [PATCH v5 01/20] qmp: constify QmpCommand and list

2019-07-15 Thread Marc-André Lureau
Since 0b69f6f72ce47a37a749b056b6d5ec64c61f11e8 "qapi: remove qmp_unregister_command()", the command list can be declared const. Signed-off-by: Marc-André Lureau --- include/qapi/qmp/dispatch.h | 9 + monitor/misc.c | 2 +- monitor/monitor-internal.h | 2 +-

[Qemu-devel] [PATCH v5 00/20] monitor: add asynchronous command type

2019-07-15 Thread Marc-André Lureau
Hi, HMP and QMP commands are handled synchronously in qemu today. But there are benefits allowing the command handler to re-enter the main loop if the command cannot be handled synchronously, or if it is long-lasting. Some bugs such as rhbz#1230527 are difficult to solve without it. The common

Re: [Qemu-devel] [PATCH v4 17/20] console: make screendump asynchronous

2019-07-15 Thread Marc-André Lureau
On Wed, Apr 10, 2019 at 12:49 PM Gerd Hoffmann wrote: > > > +static void qmp_screendump_finish(QemuConsole *con, struct qmp_screendump > > *dump) > > +{ > > +Error *err = NULL; > > +DisplaySurface *surface; > > +Monitor *prev_mon = cur_mon; > > Why this is needed? > ppm_save() calls

  1   2   3   4   >