xemu/qapi
Stefan Hajnoczi fd66dbd424 blkio: add libblkio block driver
libblkio (https://gitlab.com/libblkio/libblkio/) is a library for
high-performance disk I/O. It currently supports io_uring,
virtio-blk-vhost-user, and virtio-blk-vhost-vdpa with additional drivers
under development.

One of the reasons for developing libblkio is that other applications
besides QEMU can use it. This will be particularly useful for
virtio-blk-vhost-user which applications may wish to use for connecting
to qemu-storage-daemon.

libblkio also gives us an opportunity to develop in Rust behind a C API
that is easy to consume from QEMU.

This commit adds io_uring, nvme-io_uring, virtio-blk-vhost-user, and
virtio-blk-vhost-vdpa BlockDrivers to QEMU using libblkio. It will be
easy to add other libblkio drivers since they will share the majority of
code.

For now I/O buffers are copied through bounce buffers if the libblkio
driver requires it. Later commits add an optimization for
pre-registering guest RAM to avoid bounce buffers.

The syntax is:

  --blockdev io_uring,node-name=drive0,filename=test.img,readonly=on|off,cache.direct=on|off

  --blockdev nvme-io_uring,node-name=drive0,filename=/dev/ng0n1,readonly=on|off,cache.direct=on

  --blockdev virtio-blk-vhost-vdpa,node-name=drive0,path=/dev/vdpa...,readonly=on|off,cache.direct=on

  --blockdev virtio-blk-vhost-user,node-name=drive0,path=vhost-user-blk.sock,readonly=on|off,cache.direct=on

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Message-id: 20221013185908.1297568-3-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2022-10-26 14:56:42 -04:00
..
acpi.json qapi: fix example of ACPI_DEVICE_OST event 2022-03-31 12:35:59 +02:00
audio.json audio: Add sndio backend 2022-09-27 07:32:31 +02:00
authz.json qapi/qom: Add ObjectOptions for authz-* 2021-03-19 10:17:13 +01:00
block-core.json blkio: add libblkio block driver 2022-10-26 14:56:42 -04:00
block-export.json vduse-blk: Add name option 2022-06-24 17:07:06 +02:00
block.json block: add more commands to preconfig mode 2022-06-14 16:50:30 +02:00
char.json qapi: Stop using whitespace for alignment in comments 2022-05-16 07:26:25 +02:00
common.json qapi: Drop unnecessary empty lines in comments 2022-05-16 07:22:28 +02:00
compat.json qapi: Belatedly adjust limitations documentation 2022-02-28 11:39:35 +01:00
control.json qapi: Stop using whitespace for alignment in comments 2022-05-16 07:26:25 +02:00
crypto.json qapi: crypto-akcipher: Introduce akcipher types to qapi 2022-05-26 11:41:42 +01:00
dump.json qapi: fix example of query-dump-guest-memory-capability command 2022-09-07 15:10:13 +02:00
error.json schemas: Add vim modeline 2020-08-03 08:28:08 +02:00
introspect.json qapi: Add feature flags to enum members 2021-10-27 17:18:55 +02:00
job.json qapi: Drop unnecessary empty lines outside of comments 2022-05-16 07:22:28 +02:00
machine-target.json target/loongarch: Implement qmp_query_cpu_definitions() 2022-06-06 18:09:03 +00:00
machine.json qmp/hmp, device_tree.c: introduce dumpdtb 2022-10-17 16:15:10 -03:00
meson.build qmp: add QMP command x-query-virtio 2022-10-09 16:38:45 -04:00
migration.json qapi: fix examples of events missing timestamp 2022-09-07 15:10:13 +02:00
misc-target.json qapi: Drop unnecessary whitespace in comments 2022-05-16 07:22:28 +02:00
misc.json vfio-user: run vfio-user context 2022-06-15 16:43:42 +01:00
net.json qapi: fix example of NIC_RX_FILTER_CHANGED event 2022-09-07 15:10:13 +02:00
opts-visitor.c qapi, qemu-options: make all parsing visitors parse boolean options the same 2020-11-04 12:00:40 -05:00
pci.json qapi: Normalize version references x.y.0 to just x.y 2020-12-10 17:16:44 +01:00
pragma.json qapi/pragma: Tidy up comments 2022-05-16 07:31:26 +02:00
qapi-clone-visitor.c qapi: Make visitor functions taking Error ** return bool, not void 2020-07-10 15:18:08 +02:00
qapi-dealloc-visitor.c qapi: Make visitor functions taking Error ** return bool, not void 2020-07-10 15:18:08 +02:00
qapi-forward-visitor.c qapi: remove needless include 2022-03-22 14:46:18 +04:00
qapi-schema.json qmp: add QMP command x-query-virtio 2022-10-09 16:38:45 -04:00
qapi-type-helpers.c monitor: introduce HumanReadableText and HMP support 2021-11-02 15:55:13 +00:00
qapi-util.c qapi: Fix stale reference to scripts/qapi.py in a comment 2022-02-28 11:39:35 +01:00
qapi-visit-core.c qapi: Factor out compat_policy_input_ok() 2021-10-29 21:27:20 +02:00
qdev.json qapi: fix example of DEVICE_UNPLUG_GUEST_ERROR event 2022-09-07 15:10:13 +02:00
qmp-dispatch.c qapi: remove needless include 2022-03-22 14:46:17 +04:00
qmp-event.c Replace qemu_gettimeofday() with g_get_real_time() 2022-04-06 10:50:37 +02:00
qmp-registry.c qapi: Generalize command policy checking 2021-10-29 18:24:46 +02:00
qobject-input-visitor.c include: add qemu/keyval.h 2022-04-21 17:03:51 +04:00
qobject-output-visitor.c qapi: Extend -compat to set policy for unstable interfaces 2021-10-29 21:28:01 +02:00
qom.json vfio-user: define vfio-user-server object 2022-06-15 16:43:42 +01:00
rdma.json schemas: Add vim modeline 2020-08-03 08:28:08 +02:00
replay.json qapi: Drop unnecessary empty lines in comments 2022-05-16 07:22:28 +02:00
rocker.json schemas: Add vim modeline 2020-08-03 08:28:08 +02:00
run-state.json i386: add notify VM exit support 2022-10-11 09:36:00 +02:00
sockets.json qapi: Stop using whitespace for alignment in comments 2022-05-16 07:26:25 +02:00
stats.json monitor: add support for boolean statistics 2022-07-18 18:51:17 +02:00
string-input-visitor.c qapi, qemu-options: make all parsing visitors parse boolean options the same 2020-11-04 12:00:40 -05:00
string-output-visitor.c qapi: remove needless include 2022-03-22 14:46:18 +04:00
tpm.json qapi: Convert simple union TpmTypeOptions to flat one 2021-09-27 08:22:25 +02:00
trace-events qapi: Generalize struct member policy checking 2021-10-29 18:23:09 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
trace.json qapi: fix example of trace-event-get-state command 2022-04-05 12:30:45 +02:00
transaction.json qapi: deprecate drive-backup 2021-11-09 18:21:19 +01:00
ui.json gtk: Add show_menubar=on|off command line option. 2022-10-12 14:33:54 +02:00
virtio.json qmp: add QMP command x-query-virtio-queue-element 2022-10-09 16:38:45 -04:00
yank.json Introduce yank feature 2021-01-13 10:21:17 +01:00