]> git.proxmox.com Git - mirror_qemu.git/commit
block: add BlockRAMRegistrar
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 13 Oct 2022 18:59:04 +0000 (14:59 -0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 26 Oct 2022 18:56:42 +0000 (14:56 -0400)
commit7f9241d805b4711a4f7dc5489df0e7e30b8c1496
treeb55d8bd8bcda24191e0119e5393b917445f59dfe
parent4fdd0a1a7ea174c5ee573e49c11f7d3bce00984d
block: add BlockRAMRegistrar

Emulated devices and other BlockBackend users wishing to take advantage
of blk_register_buf() all have the same repetitive job: register
RAMBlocks with the BlockBackend using RAMBlockNotifier.

Add a BlockRAMRegistrar API to do this. A later commit will use this
from hw/block/virtio-blk.c.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-id: 20221013185908.1297568-10-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
MAINTAINERS
block/block-ram-registrar.c [new file with mode: 0644]
block/meson.build
include/sysemu/block-ram-registrar.h [new file with mode: 0644]