All users of QemuIoInteractive provides -f argument, so it's incorrect
to use qemu_io_args, which contains -f too. Let's use
qemu_io_args_no_fmt, which also makes possible to use --image-opts with
QemuIoInteractive in the following patch.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
24.06.2020 19:42, Markus Armbruster wrote:
Show errp instead of where is actually unusual. Add a
missing declaration. Add a second error pileup example.
Signed-off-by: Markus Armbruster
Reviewed-by: Vladimir Sementsov-Ogievskiy
--
Best regards,
Vladimir
On Wed, 24 Jun 2020 18:42:59 +0200
Markus Armbruster wrote:
> Show errp instead of where 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
Eric Blake writes:
> On 6/24/20 11:43 AM, Markus Armbruster wrote:
>> The object_property_set_FOO() setters take property name and value in
>> an unusual order:
>>
>> void object_property_set_FOO(Object *obj, FOO_TYPE value,
>> const char *name, Error
Eric Blake writes:
> 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
>> ---
>
>> @@ -524,25 +527,29 @@ void object_initialize(void *data, size_t size, const
>> char *typename)
>>
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block/throttle.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/block/throttle.c b/block/throttle.c
index 0ebbad0743..f6e619aca2 100644
--- a/block/throttle.c
+++ b/block/throttle.c
@@ -154,6 +154,15 @@
We want to make it explicit where bs->backing is used, and we have done
so. The old role of backing_bs() is now effectively taken by
bdrv_cow_bs().
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
include/block/block_int.h | 5 -
1 file changed, 5 deletions(-)
diff
We have to perform an active commit whenever the top node has a parent
that has taken the WRITE permission on it.
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
blockdev.c | 24 +---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git
On 6/25/20 7:50 AM, Markus Armbruster wrote:
Eric Blake writes:
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
Philippe Mathieu-Daudé writes:
> On 6/24/20 6:43 PM, Markus Armbruster wrote:
>> Don't handle object_property_get_link() failure that can't happen
>> unless the programmer screwed up, pass _abort.
>>
>> Signed-off-by: Markus Armbruster
>> ---
>> hw/arm/bcm2835_peripherals.c | 7 +--
>>
The original purpose of bdrv_is_encrypted() was to inquire whether a BDS
can be used without the user entering a password or not. It has not
been used for that purpose for quite some time.
Actually, it is not even fit for that purpose, because to answer that
question, it would have recursively
bdrv_has_zero_init() and the related bdrv_unallocated_blocks_are_zero()
should use bdrv_cow_child() if they want to check whether the given BDS
has a COW backing file.
Signed-off-by: Max Reitz
---
block.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
bdrv_set_backing_hd() is a function that explicitly cares about the
bs->backing child. Highlight that in its description and use
child_bs(bs->backing) instead of backing_bs(bs) to make it more obvious.
Signed-off-by: Max Reitz
Reviewed-by: Vladimir Sementsov-Ogievskiy
---
block.c | 4 ++--
1
The condition modified here is not about potentially filtered children,
but only about COW sources (i.e. traditional backing files).
Signed-off-by: Max Reitz
---
block/io.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/block/io.c b/block/io.c
index
With bdrv_filter_bs(), we can easily handle this default filter behavior
in bdrv_co_block_status().
blkdebug wants to have an additional assertion, so it keeps its own
implementation, except bdrv_co_block_status_from_file() needs to be
inlined there.
Suggested-by: Eric Blake
Signed-off-by: Max
Parts of the block layer treat BDS.backing_file as if it were whatever
the image header says (i.e., if it is a relative path, it is relative to
the overlay), other parts treat it like a cache for
bs->backing->bs->filename (relative paths are relative to the CWD).
Considering
Flushing a qcow2 node must lead to the data-file node being flushed as
well.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/244 | 49 ++
tests/qemu-iotests/244.out | 7 ++
2 files changed, 56 insertions(+)
diff --git a/tests/qemu-iotests/244
complete_and_wait() and wait_ready() currently only work for mirror
jobs. Let them work for active commit jobs, too.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/iotests.py | 10 +++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/tests/qemu-iotests/iotests.py
Add a test for committing an overlay in a sub directory to one of the
images in its backing chain, using both relative and absolute filenames.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/020 | 44 ++
tests/qemu-iotests/020.out | 10 +
2 files
If the driver does not support .bdrv_co_flush() so bdrv_co_flush()
itself has to flush the children of the given node, it should not flush
just bs->file->bs, but in fact all children that might have been written
to (judging from the permissions taken on them).
This is a bug fix for qcow2 images
This patch adds some tests on how commit copes with filter nodes.
Signed-off-by: Max Reitz
---
tests/qemu-iotests/040 | 177 +
tests/qemu-iotests/040.out | 4 +-
2 files changed, 179 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/040
I'm not aware of any immediate bugs in qemu where a second runtime
evaluation of the arguments to MIN() or MAX() causes a problem, but
proactively preventing such abuse is easier than falling prey to an
unintended case down the road. At any rate, here's the conversation
that sparked the current
Patchew URL:
https://patchew.org/QEMU/20200625142540.24589-1-vsement...@virtuozzo.com/
Hi,
This series failed the docker-quick@centos7 build test. Please find the testing
commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT
Eric Blake writes:
> On 6/24/20 11:43 AM, Markus Armbruster wrote:
>> When foo(..., ) 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:
This includes some permission limiting (for example, we only need to
take the RESIZE permission if the base is smaller than the top).
Signed-off-by: Max Reitz
---
block/block-backend.c | 9 +++-
block/commit.c | 96 +-
Signed-off-by: Max Reitz
---
block/block-copy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/block-copy.c b/block/block-copy.c
index f7428a7c08..5e80569bb8 100644
--- a/block/block-copy.c
+++ b/block/block-copy.c
@@ -437,8 +437,8 @@ static int
Greg Kurz writes:
> On Wed, 24 Jun 2020 18:42:59 +0200
> Markus Armbruster wrote:
>
>> Show errp instead of where is actually unusual. Add a
>> missing declaration. Add a second error pileup example.
>>
>> Signed-off-by: Markus Armbruster
>> ---
>> include/qapi/error.h | 19
Signed-off-by: Max Reitz
---
tests/qemu-iotests/040 | 61 ++
tests/qemu-iotests/040.out | 4 +--
2 files changed, 63 insertions(+), 2 deletions(-)
diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040
index e7fa244738..dfd46ddcbe 100755
---
It makes no sense to report the block stats of a purely metadata-storing
child in query-blockstats. So if the primary child does not have any
data, try to find a unique data-storing child.
Signed-off-by: Max Reitz
---
block/qapi.c | 31 +--
1 file changed, 29
It is trivial, so we might as well do it.
Signed-off-by: Max Reitz
---
block/null.c | 7 +++
tests/qemu-iotests/153.out | 2 +-
tests/qemu-iotests/184.out | 6 --
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/block/null.c b/block/null.c
index
Greg Kurz writes:
> On Wed, 24 Jun 2020 18:43:00 +0200
> 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)
On 6/25/20 9:25 AM, Vladimir Sementsov-Ogievskiy wrote:
Make it simpler to debug when qemu-io failes due to wrong arguments or
fails
environment.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/iotests.py | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
Eric Blake writes:
> On 6/24/20 11:43 AM, Markus Armbruster wrote:
>> Pass _abort instead of NULL where the returned value is
>> dereferenced or asserted to be non-null.
>>
>> Signed-off-by: Markus Armbruster
>> ---
>
>> @@ -63,8 +64,8 @@ hwaddr platform_bus_get_mmio_addr(PlatformBusDevice
Eric Blake writes:
> On 6/24/20 11:43 AM, Markus Armbruster wrote:
>> The previous commit enables conversion of
>>
>> visit_foo(..., );
>> if (err) {
>> ...
>> }
>>
>> to
>>
>> if (!visit_foo(..., errp)) {
>> ...
>> }
>>
>> for visitor functions that now return
Signed-off-by: Max Reitz
---
block/backup-top.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/block/backup-top.c b/block/backup-top.c
index af2f20f346..f304df8f26 100644
--- a/block/backup-top.c
+++ b/block/backup-top.c
@@ -99,6 +99,15 @@ static coroutine_fn int
Reopening a node's backing child needs a bit of special handling because
the "backing" child has different defaults than all other children
(among other things). Adding filter support here is a bit more
difficult than just using the child access functions. In fact, we often
have to directly use
Because of the (not so recent anymore) changes that make the stream job
independent of the base node and instead track the node above it, we
have to split that "bottom" node into two cases: The bottom COW node,
and the node directly above the base node (which may be an R/W filter
or the bottom COW
Make it simpler to debug when qemu-io failes due to wrong arguments or
environment.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/iotests.py | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/iotests.py
client_close doesn't guarantee that client is closed: nbd_trip() keeps
reference to it. Let's wait for nbd_trip to finish.
Without this fix, the following crash is possible:
- export bitmap through unternal Qemu NBD server
- connect a client
- shutdown Qemu
On shutdown nbd_export_close_all is
Test shutdown when bitmap is exported through NBD and active client
exists. The previous patch fixes a crash, provoked by this scenario.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
tests/qemu-iotests/299| 65 +++
tests/qemu-iotests/299.out| 10
Hi all!
We've faced crash bug, which is reproducing on master branch as well.
The case is described in 03, where fix is suggested.
New iotest in 04 crashes without that fix.
Vladimir Sementsov-Ogievskiy (4):
iotests: QemuIoInteractive: use qemu_io_args_no_fmt
iotests.py: QemuIoInteractive:
On Wed, 24 Jun 2020 18:43:00 +0200
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
Signed-off-by: Max Reitz
---
block/backup-top.c | 2 +-
block/backup.c | 9 +
blockdev.c | 19 +++
3 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/block/backup-top.c b/block/backup-top.c
index f304df8f26..89bd3937d0 100644
---
If every BlockDriver were to implement bdrv_get_allocated_file_size(),
there are basically three ways it would be handled:
(1) For protocol drivers: Figure out the actual allocated file size in
some protocol-specific way
(2) For protocol drivers: If that is not possible (or we just have not
When looking for a blkdebug node (which implements debug breakpoints),
use bdrv_primary_bs() to iterate through the graph, because that is
where a blkdebug node would be.
Signed-off-by: Max Reitz
---
block.c | 16 +++-
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git
There are two practical problems with bdrv_get_allocated_file_size()'s
default right now:
(1) For drivers with children, we should generally sum all their sizes
instead of just passing the request through to bs->file. The latter
is good for filters, but not so much for format drivers.
This changes iotest 204's output, because blkdebug on top of a COW node
used to make qemu-img map disregard the rest of the backing chain (the
backing chain was broken by the filter). With this patch, the
allocation in the base image is reported correctly.
Signed-off-by: Max Reitz
---
Simplify the NVMe emulated device by aligning the I/O BAR to 4 KiB.
Signed-off-by: Philippe Mathieu-Daudé
---
include/block/nvme.h | 3 +++
hw/block/nvme.c | 5 ++---
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/include/block/nvme.h b/include/block/nvme.h
index
On Thu, Jun 25, 2020 at 6:36 PM Philippe Mathieu-Daudé
wrote:
> On 6/25/20 6:26 PM, Eric Blake wrote:
> > I'm not aware of any immediate bugs in qemu where a second runtime
> > evaluation of the arguments to MIN() or MAX() causes a problem, but
> > proactively preventing such abuse is easier than
On 6/25/20 9:25 AM, Vladimir Sementsov-Ogievskiy wrote:
client_close doesn't guarantee that client is closed: nbd_trip() keeps
reference to it. Let's wait for nbd_trip to finish.
Without this fix, the following crash is possible:
- export bitmap through unternal Qemu NBD server
internal
-
Eric Blake writes:
> 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 +-
>>
In order to make filters work in backing chains, the associated
functions must be able to deal with them and freeze both COW and filter
child links.
While at it, add some comments that note which functions require their
caller to ensure that a given child link is not frozen, and how the
callers
v6: https://lists.nongnu.org/archive/html/qemu-devel/2019-08/msg01715.html
Branch: https://github.com/XanClic/qemu.git child-access-functions-v7
Branch: https://git.xanclic.moe/XanClic/qemu.git child-access-functions-v7
Hello!
This is v7. Conceptually, not much has changed, so please follow
Filters cannot compress data themselves but they have to implement
.bdrv_co_pwritev_compressed() still (or they cannot forward compressed
writes). Therefore, checking whether
bs->drv->bdrv_co_pwritev_compressed is non-NULL is not sufficient to
know whether the node can actually handle compressed
Use the child access functions in the block status inquiry functions as
appropriate.
Signed-off-by: Max Reitz
---
block/io.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/block/io.c b/block/io.c
index 385176b331..dc9891d6ce 100644
--- a/block/io.c
+++
Signed-off-by: Max Reitz
---
block/mirror.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/block/mirror.c b/block/mirror.c
index e8e8844afc..469acf4600 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -1480,6 +1480,15 @@ static int coroutine_fn
Use child access functions when iterating through backing chains so
filters do not break the chain.
In addition, bdrv_find_overlay() will now always return the actual
overlay; that is, it will never return a filter node but only one with a
COW backing file (there may be filter nodes between that
This allows us to differentiate between filters and nodes with COW
backing files: Filters cannot be used as overlays at all (for this
function).
Signed-off-by: Max Reitz
---
blockdev.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/blockdev.c b/blockdev.c
index
Instead of looking at just bs->file and bs->backing, we should look at
all children that could end up receiving forwarded requests.
Signed-off-by: Max Reitz
---
block/io.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/block/io.c
If a node whose driver does not provide VM state functions has a
metadata child, the VM state should probably go there; if it is a
filter, the VM state should probably go there. It follows that we
should generally go down to the primary child.
Signed-off-by: Max Reitz
Reviewed-by: Vladimir
This includes some permission limiting (for example, we only need to
take the RESIZE permission for active commits where the base is smaller
than the top).
Use this opportunity to rename qmp_drive_mirror()'s "source" BDS to
"target_backing_bs", because that is what it really refers to.
bdrv_refresh_filename() and the kind of related bdrv_dirname() should
look to the primary child when they wish to copy the underlying file's
filename.
Signed-off-by: Max Reitz
---
block.c | 29 +
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/block.c
query-block, query-named-block-nodes, and query-blockstats now return
any filtered child under "backing", not just bs->backing or COW
children. This is so that filters do not interrupt the reported backing
chain. This changes the output for iotest 184, as the throttled node
now appears as a
When looking for a dirty bitmap to share, we should handle filters by
just including them in the search (so they do not break backing chains).
Signed-off-by: Max Reitz
---
nbd/server.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/nbd/server.c b/nbd/server.c
index
This patch adds some test cases how mirroring relates to filters. One
of them tests what happens when you mirror off a filtered COW node, two
others use the mirror filter node as basically our only example of an
implicitly created filter node so far (besides the commit filter).
Signed-off-by:
There are BDS children that the general block layer code can access,
namely bs->file and bs->backing. Since the introduction of filters and
external data files, their meaning is not quite clear. bs->backing can
be a COW source, or it can be a filtered child; bs->file can be a
filtered child, it
Add some helper functions for skipping filters in a chain of block
nodes.
Signed-off-by: Max Reitz
---
include/block/block_int.h | 3 +++
block.c | 55 +++
2 files changed, 58 insertions(+)
diff --git a/include/block/block_int.h
Places that use patterns like
if (bs->drv->is_filter && bs->file) {
... something about bs->file->bs ...
}
should be
BlockDriverState *filtered = bdrv_filter_bs(bs);
if (filtered) {
... something about @filtered ...
}
instead.
Signed-off-by: Max Reitz
---
If the top node's driver does not provide snapshot functionality and we
want to fall back to a node down the chain, we need to snapshot all
non-COW children. For simplicity's sake, just do not fall back if there
is more than one such child. Furthermore, we really only can fall back
to bs->file
Signed-off-by: Max Reitz
---
block/copy-on-read.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/block/copy-on-read.c b/block/copy-on-read.c
index a6e3c74a68..a6a864f147 100644
--- a/block/copy-on-read.c
+++ b/block/copy-on-read.c
@@ -107,6 +107,16 @@ static int coroutine_fn
Before HEAD^, we needed this because bdrv_co_flush() by itself would
only flush bs->file. With HEAD^, bdrv_co_flush() will flush all
children on which a WRITE or WRITE_UNCHANGED permission has been taken.
Thus, vmdk no longer needs to do it itself.
Signed-off-by: Max Reitz
---
block/vmdk.c |
blkverify is a filter, so bdrv_get_allocated_file_size()'s default
implementation will return only the size of its filtered child.
However, because both of its children are disk images, it makes more
sense to sum both of their allocated sizes.
Signed-off-by: Max Reitz
---
block/blkverify.c | 1
On 6/25/20 6:26 PM, Eric Blake wrote:
> I'm not aware of any immediate bugs in qemu where a second runtime
> evaluation of the arguments to MIN() or MAX() causes a problem, but
> proactively preventing such abuse is easier than falling prey to an
> unintended case down the road. At any rate,
To be able to use multiple queues on the same hardware,
we need to have each queue able to receive IRQ notifications
in the correct AIO context.
The context has to be proper to each queue, not to the block
driver. Move aio_context from BDRVNVMeState to NVMeQueuePair.
Signed-off-by: Philippe
The queues are tied to the hardware, not to the block driver.
As this function doesn't need to know about the BDRVNVMeState,
move the 'plugged' check to the caller.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
diff
On 6/25/20 9:25 AM, Vladimir Sementsov-Ogievskiy wrote:
All users of QemuIoInteractive provides -f argument, so it's incorrect
So far, all users is just test 205; although your series adds test 209
that does likewise. "incorrect" is a bit harsh since you can specify -f
more than once (last
qemu_try_blockalign() is a generic API that call back to the
block driver to return its page alignment. As we call from
within the very same driver, we already know to page alignment
stored in our state. Remove indirections and use the value from
BDRVNVMeState.
Signed-off-by: Philippe
We allocate an unique chunk of memory then use it for two
different structures. Introduce the 'idsz_max' variable to
hold the maximum size, to make it clearer the size is enough
to hold the two structures.
Signed-off-by: Philippe Mathieu-Daudé
---
FIXME: reword with something that makes more
In the next commit we'll get ride of qemu_try_blockalign().
To ease review, first replace qemu_try_blockalign0() by explicit
calls to qemu_try_blockalign() and memset().
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 17 ++---
1 file changed, 10 insertions(+), 7
24.06.2020 19:43, Markus Armbruster wrote:
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:
Patchew URL: https://patchew.org/QEMU/20200625184838.28172-1-phi...@redhat.com/
Hi,
This series failed the docker-quick@centos7 build test. Please find the testing
commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT BEGIN ===
On Jun 25 17:48, Philippe Mathieu-Daudé wrote:
> Simplify the NVMe emulated device by aligning the I/O BAR to 4 KiB.
>
> Signed-off-by: Philippe Mathieu-Daudé
> ---
> include/block/nvme.h | 3 +++
> hw/block/nvme.c | 5 ++---
> 2 files changed, 5 insertions(+), 3 deletions(-)
>
> diff
The queues are tied to the hardware, logging the block
driver using them is irrelevant.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 2 +-
block/trace-events | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/nvme.c b/block/nvme.c
index
As nvme_create_queue_pair() is allowed to fail, replace the
alloc() calls by try_alloc() to avoid aborting QEMU.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/block/nvme.c b/block/nvme.c
index
BDRV_POLL_WHILE() is defined as:
#define BDRV_POLL_WHILE(bs, cond) ({ \
BlockDriverState *bs_ = (bs); \
AIO_WAIT_WHILE(bdrv_get_aio_context(bs_), \
cond); })
As we will remove the BlockDriverState use in the next commit,
start by using the
The queues are tied to the hardware, logging the block
driver using them is irrelevant.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 6 +++---
block/trace-events | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/block/nvme.c b/block/nvme.c
index
The queues are tied to the hardware, not to the block driver.
As this function doesn't need to know about the BDRVNVMeState,
move the 'plugged' check to the caller.
Since in nvme_aio_unplug() we know that s->plugged is false,
we don't need the check.
Signed-off-by: Philippe Mathieu-Daudé
---
24.06.2020 19:43, Markus Armbruster wrote:
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
On 6/25/20 4:13 AM, Klaus Jensen wrote:
> On Jun 22 11:25, Andrzej Jakowski wrote:
>> So far it was not possible to have CMB and PMR emulated on the same
>> device, because BAR2 was used exclusively either of PMR or CMB. This
>> patch places CMB at BAR4 offset so it not conflicts with MSI-X
Use definitions instead of '0' or '1' indexes. Also this will
be useful when using multi-queues later.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 33 +++--
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/block/nvme.c b/block/nvme.c
index
Avoid further processing if TRACE_NVME_SUBMIT_COMMAND_RAW is
not enabled.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/nvme.c b/block/nvme.c
index eb2f54dd9d..1e5b40f61c 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -367,6
Hi,
This series is mostly code rearrangement (cleanups) to be
able to split the hardware code from the block driver code,
to be able to use multiple queues on the same hardware, or
multiple block drivers on the same hardware.
Flushing my current patch queue.
Regards,
Phil.
Based-on:
qemu_try_memalign() returns a void*, qemu_vfio_dma_map() consumes
a void*. Drop the confusing uint8_t* type.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/nvme.c b/block/nvme.c
index 1bba496294..095a8ec024 100644
nvme_create_queue_pair() doesn't require BlockDriverState anymore.
Replace it by BDRVNVMeState to simplify.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/block/nvme.c b/block/nvme.c
index 8b6cf4c34b..1b7b23cea4
nvme_init_queue() doesn't require BlockDriverState anymore.
Replace it by BDRVNVMeState to simplify.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/block/nvme.c b/block/nvme.c
index f87f157dc0..8b6cf4c34b 100644
24.06.2020 19:43, Markus Armbruster wrote:
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(),
Move assignments previous to where the assigned variable is used,
to make the nvme_identify() body easier to review. No logical change.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/block/nvme.c
nvme_free_queue_pair() doesn't use BlockDriverState, remove it.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/block/nvme.c b/block/nvme.c
index 095a8ec024..f87f157dc0 100644
--- a/block/nvme.c
+++
On Jun 25 15:57, Andrzej Jakowski wrote:
> On 6/25/20 4:13 AM, Klaus Jensen wrote:
> >
> > Come to think of it, the above might not even be sufficient since if just
> > one
> > of the nvme_addr_is_cmb checks fails, we end up issuing an invalid
> > pci_dma_read. But I think that it will error out
On 6/24/20 6:43 PM, Markus Armbruster wrote:
> 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
1 - 100 of 141 matches
Mail list logo