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
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
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
---
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
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
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.
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
---
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
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 +++
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
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
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 +
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 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
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
--
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
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
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.
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 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 |
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
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
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
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
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
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 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
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
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 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
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
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
Hi Cédric,
On Mon, Jun 22, 2020 at 10:35 AM Philippe Mathieu-Daudé wrote:
> On 6/22/20 8:49 AM, Cédric Le Goater wrote:
> > On 6/21/20 12:58 AM, Philippe Mathieu-Daudé wrote:
> >> We have 2 distinct PCA9552 devices. Set their description
> >> to distinguish them when looking at the trace events.
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 -
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
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
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
--
When doing reverse blit we need to check if source and dest overlap
but it is not trivial due to possible different base and pitch of
source and dest. Do rectangle overlap if base and pitch match,
otherwise just check if memory area containing the rects overlaps so
rects could possibly overlap.
Si
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/
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,
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
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
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
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
> -Original Message-
> From: Igor Mammedov [mailto:imamm...@redhat.com]
> Sent: 24 June 2020 15:09
> To: Shameerali Kolothum Thodi
> Cc: qemu-devel@nongnu.org; qemu-...@nongnu.org;
> peter.mayd...@linaro.org; m...@redhat.com; Linuxarm
> ; xuwei (O) ;
> eric.au...@redhat.com; Zengtao (B)
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 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 6:54 PM, Philippe Mathieu-Daudé wrote:
> Hi Cédric,
>
> On Mon, Jun 22, 2020 at 10:35 AM Philippe Mathieu-Daudé
> wrote:
>> On 6/22/20 8:49 AM, Cédric Le Goater wrote:
>>> On 6/21/20 12:58 AM, Philippe Mathieu-Daudé wrote:
We have 2 distinct PCA9552 devices. Set their description
Hi Paolo,
On 6/24/20 6:16 PM, Paolo Bonzini wrote:
> On 24/06/20 18:02, Auger Eric wrote:
>> Hi Paolo,
>>
>> On 6/24/20 4:17 PM, Auger Eric wrote:
>>> Hi Paolo,
>>>
>>> On 6/24/20 4:12 PM, Paolo Bonzini wrote:
On 24/06/20 14:43, Eric Auger wrote:
> +op = object_property_try_add(obj, n
> -Original Message-
> From: Igor Mammedov
> Sent: Wednesday, June 24, 2020 8:48 AM
> To: Moger, Babu
> Cc: ehabk...@redhat.com; m...@redhat.com; qemu-devel@nongnu.org;
> pbonz...@redhat.com; r...@twiddle.net
> Subject: Re: [PATCH 1/2] hw/386: Fix uninitialized memory with -device and
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
* Jason Andryuk (jandr...@gmail.com) wrote:
> Hi,
>
> At some point, QEMU changed to add a json VM description (vmdesc)
> after the migration data. The vmdesc is not needed to restore the
> migration data, but qemu_loadvm_state() will read and discard the
> vmdesc to clear the stream when should_
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
From: Prasad J Pandit
Add pci-intack mmio write method to avoid NULL pointer dereference
issue.
Reported-by: Lei Sun
Signed-off-by: Prasad J Pandit
---
hw/pci-host/prep.c | 8
1 file changed, 8 insertions(+)
diff --git a/hw/pci-host/prep.c b/hw/pci-host/prep.c
index 367e408b91..3c8f
On Sun, 21 Jun 2020 01:51:22 +0530
Kirti Wankhede wrote:
> Create mapped iova list when vIOMMU is enabled. For each mapped iova
> save translated address. Add node to list on MAP and remove node from
> list on UNMAP.
> This list is used to track dirty pages during migration.
This seems like a lo
On Sun, 21 Jun 2020 01:51:20 +0530
Kirti Wankhede wrote:
> Added helper functions to get IOMMU info capability chain.
> Added function to get migration capability information from that
> capability chain for IOMMU container.
>
> Similar change was proposed earlier:
> https://lists.gnu.org/archiv
On Sun, 21 Jun 2020 01:51:23 +0530
Kirti Wankhede wrote:
> vfio_listener_log_sync gets list of dirty pages from container using
> VFIO_IOMMU_GET_DIRTY_BITMAP ioctl and mark those pages dirty when all
> devices are stopped and saving state.
> Return early for the RAM block section of mapped MMIO r
From: Prasad J Pandit
Add tz-ppc-dummy mmio read/write methods to avoid assert failure
during initialisation.
Signed-off-by: Prasad J Pandit
---
hw/misc/tz-ppc.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/hw/misc/tz-ppc.c b/hw/misc/tz-ppc.c
index 6431257b52..dc8892f61
On Sun, 21 Jun 2020 01:51:24 +0530
Kirti Wankhede wrote:
> With vIOMMU, IO virtual address range can get unmapped while in pre-copy
> phase of migration. In that case, unmap ioctl should return pages pinned
> in that range and QEMU should find its correcponding guest physical
> addresses and repo
From: Prasad J Pandit
Add vfio quirk device mmio write method to avoid NULL pointer
dereference issue.
Reported-by: Lei Sun
Signed-off-by: Prasad J Pandit
---
hw/vfio/pci-quirks.c | 8
1 file changed, 8 insertions(+)
Update v2: use LOG_GUEST_ERROR
-> https://lists.gnu.org/archive/
On Sun, 21 Jun 2020 01:51:18 +0530
Kirti Wankhede wrote:
> Sequence during _RESUMING device state:
> While data for this device is available, repeat below steps:
> a. read data_offset from where user application should write data.
> b. write data of data_size to migration region from data_offset
qemu_set_nonblock() checks that the file descriptor can be used and, if
not, crashes QEMU. An assert() is used for that. The use of assert() is
used to detect programming error and the coredump will allow to debug
the problem.
But in the case of the tap device, this assert() can be triggered by
a
On Sun, 21 Jun 2020 01:51:21 +0530
Kirti Wankhede wrote:
> Call VFIO_IOMMU_DIRTY_PAGES ioctl to start and stop dirty pages tracking
> for VFIO devices.
>
> Signed-off-by: Kirti Wankhede
> Reviewed-by: Dr. David Alan Gilbert
> ---
> hw/vfio/migration.c | 36
From: Prasad J Pandit
Hello,
* This series asserts that MemoryRegionOps objects define read/write
callback methods. Thus avoids potential NULL pointer dereference.
ex. ->
https://git.qemu.org/?p=qemu.git;a=commit;h=bb15013ef34617eb1344f5276292cadd326c21b2
* Also adds various undefined Memo
From: Prasad J Pandit
When registering a MemoryRegionOps object, assert that its
read/write callback methods are defined. This avoids potential
guest crash via a NULL pointer dereference.
Suggested-by: Peter Maydell
Signed-off-by: Prasad J Pandit
---
memory.c | 10 +-
1 file changed,
From: Prasad J Pandit
Add pcie-msi mmio read method to avoid NULL pointer dereference
issue.
Reported-by: Lei Sun
Signed-off-by: Prasad J Pandit
---
hw/pci-host/designware.c | 9 +
1 file changed, 9 insertions(+)
diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
index
From: Prasad J Pandit
Add ppc-parity mmio write method to avoid NULL pointer dereference
issue.
Reported-by: Lei Sun
Signed-off-by: Prasad J Pandit
---
hw/ppc/prep_systemio.c | 8
1 file changed, 8 insertions(+)
Update v2: use LOG_GUEST_ERROR
-> https://lists.gnu.org/archive/html/
From: Prasad J Pandit
Add nrf51_soc mmio read method to avoid NULL pointer dereference
issue.
Reported-by: Lei Sun
Signed-off-by: Prasad J Pandit
---
hw/nvram/nrf51_nvm.c | 8
1 file changed, 8 insertions(+)
Update v2: return ldl_le_p()
-> https://lists.gnu.org/archive/html/qemu-d
From: Prasad J Pandit
Add digprog mmio write method to avoid assert failure during
initialisation.
Signed-off-by: Prasad J Pandit
---
hw/misc/imx7_ccm.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/hw/misc/imx7_ccm.c b/hw/misc/imx7_ccm.c
index 02fc1ae8d0..5ac5ecf74c 100644
--- a/
From: Prasad J Pandit
Add spapr msi mmio read method to avoid NULL pointer dereference
issue.
Reported-by: Lei Sun
Signed-off-by: Prasad J Pandit
---
hw/ppc/spapr_pci.c | 13 +++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
i
On Wed, Jun 24, 2020 at 1:44 AM Markus Armbruster wrote:
>
> The Error ** argument must be NULL, &error_abort, &error_fatal, or a
> pointer to a variable containing NULL. Passing an argument of the
> latter kind twice without clearing it in between is wrong: if the
> first call sets an error, it
On Sun, Jun 21, 2020 at 11:34 PM Bin Meng wrote:
>
> From: Bin Meng
>
> Now we need to ship the OpenSBI fw_jump.elf image for the
> RISC-V Spike machine, it requires us to create symbolic
> links for pc-bios/*.elf files.
>
> Signed-off-by: Bin Meng
Reviewed-by: Alistair Francis
Alistair
>
>
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:
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 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
object_property_add() does not allow object_property_try_add()
to gracefully fail as &error_abort is passed as an error handle.
However such failure can easily be triggered from the QMP shell when,
for instance, one attempts to create an object with an id that already
exists. This is achived from
This new test checks that attempting to create an object
with an existing ID gracefully fails.
Signed-off-by: Eric Auger
Acked-by: Thomas Huth
---
tests/qtest/qmp-cmd-test.c | 19 +++
1 file changed, 19 insertions(+)
diff --git a/tests/qtest/qmp-cmd-test.c b/tests/qtest/qmp-cmd
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 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
Attempting to add an object through QMP with an id that is
already used leads to a qemu abort. This is a regression since
d2623129a7de ("qom: Drop parameter @errp of object_property_add()
& friends").
The first patch fixes the issue and the second patch adds a test
to check the error is gracefully
On Wed, 24 Jun 2020 19:59:39 +0530
Kirti Wankhede wrote:
> On 6/23/2020 1:58 AM, Alex Williamson wrote:
> > On Sun, 21 Jun 2020 01:51:12 +0530
> > Kirti Wankhede wrote:
> >
> >> These functions save and restore PCI device specific data - config
> >> space of PCI device.
> >> Tested save and r
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 Wed, 24 Jun 2020 at 17:50, Shameerali Kolothum Thodi
wrote:
>
>
>
> > -Original Message-
> > From: Igor Mammedov [mailto:imamm...@redhat.com]
> > doesn't pc_dimm_unplug() do unrealize already?
> > (/me wonders why it doesn't explode here,
> > are we leaking a refference somewhere so dim
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:
301 - 400 of 510 matches
Mail list logo