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
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:
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
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
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
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
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é
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
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:
...
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
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
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:
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
---
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
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
---
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
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
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
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
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
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:
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
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
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
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
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
---
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.
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
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
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
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
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
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
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
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
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
>
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
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:
> > > +/*
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]
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 +++
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
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 ++--
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
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
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
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)
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
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
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
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
---
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:
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
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
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
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
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:
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:
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:
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:
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
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
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
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
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
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:
-
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(+)
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
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
---
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
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(+)
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
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(+)
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
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(+)
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
---
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
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'
>
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
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
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
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
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
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
---
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
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,
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 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
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
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.
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
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
---
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
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
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
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 |
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
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
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 +-
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
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 - 100 of 368 matches
Mail list logo