From 03d9e4c0dba9d1b5d0c532ac3518415466ebdf8f Mon Sep 17 00:00:00 2001 From: Alberto Faria Date: Fri, 28 Oct 2022 14:16:35 +0100 Subject: block/blkio: Add virtio-blk-vfio-pci BlockDriver libblkio 1.1.0 [1] introduces a virtio-blk-vfio-pci driver, which accesses a virtio-blk PCI device using VFIO. Add a corresponding BlockDriver. [1] https://gitlab.com/libblkio/libblkio/-/tree/v1.1.0 Signed-off-by: Alberto Faria Message-id: 20221028131635.710267-1-afaria@redhat.com Signed-off-by: Stefan Hajnoczi --- qapi/block-core.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'qapi') diff --git a/qapi/block-core.json b/qapi/block-core.json index cb5079e..81bbb0b 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -2960,6 +2960,7 @@ 'raw', 'rbd', { 'name': 'replication', 'if': 'CONFIG_REPLICATION' }, 'ssh', 'throttle', 'vdi', 'vhdx', + { 'name': 'virtio-blk-vfio-pci', 'if': 'CONFIG_BLKIO' }, { 'name': 'virtio-blk-vhost-user', 'if': 'CONFIG_BLKIO' }, { 'name': 'virtio-blk-vhost-vdpa', 'if': 'CONFIG_BLKIO' }, 'vmdk', 'vpc', 'vvfat' ] } @@ -3712,6 +3713,20 @@ 'if': 'CONFIG_BLKIO' } ## +# @BlockdevOptionsVirtioBlkVfioPci: +# +# Driver specific block device options for the virtio-blk-vfio-pci backend. +# +# @path: path to the PCI device's sysfs directory (e.g. +# /sys/bus/pci/devices/0000:00:01.0). +# +# Since: 7.2 +## +{ 'struct': 'BlockdevOptionsVirtioBlkVfioPci', + 'data': { 'path': 'str' }, + 'if': 'CONFIG_BLKIO' } + +## # @BlockdevOptionsVirtioBlkVhostUser: # # Driver specific block device options for the virtio-blk-vhost-user backend. @@ -4390,6 +4405,9 @@ 'throttle': 'BlockdevOptionsThrottle', 'vdi': 'BlockdevOptionsGenericFormat', 'vhdx': 'BlockdevOptionsGenericFormat', + 'virtio-blk-vfio-pci': + { 'type': 'BlockdevOptionsVirtioBlkVfioPci', + 'if': 'CONFIG_BLKIO' }, 'virtio-blk-vhost-user': { 'type': 'BlockdevOptionsVirtioBlkVhostUser', 'if': 'CONFIG_BLKIO' }, -- cgit v1.1 From 6c32fc0df9cd901add75618c831fb26a9eb742cb Mon Sep 17 00:00:00 2001 From: Alberto Faria Date: Sat, 29 Oct 2022 00:38:54 +0100 Subject: block/blkio: Make driver nvme-io_uring take a "path" instead of a "filename" The nvme-io_uring driver expects a character special file such as /dev/ng0n1. Follow the convention of having a "filename" option when a regular file is expected, and a "path" option otherwise. This makes io_uring the only libblkio-based driver with a "filename" option, as it accepts a regular file (even though it can also take a block special file). Signed-off-by: Alberto Faria Message-id: 20221028233854.839933-1-afaria@redhat.com Signed-off-by: Stefan Hajnoczi --- qapi/block-core.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'qapi') diff --git a/qapi/block-core.json b/qapi/block-core.json index 81bbb0b..6d90400 100644 --- a/qapi/block-core.json +++ b/qapi/block-core.json @@ -3704,12 +3704,12 @@ # # Driver specific block device options for the nvme-io_uring backend. # -# @filename: path to the image file +# @path: path to the image file # # Since: 7.2 ## { 'struct': 'BlockdevOptionsNvmeIoUring', - 'data': { 'filename': 'str' }, + 'data': { 'path': 'str' }, 'if': 'CONFIG_BLKIO' } ## -- cgit v1.1