On 23.06.20 14:55, Peter Maydell wrote:
> On Mon, 22 Jun 2020 at 16:11, Max Reitz wrote:
>>
>> The following changes since commit bae31bfa48b9caecee25da3d5333901a126a06b4:
>>
>> Merge remote-tracking branch
>> 'remotes/kraxel/tags/audio-20200619-pull-request' into staging (2020-06-19
>> 22:56:
The following changes since commit d88d5a3806d78dcfca648c62dae9d88d3e803bd2:
Merge remote-tracking branch 'remotes/philmd-gitlab/tags/renesas-hw-20200622'
into staging (2020-06-23 13:55:52 +0100)
are available in the Git repository at:
https://github.com/XanClic/qemu.git tags/pull-block-202
From: Philippe Mathieu-Daudé
Commit 96927c744 replaced qdev_init_nofail() call by
isa_realize_and_unref() which has a different error
message. Update the test output accordingly.
Gitlab CI error after merging b77b5b3dc7:
https://gitlab.com/qemu-project/qemu/-/jobs/597414772#L4375
Reported-by: T
From: Vladimir Sementsov-Ogievskiy
820c6bee534ec3b added testing of qcow2.py into 291, and it breaks 291
with external data file. Actually, 291 is bad place for qcow2.py
testing, better add a separate test.
For now, drop qcow2.py testing from 291 to fix the regression.
Fixes: 820c6bee534ec3b
Re
On 24/06/2020 09.27, Max Reitz wrote:
On 23.06.20 14:55, Peter Maydell wrote:
On Mon, 22 Jun 2020 at 16:11, Max Reitz wrote:
The following changes since commit bae31bfa48b9caecee25da3d5333901a126a06b4:
Merge remote-tracking branch
'remotes/kraxel/tags/audio-20200619-pull-request' into st
The following changes since commit 171199f56f5f9bdf1e5d670d09ef1351d8f01bae:
Merge remote-tracking branch
'remotes/alistair/tags/pull-riscv-to-apply-20200619-3' into staging (2020-06-22
14:45:25 +0100)
are available in the Git repository at:
https://github.com/stefanha/qemu.git tags/block-
From: Daniele Buono
Current implementation of LLVM's SafeStack is not compatible with
code that uses an alternate stack created with sigaltstack().
Since coroutine-sigaltstack relies on sigaltstack(), it is not
compatible with SafeStack. The resulting binary is incorrect, with
different coroutine
From: Daniele Buono
This patch adds a flag to enable/disable the SafeStack instrumentation
provided by LLVM.
On enable, make sure that the compiler supports the flags, and that we
are using the proper coroutine implementation (coroutine-ucontext).
On disable, explicitly disable the option if it
QEMU currently only has ASCII Kconfig files but Linux actually uses
UTF-8. Explicitly specify the encoding and that we're doing text file
I/O.
It's unclear whether or not QEMU will ever need Unicode in its Kconfig
files. If we start using the help text then it will become an issue
sooner or later.
From: Daniele Buono
LLVM's SafeStack instrumentation does not yet support programs that make
use of the APIs in ucontext.h
With the current implementation of coroutine-ucontext, the resulting
binary is incorrect, with different coroutines sharing the same unsafe
stack and producing undefined beha
From: Daniele Buono
SafeStack is a stack protection technique implemented in llvm. It is
enabled with a -fsanitize flag.
iotests are currently disabled when any -fsanitize option is used,
because such options tend to produce additional warnings and false
positives.
While common -fsanitize option
A lot of CPU time is spent simply locking/unlocking q->lock during
polling. Check for completion outside the lock to make q->lock disappear
from the profile.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Sergio Lopez
Message-id: 20200617132201.1832152-2-stefa...@redhat.com
Signed-off-by: Stefan Ha
Do not access a CQE after incrementing q->cq.head and releasing q->lock.
It is unlikely that this causes problems in practice but it's a latent
bug.
The reason why it should be safe at the moment is that completion
processing is not re-entrant and the CQ doorbell isn't written until the
end of nvm
There are three issues with the current NVMeRequest->busy field:
1. The busy field is accidentally accessed outside q->lock when request
submission fails.
2. Waiters on free_req_queue are not woken when a request is returned
early due to submission failure.
2. Finding a free request involves
nvme_process_completion() explicitly checks cid so the assertion that
follows is always true:
if (cid == 0 || cid > NVME_QUEUE_SIZE) {
...
continue;
}
assert(cid <= NVME_QUEUE_SIZE);
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Sergio Lopez
Reviewed-by: Philippe Mathieu-Daudé
Existing users access free_req_queue under q->lock. Document this.
Signed-off-by: Stefan Hajnoczi
Reviewed-by: Sergio Lopez
Reviewed-by: Philippe Mathieu-Daudé
Message-id: 20200617132201.1832152-6-stefa...@redhat.com
Signed-off-by: Stefan Hajnoczi
---
block/nvme.c | 2 +-
1 file changed, 1 in
QEMU block drivers are supposed to support aio_poll() from I/O
completion callback functions. This means completion processing must be
re-entrant.
The standard approach is to schedule a BH during completion processing
and cancel it at the end of processing. If aio_poll() is invoked by a
callback f
Passing around both BDRVNVMeState and NVMeQueuePair is unwieldy. Reduce
the number of function arguments by keeping the BDRVNVMeState pointer in
NVMeQueuePair. This will come in handly when a BH is introduced in a
later patch and only one argument can be passed to it.
Signed-off-by: Stefan Hajnocz
Am 23.06.2020 um 20:21 hat Eric Blake geschrieben:
> On 6/23/20 12:55 PM, Kevin Wolf wrote:
> > FAT allows only a restricted set of characters in file names, and for
> > some of the illegal characters, it's actually important that we catch
> > them: If filenames can contain '/', the guest can const
Am 23.06.2020 um 20:30 hat Eric Blake geschrieben:
> On 6/23/20 12:55 PM, Kevin Wolf wrote:
> > array_remove_slice() calls array_roll() with array->next - 1 as the
> > destination index. This is only correct for count == 1, otherwise we're
> > writing past the end of the array. array->next - count
From: Philippe Mathieu-Daudé
Commit 96927c744 replaced qdev_init_nofail() call by
isa_realize_and_unref() which has a different error
message. Update the test output accordingly.
Gitlab CI error after merging b77b5b3dc7:
https://gitlab.com/qemu-project/qemu/-/jobs/597414772#L4375
Reported-by: T
On 6/22/20 5:42 AM, Markus Armbruster wrote:
> There are three ways to configure backends:
>
> * -nic, -serial, -drive, ... (onboard devices)
>
> * Set the property with -device, or, if you feel masochistic, with
> -set device (pluggable devices)
>
> * Set the property with -global (both)
>
On Tue, Jun 23, 2020 at 03:24:54PM +0100, Stefan Hajnoczi wrote:
> On Mon, Jun 22, 2020 at 04:16:04PM +0200, Sergio Lopez wrote:
> > On Fri, Jun 19, 2020 at 02:04:06PM +0100, Stefan Hajnoczi wrote:
> > > On Thu, Jun 11, 2020 at 10:36:22AM +0200, Sergio Lopez wrote:
> > > > Hi,
> > > >
> > > > While
This merely codifies existing practice, with one exception: the rule
advising against returning void, where existing practice is mixed.
When the Error API was created, we adopted the (unwritten) rule to
return void when the function returns no useful value on success,
unlike GError, which recommen
Convert uses like
opts = qemu_opts_create(..., &err);
if (err) {
...
}
to
opts = qemu_opts_create(..., &err);
if (!opts) {
...
}
Eliminate error_propagate() that are now unnecessary. Delete @err
that are now unused.
Signed-off-by: Markus Armbruster
---
Show errp instead of &err where &err is actually unusual. Add a
missing declaration. Add a second error pileup example.
Signed-off-by: Markus Armbruster
---
include/qapi/error.h | 19 +++
1 file changed, 15 insertions(+), 4 deletions(-)
diff --git a/include/qapi/error.h b/incl
When migrate_add_blocker(blocker, &errp) is followed by
error_propagate(errp, err), we can often just as well do
migrate_add_blocker(..., errp).
Do that with this Coccinelle script:
@@
expression blocker, err, errp;
expression ret;
@@
-ret = migrate_add_blocker(blocker, &e
When all we do with an Error we receive into a local variable is
propagating to somewhere else, we can just as well receive it there
right away. Coccinelle script:
@@
identifier fun, err, errp;
expression list args;
@@
-fun(args, &err);
+fun(args, errp);
.
Signed-off-by: Markus Armbruster
---
util/qemu-option.c | 47 ++
1 file changed, 27 insertions(+), 20 deletions(-)
diff --git a/util/qemu-option.c b/util/qemu-option.c
index 9941005c91..ddcf3072c5 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.
macio_newworld_realize() effectively ignores ns->gpio realization
errors, leaking the Error object. Fortunately, macio_gpio_realize()
can't actually fail. Tidy up.
Cc: Mark Cave-Ayland
Cc: David Gibson
Signed-off-by: Markus Armbruster
---
hw/misc/macio/macio.c | 4 +++-
1 file changed, 3 ins
There is just one use so far. The next commit will add more.
Signed-off-by: Markus Armbruster
---
util/qemu-option.c | 27 ++-
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git a/util/qemu-option.c b/util/qemu-option.c
index d9293814b4..3cdf0c0800 100644
--- a
opt_set() frees its argument @value on failure. Slightly unclean;
functions ideally do nothing on failure.
To tidy this up, move opt_create() from opt_set() into its callers,
along with the cleanup.
Signed-off-by: Markus Armbruster
---
util/qemu-option.c | 33 ++---
When all we do with an Error we receive into a local variable is
propagating to somewhere else, we can just as well receive it there
right away. The previous commit did that for simple cases with
Coccinelle. Do it for a few more manually.
Signed-off-by: Markus Armbruster
---
blockdev.c |
Replace
error_setg(&err, ...);
error_propagate(errp, err);
by
error_setg(errp, ...);
Related pattern:
if (...) {
error_setg(&err, ...);
goto out;
}
...
out:
error_propagate(errp, err);
return;
When all paths to label out are that way, replace b
Signed-off-by: Markus Armbruster
---
util/qemu-option.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/util/qemu-option.c b/util/qemu-option.c
index ddcf3072c5..d9293814b4 100644
--- a/util/qemu-option.c
+++ b/util/qemu-option.c
@@ -286,11 +286,9 @@ const char *
Convert
foo(..., &err);
if (err) {
...
}
to
if (!foo(..., &err)) {
...
}
for qdev_realize(), qdev_realize_and_unref(), qbus_realize() and their
wrappers isa_realize_and_unref(), pci_realize_and_unref(),
sysbus_realize(), sysbus_realize_and_unref(), usb_realiz
Signed-off-by: Markus Armbruster
---
include/qom/object.h | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/qom/object.h b/include/qom/object.h
index 94a61ccc3f..b70edd8cd9 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -671,8 +671,7 @@ Object *obj
Signed-off-by: Markus Armbruster
---
qapi/qapi-visit-core.c | 40 +++-
1 file changed, 19 insertions(+), 21 deletions(-)
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c
index 5a9c47aabf..7e5f40e7f0 100644
--- a/qapi/qapi-visit-core.c
+++ b/qapi/qa
virtio_crypto_pci_realize() continues after realization of its
"virtio-crypto-device" fails. Only an object_property_set_link()
follows; looks harmless to me. Tidy up anyway: return after failure,
just like virtio_rng_pci_realize() does.
Cc: "Gonglei (Arei)"
Cc: Michael S. Tsirkin
Signed-off-b
Pass &error_abort instead of NULL where the returned value is
dereferenced or asserted to be non-null.
Signed-off-by: Markus Armbruster
---
hw/core/platform-bus.c | 5 +++--
hw/ppc/spapr_drc.c | 3 ++-
hw/ppc/spapr_hcall.c | 3 ++-
hw/ppc/spapr_pci_nvlink2.c | 8 +---
ui/vn
When foo(..., &err) is followed by error_propagate(errp, err), we can
often just as well do foo(..., errp). The previous commit did that
for simple cases with Coccinelle. Do it for a few more manually.
Signed-off-by: Markus Armbruster
---
accel/kvm/kvm-all.c | 50 ++--
Use visitor functions' return values to check for failure. Eliminate
error_propagate() that are now unnecessary. Delete @err that are now
unused.
Signed-off-by: Markus Armbruster
---
docs/devel/qapi-code-gen.txt | 60 ++--
scripts/qapi/commands.py | 22 +
When creating an image fails because the format doesn't support option
"backing_file" or "backing_fmt", bdrv_img_create() first has
qemu_opt_set() put a generic error into @local_err, then puts the real
error into @errp with error_setg(), and then propagates the former to
the latter, which throws a
s390_pci_set_fid() sets zpci->fid_defined to true even when
visit_type_uint32() failed. Reproducer: "-device zpci,fid=junk".
Harmless in practice, because qdev_device_add() then fails, throwing
away @zpci. Fix it anyway.
Cc: Matthew Rosato
Cc: Cornelia Huck
Signed-off-by: Markus Armbruster
--
When foo(..., &err) is followed by error_propagate(errp, err), we can
often just as well do foo(..., errp). The previous commit did that
for simple cases with Coccinelle. Do it for a few more manually.
Signed-off-by: Markus Armbruster
---
hw/core/bus.c | 6 +-
hw/s390x/s390-v
Signed-off-by: Markus Armbruster
---
qemu-img.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index 27bf94e7ae..c11bfe0268 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -464,22 +464,18 @@ static int add_old_style_options(const char *fmt,
QemuOp
Convert
visit_type_FOO(v, ..., &ptr, &err);
...
if (err) {
...
}
to
visit_type_FOO(v, ..., &ptr, errp);
...
if (!ptr) {
...
}
for functions that set @ptr to non-null / null on success / error.
Eliminate error_propagate() that are now unnecessary.
Signed-off-by: Markus Armbruster
---
block/parallels.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 9e85ab995e..3c22dfdc9d 100644
--- a/block/parallels.c
+++ b/block/parallels.c
@@ -839,6 +839,7 @@ static int parallels_open
Commit 2f262e06f0 lifted qdev_get_type() from qdev to object without
renaming it accordingly. Do that now.
Signed-off-by: Markus Armbruster
---
qom/object.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/qom/object.c b/qom/object.c
index b8aac074c2..f6e9f0e413 100644
--
See recent commit "error: Document Error API usage rules" for
rationale.
Signed-off-by: Markus Armbruster
---
include/qom/object.h| 42 -
include/qom/object_interfaces.h | 12 +++--
include/qom/qom-qobject.h | 4 +-
qom/object.c| 84
When foo(..., &err) is followed by error_propagate(errp, err), we can
often just as well do foo(..., errp). The previous commit did that
for simple cases with Coccinelle. Do it for a few more manually.
Signed-off-by: Markus Armbruster
---
block.c | 2 +-
block/gluster.c | 8 +++
The previous commit enables another round of the transformation from
recent commit "error: Avoid unnecessary error_propagate() after
error_setg()".
Signed-off-by: Markus Armbruster
---
block/quorum.c | 16 +++-
block/replication.c | 12 +---
block/vxhs.c| 10
When the Error API was created, we adopted the (unwritten) rule to
return void when the function returns no useful value on success,
unlike GError, which recommends to return true on success and false on
error then.
When a function returns a distinct error value, say false, a checked
call that pas
The commit before previous enables another round of the transformation
from recent commit "error: Avoid unnecessary error_propagate() after
error_setg()".
Signed-off-by: Markus Armbruster
---
hw/acpi/core.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/hw/ac
This is to make the next commit easier to review.
Signed-off-by: Markus Armbruster
---
util/qemu-option.c | 32 ++--
1 file changed, 18 insertions(+), 14 deletions(-)
diff --git a/util/qemu-option.c b/util/qemu-option.c
index 6119f971a4..9941005c91 100644
--- a/util/
The previous commit enables conversion of
foo(..., &err);
if (err) {
...
}
to
if (!foo(..., &err)) {
...
}
for QemuOpts functions that now return true / false on success /
error. Coccinelle script:
@@
identifier fun = {opts_do_parse, parse_option_bo
The previous commit enables conversion of
visit_foo(..., &err);
if (err) {
...
}
to
if (!visit_foo(..., errp)) {
...
}
for visitor functions that now return true / false on success / error.
Coccinelle script:
@@
identifier fun =~
"check_list|input_t
Just for consistency. Also fix the example in object_set_props()'s
documentation.
Signed-off-by: Markus Armbruster
---
include/qom/object.h | 28 +++-
qom/object.c | 14 +++---
2 files changed, 18 insertions(+), 24 deletions(-)
diff --git a/include/qom/o
When using the Error object to check for error, we need to receive it
into a local variable, then propagate() it to @errp.
Using the return value permits allows receiving it straight to @errp.
Signed-off-by: Markus Armbruster
---
qom/object.c | 10 --
1 file changed, 4 insertions(+), 6
See recent commit "error: Document Error API usage rules" for
rationale.
Signed-off-by: Markus Armbruster
---
docs/devel/qapi-code-gen.txt | 51 +--
include/qapi/clone-visitor.h | 8 +-
include/qapi/visitor-impl.h | 26 +++---
include/qapi/visitor.h| 102 -
When foo(..., &err) is followed by error_propagate(errp, err), we can
often just as well do foo(..., errp). The previous commit did that
for simple cases with Coccinelle. Do it for one more manually.
Signed-off-by: Markus Armbruster
---
hw/block/fdc.c | 8 +++-
1 file changed, 3 insertions
Signed-off-by: Markus Armbruster
---
hw/core/qdev-properties.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index e1ad147339..8eb4283a56 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -653,
See recent commit "error: Document Error API usage rules" for
rationale.
Signed-off-by: Markus Armbruster
---
include/qemu/option.h | 16
blockdev.c| 5 ++-
util/qemu-option.c| 92 +--
3 files changed, 64 insertions(+), 49 deletio
Don't handle object_property_get_link() failure that can't happen
unless the programmer screwed up, pass &error_abort.
Signed-off-by: Markus Armbruster
---
hw/arm/bcm2835_peripherals.c | 7 +--
hw/arm/bcm2836.c | 7 +--
hw/display/bcm2835_fb.c | 8 +---
hw/dma/bcm
See recent commit "error: Document Error API usage rules" for
rationale.
Signed-off-by: Markus Armbruster
---
include/hw/qdev-properties.h | 4 ++--
hw/core/qdev-properties-system.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/hw/qdev-properties.h b/includ
Signed-off-by: Markus Armbruster
---
monitor/hmp-cmds.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index 2b0b58a336..d7810cb564 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -1247,7 +1247,6 @@ void hmp_migrate_
The previous commit enables conversion of
foo(..., &err);
if (err) {
...
}
to
if (!foo(..., errp)) {
...
}
for QOM functions that now return true / false on success / error.
Coccinelle script:
@@
identifier fun = {object_apply_global_props,
object_i
qdev_print_props() receives and throws away Error objects just to
check for object_property_get_str() and object_property_print()
failure. Unnecessary, both return suitable values, so use those
instead.
Signed-off-by: Markus Armbruster
---
qdev-monitor.c | 12 ++--
1 file changed, 6 ins
The previous commit enables conversion of
qdev_prop_set_drive_err(..., &err);
if (err) {
...
}
to
if (!qdev_prop_set_drive_err(..., errp)) {
...
}
Coccinelle script:
@@
identifier fun = qdev_prop_set_drive_err;
expression list args, args2;
typedef Er
Greg Kurz writes:
> On Mon, 15 Jun 2020 07:21:03 +0200
> Markus Armbruster wrote:
>
>> Greg Kurz writes:
>>
>> > On Tue, 17 Mar 2020 18:16:17 +0300
>> > Vladimir Sementsov-Ogievskiy wrote:
>> >
>> >> Introduce a new ERRP_AUTO_PROPAGATE macro, to be used at start of
>> >> functions with an err
On 24/06/20 18:42, Markus Armbruster wrote:
> When the Error API was created, we adopted the (unwritten) rule to
> return void when the function returns no useful value on success,
> unlike GError, which recommends to return true on success and false on
> error then.
I was actually never aware of
On 6/24/20 11:42 AM, Markus Armbruster wrote:
Show errp instead of &err where &err is actually unusual. Add a
missing declaration. Add a second error pileup example.
Signed-off-by: Markus Armbruster
---
include/qapi/error.h | 19 +++
1 file changed, 15 insertions(+), 4 dele
On 6/24/20 11:43 AM, Markus Armbruster wrote:
This merely codifies existing practice, with one exception: the rule
advising against returning void, where existing practice is mixed.
When the Error API was created, we adopted the (unwritten) rule to
return void when the function returns no useful
On 6/24/20 11:43 AM, Markus Armbruster wrote:
Convert
foo(..., &err);
if (err) {
...
}
to
if (!foo(..., &err)) {
...
}
for qdev_realize(), qdev_realize_and_unref(), qbus_realize() and their
wrappers isa_realize_and_unref(), pci_realize_and_unref(),
s
On 6/24/20 11:43 AM, Markus Armbruster wrote:
When all we do with an Error we receive into a local variable is
propagating to somewhere else, we can just as well receive it there
right away. Coccinelle script:
This seems to be a recurring cleanup (witness commit 06592d7e, c0e90679,
6b62d961).
On 6/24/20 11:43 AM, Markus Armbruster wrote:
When all we do with an Error we receive into a local variable is
propagating to somewhere else, we can just as well receive it there
right away. The previous commit did that for simple cases with
Coccinelle. Do it for a few more manually.
Signed-of
On 6/24/20 11:43 AM, Markus Armbruster wrote:
Replace
error_setg(&err, ...);
error_propagate(errp, err);
by
error_setg(errp, ...);
Related pattern:
Nice explanation.
Bonus: the elimination of gotos will make later patches in this series
easier to review.
Candidates for con
On 6/24/20 11:43 AM, Markus Armbruster wrote:
When migrate_add_blocker(blocker, &errp) is followed by
error_propagate(errp, err), we can often just as well do
migrate_add_blocker(..., errp).
Do that with this Coccinelle script:
Double-check @err is not used afterwards. Dereferencing it woul
On 6/24/20 11:43 AM, Markus Armbruster wrote:
Convert uses like
opts = qemu_opts_create(..., &err);
if (err) {
...
}
to
opts = qemu_opts_create(..., &err);
if (!opts) {
...
}
Eliminate error_propagate() that are now unnecessary. Delete @err
tha
On 6/24/20 11:43 AM, Markus Armbruster wrote:
This is to make the next commit easier to review.
Signed-off-by: Markus Armbruster
---
util/qemu-option.c | 32 ++--
1 file changed, 18 insertions(+), 14 deletions(-)
Reviewed-by: Eric Blake
--
Eric Blake, Princip
On 6/24/20 11:43 AM, Markus Armbruster wrote:
Signed-off-by: Markus Armbruster
---
util/qemu-option.c | 47 ++
1 file changed, 27 insertions(+), 20 deletions(-)
Reviewed-by: Eric Blake
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
On 6/24/20 11:43 AM, Markus Armbruster wrote:
Signed-off-by: Markus Armbruster
---
util/qemu-option.c | 13 -
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/util/qemu-option.c b/util/qemu-option.c
index ddcf3072c5..d9293814b4 100644
--- a/util/qemu-option.c
+++ b/ut
On Tue, 23 Jun 2020 16:42:30 +0200
Lukas Straub wrote:
> Hello Everyone,
> In many cases, if qemu has a network connection (qmp, migration, chardev,
> etc.)
> to some other server and that server dies or hangs, qemu hangs too.
> These patches introduce the new 'yank' out-of-band qmp command to r
On Wed, 24 Jun 2020 18:53:05 +0200
Markus Armbruster wrote:
> Greg Kurz writes:
>
> > On Mon, 15 Jun 2020 07:21:03 +0200
> > Markus Armbruster wrote:
> >
> >> Greg Kurz writes:
> >>
> >> > On Tue, 17 Mar 2020 18:16:17 +0300
> >> > Vladimir Sementsov-Ogievskiy wrote:
> >> >
> >> >> Introduce
On 6/24/20 11:43 AM, Markus Armbruster wrote:
There is just one use so far. The next commit will add more.
Signed-off-by: Markus Armbruster
---
util/qemu-option.c | 27 ++-
1 file changed, 18 insertions(+), 9 deletions(-)
Reviewed-by: Eric Blake
--
Eric Blake, P
On 6/24/20 11:43 AM, Markus Armbruster wrote:
opt_set() frees its argument @value on failure. Slightly unclean;
functions ideally do nothing on failure.
To tidy this up, move opt_create() from opt_set() into its callers,
along with the cleanup.
Signed-off-by: Markus Armbruster
---
util/qemu
On 6/24/20 11:43 AM, Markus Armbruster wrote:
See recent commit "error: Document Error API usage rules" for
rationale.
Signed-off-by: Markus Armbruster
---
include/qemu/option.h | 16
blockdev.c| 5 ++-
util/qemu-option.c| 92 +--
On 6/24/20 11:43 AM, Markus Armbruster wrote:
The previous commit enables conversion of
foo(..., &err);
if (err) {
...
}
to
if (!foo(..., &err)) {
...
}
for QemuOpts functions that now return true / false on success /
error. Coccinelle script:
On 6/24/20 11:43 AM, Markus Armbruster wrote:
When foo(..., &err) is followed by error_propagate(errp, err), we can
often just as well do foo(..., errp). The previous commit did that
for simple cases with Coccinelle. Do it for a few more manually.
Signed-off-by: Markus Armbruster
---
block.
On 6/24/20 11:43 AM, Markus Armbruster wrote:
The previous commit enables another round of the transformation from
recent commit "error: Avoid unnecessary error_propagate() after
error_setg()".
Signed-off-by: Markus Armbruster
---
block/quorum.c | 16 +++-
block/replication.
On 6/24/20 11:43 AM, Markus Armbruster wrote:
When creating an image fails because the format doesn't support option
"backing_file" or "backing_fmt", bdrv_img_create() first has
qemu_opt_set() put a generic error into @local_err, then puts the real
error into @errp with error_setg(), and then pro
On 6/24/20 11:43 AM, Markus Armbruster wrote:
Signed-off-by: Markus Armbruster
---
monitor/hmp-cmds.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
Reviewed-by: Eric Blake
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization:
On 6/24/20 12:43 PM, Markus Armbruster wrote:
s390_pci_set_fid() sets zpci->fid_defined to true even when
visit_type_uint32() failed. Reproducer: "-device zpci,fid=junk".
Harmless in practice, because qdev_device_add() then fails, throwing
away @zpci. Fix it anyway.
Cc: Matthew Rosato
Cc: Cor
On 6/24/20 11:43 AM, Markus Armbruster wrote:
See recent commit "error: Document Error API usage rules" for
rationale.
Signed-off-by: Markus Armbruster
---
docs/devel/qapi-code-gen.txt | 51 +--
include/qapi/clone-visitor.h | 8 +-
include/qapi/visitor-impl.h | 26 +++---
i
On 6/24/20 11:43 AM, Markus Armbruster wrote:
The previous commit enables conversion of
visit_foo(..., &err);
if (err) {
...
}
to
if (!visit_foo(..., errp)) {
...
}
for visitor functions that now return true / false on success / error.
Coccinelle scrip
On 6/24/20 11:43 AM, Markus Armbruster wrote:
When foo(..., &err) is followed by error_propagate(errp, err), we can
often just as well do foo(..., errp). The previous commit did that
for simple cases with Coccinelle. Do it for a few more manually.
Signed-off-by: Markus Armbruster
---
Review
On 6/24/20 11:43 AM, Markus Armbruster wrote:
Use visitor functions' return values to check for failure. Eliminate
error_propagate() that are now unnecessary. Delete @err that are now
unused.
Signed-off-by: Markus Armbruster
---
docs/devel/qapi-code-gen.txt | 60 ++--
On 6/24/20 11:43 AM, Markus Armbruster wrote:
Convert
visit_type_FOO(v, ..., &ptr, &err);
...
if (err) {
...
}
to
visit_type_FOO(v, ..., &ptr, errp);
...
if (!ptr) {
...
}
for functions that set @ptr to non-null / null on success / error
On 6/24/20 11:43 AM, Markus Armbruster wrote:
Signed-off-by: Markus Armbruster
---
qapi/qapi-visit-core.c | 40 +++-
1 file changed, 19 insertions(+), 21 deletions(-)
Reviewed-by: Eric Blake
--
Eric Blake, Principal Software Engineer
Red Hat, Inc.
On 6/24/20 11:43 AM, Markus Armbruster wrote:
Signed-off-by: Markus Armbruster
---
block/parallels.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
Reviewed-by: Eric Blake
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qe
1 - 100 of 126 matches
Mail list logo