[PATCH 0/4] block: update inserted/removed nodes from BlockRAMRegistrar

Stefan Hajnoczi posted 4 patches 1 month, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250930204555.162133-1-stefanha@redhat.com
Maintainers: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>
There is a newer version of this series
include/block/block_int-common.h            |  11 ++
include/system/block-backend-global-state.h |   9 ++
include/system/block-ram-registrar.h        |   4 +-
block.c                                     |  56 +++++--
block/block-backend.c                       |  44 ++++++
block/block-ram-registrar.c                 |  75 ++++++++-
tests/unit/test-block-backend.c             | 164 ++++++++++++++++++++
7 files changed, 344 insertions(+), 19 deletions(-)
[PATCH 0/4] block: update inserted/removed nodes from BlockRAMRegistrar
Posted by Stefan Hajnoczi 1 month, 2 weeks ago
This patch series fixes a bug in BlockRAMRegistrar: it currently doesn't react
to block graph changes and newly inserted nodes lack RAMBlock information
needed to map I/O buffers. This is important for vdpa-blk devices because they
rely on the ability to map I/O buffers.

Stefan Hajnoczi (4):
  block: add BdrvChildClass->propagate_attach/detach() callbacks
  block: add blk_add_attach/detach_notifier() APIs
  block: rename RAMBlockRegistrar->notifier field
  block: update inserted/removed nodes from BlockRAMRegistrar

 include/block/block_int-common.h            |  11 ++
 include/system/block-backend-global-state.h |   9 ++
 include/system/block-ram-registrar.h        |   4 +-
 block.c                                     |  56 +++++--
 block/block-backend.c                       |  44 ++++++
 block/block-ram-registrar.c                 |  75 ++++++++-
 tests/unit/test-block-backend.c             | 164 ++++++++++++++++++++
 7 files changed, 344 insertions(+), 19 deletions(-)

-- 
2.51.0
Re: [PATCH 0/4] block: update inserted/removed nodes from BlockRAMRegistrar
Posted by Stefan Hajnoczi 1 month, 2 weeks ago
On Tue, Sep 30, 2025 at 04:45:51PM -0400, Stefan Hajnoczi wrote:
> This patch series fixes a bug in BlockRAMRegistrar: it currently doesn't react
> to block graph changes and newly inserted nodes lack RAMBlock information
> needed to map I/O buffers. This is important for vdpa-blk devices because they
> rely on the ability to map I/O buffers.
> 
> Stefan Hajnoczi (4):
>   block: add BdrvChildClass->propagate_attach/detach() callbacks
>   block: add blk_add_attach/detach_notifier() APIs
>   block: rename RAMBlockRegistrar->notifier field
>   block: update inserted/removed nodes from BlockRAMRegistrar
> 
>  include/block/block_int-common.h            |  11 ++
>  include/system/block-backend-global-state.h |   9 ++
>  include/system/block-ram-registrar.h        |   4 +-
>  block.c                                     |  56 +++++--
>  block/block-backend.c                       |  44 ++++++
>  block/block-ram-registrar.c                 |  75 ++++++++-
>  tests/unit/test-block-backend.c             | 164 ++++++++++++++++++++
>  7 files changed, 344 insertions(+), 19 deletions(-)

I need to send a v2 because I forgot to squash in a compiler warning
fix.

Stefan
Re: [PATCH 0/4] block: update inserted/removed nodes from BlockRAMRegistrar
Posted by Eric Blake 1 month, 2 weeks ago
On Tue, Sep 30, 2025 at 04:45:51PM -0400, Stefan Hajnoczi wrote:
> This patch series fixes a bug in BlockRAMRegistrar: it currently doesn't react
> to block graph changes and newly inserted nodes lack RAMBlock information
> needed to map I/O buffers. This is important for vdpa-blk devices because they
> rely on the ability to map I/O buffers.
> 
> Stefan Hajnoczi (4):
>   block: add BdrvChildClass->propagate_attach/detach() callbacks
>   block: add blk_add_attach/detach_notifier() APIs
>   block: rename RAMBlockRegistrar->notifier field
>   block: update inserted/removed nodes from BlockRAMRegistrar

Makes sense to me.  For the series,

Reviewed-by: Eric Blake <eblake@redhat.com>

> 
>  include/block/block_int-common.h            |  11 ++
>  include/system/block-backend-global-state.h |   9 ++
>  include/system/block-ram-registrar.h        |   4 +-
>  block.c                                     |  56 +++++--
>  block/block-backend.c                       |  44 ++++++
>  block/block-ram-registrar.c                 |  75 ++++++++-
>  tests/unit/test-block-backend.c             | 164 ++++++++++++++++++++
>  7 files changed, 344 insertions(+), 19 deletions(-)
> 
> -- 
> 2.51.0
> 
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.
Virtualization:  qemu.org | libguestfs.org