On Thu, Oct 13, 2022 at 02:59:04PM -0400, Stefan Hajnoczi wrote:
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 <stefa...@redhat.com>
---
MAINTAINERS | 1 +
include/sysemu/block-ram-registrar.h | 37 ++++++++++++++++++
block/block-ram-registrar.c | 58 ++++++++++++++++++++++++++++
block/meson.build | 1 +
4 files changed, 97 insertions(+)
create mode 100644 include/sysemu/block-ram-registrar.h
create mode 100644 block/block-ram-registrar.c
Reviewed-by: Stefano Garzarella <sgarz...@redhat.com>