On 7/6/20 12:15 AM, Klaus Jensen wrote:
> On Jul 2 16:33, Andrzej Jakowski wrote:
>> On 7/2/20 10:51 AM, Klaus Jensen wrote:
>>> On Jul 2 08:07, Andrzej Jakowski wrote:
On 7/2/20 3:31 AM, Klaus Jensen wrote:
> Aight, an update here. This only happens when QEMU is run with a virtual
On Jul 7 08:30, Philippe Mathieu-Daudé wrote:
> On 7/6/20 9:43 PM, Keith Busch wrote:
> > The nvme emulated device development pace has increased recently. Klaus
> > has offered to co-maintain, and since we have many new contributions
> > coming through, we're adding a repository to accumulate
On Mon, 6 Jul 2020 10:09:13 +0200
Markus Armbruster wrote:
> This is to make the next commit easier to review.
>
> Signed-off-by: Markus Armbruster
> Reviewed-by: Eric Blake
> Reviewed-by: Vladimir Sementsov-Ogievskiy
> ---
Reviewed-by: Greg Kurz
> util/qemu-option.c | 32
On Mon, Jul 06, 2020 at 06:23:00PM +0200, Christophe de Dinechin wrote:
> There are a number of unnecessary trailing whitespaces that have
> accumulated over time in the source code. They cause stray changes
> in patches if you use tools that automatically remove them.
>
> Tested by doing a `git
On Jul 7 12:10, Maxim Levitsky wrote:
> On Tue, 2020-06-09 at 17:32 +0200, Kevin Wolf wrote:
> > Am 09.06.2020 um 16:18 hat Philippe Mathieu-Daudé geschrieben:
> > > On 6/9/20 4:14 PM, Kevin Wolf wrote:
> > > > Am 09.06.2020 um 13:46 hat Klaus Jensen geschrieben:
> > > > > On Jun 9 13:17,
On Mon, Jul 06, 2020 at 14:20:23 -0400, Masayoshi Mizuma wrote:
> From: Masayoshi Mizuma
>
> Here is the implementation of transient option for qcow2 file.
> This gets available directive in domain xml file
> like as:
>
>
>
>
>
>
>
>
> The internal
On Jul 6 12:43, Keith Busch wrote:
> The nvme emulated device development pace has increased recently. Klaus
> has offered to co-maintain, and since we have many new contributions
> coming through, we're adding a repository to accumulate and test new
> features.
>
> Cc: Klaus Jensen
>
On Mon, Jul 06, 2020 at 18:15:55 +0200, Kevin Wolf wrote:
> Am 03.07.2020 um 18:02 hat Daniel P. Berrangé geschrieben:
> > On Fri, Jul 03, 2020 at 04:49:33PM +0100, Dr. David Alan Gilbert wrote:
> > > * Daniel P. Berrangé (berra...@redhat.com) wrote:
> > > > On Thu, Jul 02, 2020 at 01:12:52PM
On Tue, Jun 30, 2020 at 3:39 PM Philippe Mathieu-Daudé wrote:
>
> Only move the state machine to ReceivingData if there is no
> pending error. This avoids later OOB access while processing
> commands queued.
>
> "SD Specifications Part 1 Physical Layer Simplified Spec. v3.01"
>
> 4.3.3 Data
On Tue, 2020-06-09 at 17:32 +0200, Kevin Wolf wrote:
> Am 09.06.2020 um 16:18 hat Philippe Mathieu-Daudé geschrieben:
> > On 6/9/20 4:14 PM, Kevin Wolf wrote:
> > > Am 09.06.2020 um 13:46 hat Klaus Jensen geschrieben:
> > > > On Jun 9 13:17, Philippe Mathieu-Daudé wrote:
> > > > > On 6/9/20
On Mon, Jul 06, 2020 at 06:21:56PM +0200, Kevin Wolf wrote:
> Am 06.07.2020 um 18:03 hat Daniel P. Berrangé geschrieben:
> > On Mon, Jul 06, 2020 at 05:50:11PM +0200, Kevin Wolf wrote:
> > > Am 06.07.2020 um 17:29 hat Daniel P. Berrangé geschrieben:
> > > > On Mon, Jul 06, 2020 at 05:27:01PM
On Mon, Jul 06, 2020 at 14:20:25 -0400, Masayoshi Mizuma wrote:
> From: Masayoshi Mizuma
>
> Add a unit test for transient option for qcow2 file.
>
> Signed-off-by: Masayoshi Mizuma
> ---
> tests/qemublocktest.c | 10 ++
>
On Mon, 06 Jul 2020 22:01:38 +0200
Markus Armbruster wrote:
> Greg Kurz writes:
>
> > On Mon, 6 Jul 2020 10:09:12 +0200
> > Markus Armbruster wrote:
> >
> >> Convert uses like
> >>
> >> opts = qemu_opts_create(..., );
> >> if (err) {
> >> ...
> >> }
> >>
> >> to
> >>
>
On Mon, Jul 06, 2020 at 05:57:08PM +0200, Kevin Wolf wrote:
> Am 02.07.2020 um 19:57 hat Daniel P. Berrangé geschrieben:
> > This wires up support for a new "exclude" parameter to the QMP commands
> > for snapshots (savevm, loadvm, delvm). This parameter accepts a list of
> > block driver state
On 7/6/20 9:43 PM, Keith Busch wrote:
> The nvme emulated device development pace has increased recently. Klaus
> has offered to co-maintain, and since we have many new contributions
> coming through, we're adding a repository to accumulate and test new
> features.
Thanks Klaus for helping!
>
On Mon, 6 Jul 2020 10:09:14 +0200
Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster
> Reviewed-by: Eric Blake
> Reviewed-by: Vladimir Sementsov-Ogievskiy
> ---
> util/qemu-option.c | 47 ++
> 1 file changed, 27 insertions(+), 20
On 7/7/20 12:24 PM, Philippe Mathieu-Daudé wrote:
> On 7/7/20 10:30 AM, Philippe Mathieu-Daudé wrote:
>> On Tue, Jun 30, 2020 at 3:39 PM Philippe Mathieu-Daudé
>> wrote:
>>>
>>> Only move the state machine to ReceivingData if there is no
>>> pending error. This avoids later OOB access while
Le 06/07/2020 à 18:23, Christophe de Dinechin a écrit :
> There are a number of unnecessary trailing whitespaces that have
> accumulated over time in the source code. They cause stray changes
> in patches if you use tools that automatically remove them.
>
> Tested by doing a `git diff -w` after
On 7/7/20 10:30 AM, Philippe Mathieu-Daudé wrote:
> On Tue, Jun 30, 2020 at 3:39 PM Philippe Mathieu-Daudé
> wrote:
>>
>> Only move the state machine to ReceivingData if there is no
>> pending error. This avoids later OOB access while processing
>> commands queued.
>>
>> "SD Specifications
On Tue, Jul 07, 2020 at 06:36:23 -0500, Eric Blake wrote:
> On 7/7/20 2:12 AM, Peter Krempa wrote:
> >
> > 1) the virDomainBlockCopy operation flattens the backing chain into the
> > top level only. This means that must be stripped or the
> > operation rejected, as otherwise shutting down the VM
Am 07.07.2020 um 08:38 hat Peter Krempa geschrieben:
> On Mon, Jul 06, 2020 at 18:15:55 +0200, Kevin Wolf wrote:
> > Am 03.07.2020 um 18:02 hat Daniel P. Berrangé geschrieben:
> > > On Fri, Jul 03, 2020 at 04:49:33PM +0100, Dr. David Alan Gilbert wrote:
> > > > * Daniel P. Berrangé
On 7/7/20 2:12 AM, Peter Krempa wrote:
You can install a qcow2 overlay on top of a raw file too. IMO the
implications of using allow that.
As said above I'd strongly prefer if the overlay is created in qemu
using the blockdev-create blockjob (there is already infrastructure in
libvirt to
Vladimir Sementsov-Ogievskiy writes:
> If we want to add some info to errp (by error_prepend() or
> error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro.
> Otherwise, this info will not be added when errp == _fatal
Same for _abort, but to fix that, ERRP_AUTO_PROPAGATE() would have
to
Am 07.07.2020 um 11:14 hat Daniel P. Berrangé geschrieben:
> On Mon, Jul 06, 2020 at 05:57:08PM +0200, Kevin Wolf wrote:
> > Am 02.07.2020 um 19:57 hat Daniel P. Berrang̮̩ geschrieben:
> > > This wires up support for a new "exclude" parameter to the QMP commands
> > > for snapshots (savevm,
On Mon, Jul 06, 2020 at 06:23:00PM +0200, Christophe de Dinechin wrote:
> There are a number of unnecessary trailing whitespaces that have
> accumulated over time in the source code. They cause stray changes
> in patches if you use tools that automatically remove them.
>
> Tested by doing a `git
On Tue, Jul 07, 2020 at 12:33:31 +0200, Kevin Wolf wrote:
> Am 07.07.2020 um 08:38 hat Peter Krempa geschrieben:
> > On Mon, Jul 06, 2020 at 18:15:55 +0200, Kevin Wolf wrote:
> > > Am 03.07.2020 um 18:02 hat Daniel P. Berrangé geschrieben:
[...]
> > IMO we really want this also for external
QEMU allows to create SD card with unrealistic sizes. This could work,
but some guests (at least Linux) consider sizes that are not a power
of 2 as a firmware bug and fix the card size to the next power of 2.
Before CVE-2020-13253 fix, this would allow OOB read/write accesses
past the image size
In the next commit we won't allow SD card images with invalid
size (not aligned to a power of 2). Prepare the tests: add the
pow2ceil() and image_pow2ceil_truncate() methods and truncate
the images of the tests using SD cards.
Signed-off-by: Philippe Mathieu-Daudé
---
Part 1 is already reviewed:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg718150.html
However the CVE fix break Linux guests:
https://www.mail-archive.com/qemu-devel@nongnu.org/msg720737.html
This series fixes that, by checking the SD card image size is
correct.
Based-on:
On 7/7/20 9:46 AM, Kevin Wolf wrote:
Limiting each loop iteration of qemu-img map to 1 GB was arbitrary from
the beginning, though it only cut the maximum in half then because the
interface a signed 32 bit byte count. These days, bdrv_block_status()
supports a 64 bit byte count, so the arbitrary
Espeically when O_DIRECT is used with image files so that the page cache
indirection can't cause a merge of allocating requests, the file will
fragment on the file system layer, with a potentially very small
fragment size (this depends on the requests the guest sent).
On Linux, fragmentation can
On 7/7/20 9:23 AM, Kevin Wolf wrote:
Espeically when O_DIRECT is used with image files so that the page cache
Especially
indirection can't cause a merge of allocating requests, the file will
fragment on the file system layer, with a potentially very small
fragment size (this depends on the
Limiting each loop iteration of qemu-img map to 1 GB was arbitrary from
the beginning, though it only cut the maximum in half then because the
interface a signed 32 bit byte count. These days, bdrv_block_status()
supports a 64 bit byte count, so the arbitrary limit is even worse.
On file-posix,
On 6/26/20 12:25 PM, Stefan Hajnoczi wrote:
> On Thu, Jun 25, 2020 at 02:31:14PM +0100, Peter Maydell wrote:
>> On Wed, 24 Jun 2020 at 11:02, Stefan Hajnoczi wrote:
>>>
>>> The following changes since commit 171199f56f5f9bdf1e5d670d09ef1351d8f01bae:
>>>
>>> Merge remote-tracking branch
>>>
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. Rename opt_set() to opt_validate(), noting
its similarity to qemu_opts_validate(). Drop
Just for consistency. Also fix the example in object_set_props()'s
documentation.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
include/qom/object.h | 28 +++-
qom/object.c | 14 +++---
2 files
See recent commit "error: Document Error API usage rules" for
rationale.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
include/qom/object.h| 42 ++
include/qom/object_interfaces.h | 12 +++-
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 two commits did that for sufficiently simple
cases with Coccinelle. Do it for several more manually.
Signed-off-by: Markus Armbruster
Replace
error_setg(, ...);
error_propagate(errp, err);
by
error_setg(errp, ...);
Related pattern:
if (...) {
error_setg(, ...);
goto out;
}
...
out:
error_propagate(errp, err);
return;
When all paths to label out are that way, replace by
When migrate_add_blocker(blocker, ) 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, );
Am 07.07.2020 um 16:23 hat Kevin Wolf geschrieben:
> Espeically when O_DIRECT is used with image files so that the page cache
> indirection can't cause a merge of allocating requests, the file will
> fragment on the file system layer, with a potentially very small
> fragment size (this depends on
On 7/7/20 6:06 PM, Peter Maydell wrote:
> On Tue, 7 Jul 2020 at 17:04, Alistair Francis wrote:
>>
>> On Tue, Jul 7, 2020 at 6:22 AM Philippe Mathieu-Daudé
>> wrote:
>>>
>>> QEMU allows to create SD card with unrealistic sizes. This could work,
>>> but some guests (at least Linux) consider sizes
Commit 2f262e06f0 lifted qdev_get_type() from qdev to object without
renaming it accordingly. Do that now.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Philippe Mathieu-Daudé
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
qom/object.c | 4 ++--
1 file changed, 2
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
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
From: Eric Blake
Creating an image that requires format probing of the backing image is
potentially unsafe (we've had several CVEs over the years based on
probes leaking information to the guest on a subsequent boot, although
these days tools like libvirt are aware of the issue enough to prevent
From: Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or
error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro.
Otherwise, this info will not be added when errp == _fatal
(the program will exit prior to the error_append_hint() or
error_prepend()
From: Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or
error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro.
Otherwise, this info will not be added when errp == _fatal
(the program will exit prior to the error_append_hint() or
error_prepend()
From: Vladimir Sementsov-Ogievskiy
Introduce a new ERRP_AUTO_PROPAGATE macro, to be used at start of
functions with an errp OUT parameter.
It has three goals:
1. Fix issue with error_fatal and error_prepend/error_append_hint: user
can't see this additional information, because exit() happens
From: Eric Blake
During 'qemu-img create ... 2>&1', if --quiet is not in force, we can
end up with buffered I/O in stdout that was produced before failure,
but which appears in output after failure. This is confusing; the fix
is to flush stdout prior to attempting anything that might produce an
On 7/7/20 10:21 AM, Kevin Wolf wrote:
Am 07.07.2020 um 16:54 hat Eric Blake geschrieben:
On 7/7/20 9:46 AM, Kevin Wolf wrote:
Limiting each loop iteration of qemu-img map to 1 GB was arbitrary from
the beginning, though it only cut the maximum in half then because the
interface a signed 32 bit
On Mon, 6 Jul 2020 14:56:46 +0100
Stefan Hajnoczi wrote:
> Multi-queue devices achieve the best performance when each vCPU has a
> dedicated queue. This ensures that virtqueue used notifications are
> handled on the same vCPU that submitted virtqueue buffers. When another
> vCPU handles the
On Sat, Jun 20, 2020 at 05:36:45PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Introduce a function to mark the request serialising only if there are
> no conflicting request to wait for.
>
> The function is static, so mark it unused. The attribute is to be
> dropped in the next commit.
>
>
n Tue, Jul 7, 2020 at 6:21 AM Philippe Mathieu-Daudé wrote:
>
> In the next commit we won't allow SD card images with invalid
> size (not aligned to a power of 2). Prepare the tests: add the
> pow2ceil() and image_pow2ceil_truncate() methods and truncate
> the images of the tests using SD cards.
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
Reviewed-by: Eric Blake
Acked-by: David Gibson
On Tue, Jul 7, 2020 at 6:22 AM Philippe Mathieu-Daudé wrote:
>
> QEMU allows to create SD card with unrealistic sizes. This could work,
> but some guests (at least Linux) consider sizes that are not a power
> of 2 as a firmware bug and fix the card size to the next power of 2.
>
> Before
Mark a bad example more clearly. Fix the error_propagate_prepend()
example. Add a missing declaration and a second error pileup example.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Greg Kurz
---
include/qapi/error.h | 16
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
See recent commit "error: Document Error API usage rules" for
rationale.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
include/qemu/option.h | 16
blockdev.c| 5 ++-
util/qemu-option.c| 92
The previous commit enables conversion of
qdev_prop_set_drive_err(..., );
if (err) {
...
}
to
if (!qdev_prop_set_drive_err(..., errp)) {
...
}
Coccinelle script:
@@
identifier fun = qdev_prop_set_drive_err;
expression list args;
typedef Error;
Convert uses like
opts = qemu_opts_create(..., );
if (err) {
...
}
to
opts = qemu_opts_create(..., errp);
if (!opts) {
...
}
Eliminate error_propagate() that are now unnecessary. Delete @err
that are now unused.
Note that we can't drop
The previous commit enables conversion of
foo(..., );
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,
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Greg Kurz
---
util/qemu-option.c | 47 ++
1 file changed, 27 insertions(+), 20 deletions(-)
diff --git a/util/qemu-option.c
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 with a Coccinelle script I
consider fairly trustworthy. This commit uses the same script with
the matching of return taken
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
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
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
---
On Tue, 7 Jul 2020 at 17:04, Alistair Francis wrote:
>
> On Tue, Jul 7, 2020 at 6:22 AM Philippe Mathieu-Daudé wrote:
> >
> > QEMU allows to create SD card with unrealistic sizes. This could work,
> > but some guests (at least Linux) consider sizes that are not a power
> > of 2 as a firmware bug
From: Eric Blake
Back in commit 6e6e55f5 (Jul 2017, v2.10), we tweaked the code to warn
if the backing file could not be opened but the user gave a size,
unless the user also passes the -u option to bypass the open of the
backing file. As one common reason for failure to open the backing
file
On Wed, 2020-07-01 at 14:48 -0700, Andrzej Jakowski wrote:
> This patch sets CMBS bit in controller capabilities register when user
> configures NVMe driver with CMB support, so capabilites are correctly
> reported to guest OS.
>
> Signed-off-by: Andrzej Jakowski
> Reviewed-by: Klaus Jensen
>
From: Eric Blake
The use of 'qemu-img amend' to change qcow2 backing files is not
tested very well. In particular, our implementation has a bug where
if a new backing file is provided without a format, then the prior
format is blindly reused, even if this results in data corruption, but
this is
Am 06.07.2020 um 21:43 hat Keith Busch geschrieben:
> The nvme emulated device development pace has increased recently. Klaus
> has offered to co-maintain, and since we have many new contributions
> coming through, we're adding a repository to accumulate and test new
> features.
>
> Cc: Klaus
On Mon, 6 Jul 2020 14:56:48 +0100
Stefan Hajnoczi wrote:
Maybe mention 'pci' in the subject as well?
> Automatically size the number of virtio-scsi-pci, vhost-scsi-pci, and
> vhost-user-scsi-pci request virtqueues to match the number of vCPUs.
> Other transports continue to default to 1
Convert
foo(..., );
if (err) {
...
}
to
if (!foo(..., )) {
...
}
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(),
The previous commit enables conversion of
visit_foo(..., );
if (err) {
...
}
to
if (!visit_foo(..., errp)) {
...
}
for visitor functions that now return true / false on success / error.
Coccinelle script:
@@
identifier fun =~
The previous commit used Coccinelle to convert from checking the Error
object to checking the return value. Convert a few more manually.
Also tweak control flow in places to conform to the conventional "if
error bail out" pattern.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
The previous commit used Coccinelle to convert from checking the Error
object to checking the return value. Convert a few more manually.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
hw/core/bus.c | 6 +-
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, even when we need to keep error_propagate() for other
error paths.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
---
block.c |
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
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
---
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/parallels.c | 7 ++-
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/block/parallels.c b/block/parallels.c
index 180dd41e2b..cb5259ac44 100644
--- a/block/parallels.c
See recent commit "error: Document Error API usage rules" for
rationale.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
include/hw/qdev-properties.h | 4 ++--
hw/core/qdev-properties-system.c | 4 ++--
2 files changed, 4
Convert
visit_type_FOO(v, ..., , );
...
if (err) {
...
}
to
visit_type_FOO(v, ..., , errp);
...
if (!ptr) {
...
}
for functions that set @ptr to non-null / null on success / error.
Eliminate error_propagate() that are now unnecessary. Delete
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
Reviewed-by: Eric Blake
---
qdev-monitor.c | 12
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
---
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 2bec8a80b8..098298c78e 100644
--- a/hw/core/qdev-properties.c
+++
Neglected to mention: code changes are limited to resolving rebase
conflicts in PATCH 26. v4 is about comments, mostly to reduce churn
when combined with Vladimir's auto propagation work.
Am 06.07.2020 um 22:39 hat Eric Blake geschrieben:
> There are many existing qcow2 images that specify a backing file but
> no format. This has been the source of CVEs in the past, but has
> become more prominent of a problem now that libvirt has switched to
> -blockdev. With older -drive, at
From: Eric Blake
Sheepdog already requires that if backing_file is present, that it be
another sheepdog image (see sd_co_create). Meanwhile, we want to move
towards always being explicit about the backing format for other
drivers where it matters. So for convenience, make qemu-img create -F
From: Eric Blake
qcow has no space in the metadata to store a backing format, and there
are existing qcow images backed both by raw or by other formats
(usually qcow) images, reliant on probing to tell the difference. On
the bright side, because we probe every time, raw files are marked as
From: Eric Blake
vmdk already requires that if backing_file is present, that it be
another vmdk image (see vmdk_co_do_create). Meanwhile, we want to
move towards always being explicit about the backing format for other
drivers where it matters. So for convenience, make qemu-img create -F
vmdk
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
---
qemu-img.c | 8 ++--
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index fc405ee171..a6af0eaf80 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -464,22 +464,18 @@ static int
From: Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or
error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro.
Otherwise, this info will not be added when errp == _fatal
(the program will exit prior to the error_append_hint() or
error_prepend()
Limiting each loop iteration of qemu-img map to 1 GB was arbitrary from
the beginning, though it only cut the maximum in half then because the
interface was a signed 32 bit byte count. These days, bdrv_block_status
supports a 64 bit byte count, so the arbitrary limit is even worse.
On file-posix,
From: Vladimir Sementsov-Ogievskiy
If we want to add some info to errp (by error_prepend() or
error_append_hint()), we must use the ERRP_AUTO_PROPAGATE macro.
Otherwise, this info will not be added when errp == _fatal
(the program will exit prior to the error_append_hint() or
error_prepend()
Am 07.07.2020 um 16:54 hat Eric Blake geschrieben:
> On 7/7/20 9:46 AM, Kevin Wolf wrote:
> > Limiting each loop iteration of qemu-img map to 1 GB was arbitrary from
> > the beginning, though it only cut the maximum in half then because the
> > interface a signed 32 bit byte count. These days,
The previous commit enables conversion of
foo(..., );
if (err) {
...
}
to
if (!foo(..., )) {
...
}
for QemuOpts functions that now return true / false on success /
error. Coccinelle script:
@@
identifier fun = {
opts_do_parse,
There is just one use so far. The next commit will add more.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
util/qemu-option.c | 27 ++-
1 file changed, 18 insertions(+), 9 deletions(-)
diff --git
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
Pass _abort instead of NULL where the returned value is
dereferenced or asserted to be non-null. Drop a now redundant
assertion.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
hw/core/platform-bus.c | 6 +++---
hw/ppc/spapr_drc.c
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
util/qemu-option.c | 18 +-
1 file changed, 5 insertions(+), 13 deletions(-)
diff --git a/util/qemu-option.c b/util/qemu-option.c
index 14e211ddd8..e7b540a21b 100644
---
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
This is to make the next commit easier to review.
Signed-off-by: Markus Armbruster
Reviewed-by: Eric Blake
Reviewed-by: Vladimir Sementsov-Ogievskiy
Reviewed-by: Greg Kurz
---
util/qemu-option.c | 32 ++--
1 file changed, 18 insertions(+), 14 deletions(-)
diff
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
1 - 100 of 137 matches
Mail list logo