Although defaulting the handshake limit to 10 seconds was a nice QoI
change to weed out intentionally slow clients, it can interfere with
integration testing done with manual NBD_OPT commands over 'nbdsh
--opt-mode'. Expose a command line option to allow the user to alter
the timeout away from the
This is the equivalent of bdrv_open_file_child() to be used in cases
where the caller is QAPI based and has a BlockdevRef rather than a
filename and an options QDict.
Signed-off-by: Kevin Wolf
---
include/block/block-global-state.h | 4
block.c| 30 +
Although defaulting the handshake limit to 10 seconds was a nice QoI
change to weed out intentionally slow clients, it can interfere with
integration testing done with manual NBD_OPT commands over 'nbdsh
--opt-mode'. Expose a QMP knob 'handshake-max-secs' to allow the user
to alter the timeout awa
The existing qemu_api library can't be linked into tools because it
contains a few bindings for things that only exist in the system
emulator.
This adds a new "system" feature to the qemu_api crate that enables the
system emulator parts in it, and build the crate twice: qemu_api_tools
is the core
This series adds minimal bindings for writing block drivers in Rust and
converts the bochs block driver as an example. Some parts (such as the
open functions) are still essentially C written in Rust syntax, while
other parts already try to provide somewhat idiomatic abstractions.
The main purpose
Signed-off-by: Kevin Wolf
---
rust/Cargo.lock| 7 +++
rust/Cargo.toml| 1 +
rust/block/Cargo.toml | 15 +++
rust/block/README.md | 3 +++
rust/block/meson.build | 19 +++
rust/block/src/lib.rs | 1 +
rust/meson.build | 1 +
7 files ch
This adds a map() function to the BlockDriver trait and makes use of it
to implement reading from an image.
Signed-off-by: Kevin Wolf
---
rust/block/src/driver.rs | 100 +++
1 file changed, 100 insertions(+)
diff --git a/rust/block/src/driver.rs b/rust/block/
Signed-off-by: Kevin Wolf
---
rust/wrapper.h| 4
meson.build | 1 +
rust/qemu-api/src/zeroable.rs | 5 +++--
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/rust/wrapper.h b/rust/wrapper.h
index 41be87adcf..c3e1e6f9cf 100644
--- a/rust/wrapper
This adds a separate block driver for the bochs image format called
'bochs-rs' so that for the moment both the C implementation and the Rust
implementation can be present in the same build. The intention is to
remove the C implementation eventually and rename this one into 'bochs'.
This can only ha
Types that implement IoBuffer can be used with safe I/O functions.
Signed-off-by: Kevin Wolf
---
rust/block/src/iobuffer.rs | 94 ++
rust/block/src/lib.rs | 2 +
2 files changed, 96 insertions(+)
create mode 100644 rust/block/src/iobuffer.rs
diff --git
This adds a barebones module for a block driver interface. Because there
is no native QAPI support for Rust yet, opening images takes a few
unsafe functions to call into C visitor functions. This should be
cleaned up later.
Signed-off-by: Kevin Wolf
---
rust/block/src/driver.rs | 190 +++
This adds helper functions that allow running Rust futures to completion
using QEMU's event loops.
Signed-off-by: Kevin Wolf
---
include/qemu/coroutine-rust.h | 24 +++
rust/wrapper.h| 1 +
util/qemu-co-rust-async.c | 55
rust/qemu-api/meson.
Signed-off-by: Kevin Wolf
---
meson.build| 36
storage-daemon/meson.build | 2 +-
2 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/meson.build b/meson.build
index 1f26801b69..30aae6b3c3 100644
--- a/meson.build
+++ b/meson.build
This adds format probing both to the BlockDriver trait and the bochs-rs
block driver. With this, bochs-rs achieves feature parity with its C
counterpart. Its probe function returns a higher priority so that it is
preferred when both drivers are available.
Signed-off-by: Kevin Wolf
---
rust/block
On 11/2/25 22:43, Kevin Wolf wrote:
Signed-off-by: Kevin Wolf
---
meson.build| 36
storage-daemon/meson.build | 2 +-
2 files changed, 33 insertions(+), 5 deletions(-)
if have_rust and target_type == 'system'
-target_rust = ru
On 11/2/25 22:43, Kevin Wolf wrote:
This is the equivalent of bdrv_open_file_child() to be used in cases
where the caller is QAPI based and has a BlockdevRef rather than a
filename and an options QDict.
Signed-off-by: Kevin Wolf
---
include/block/block-global-state.h | 4
block.c
On 11/2/25 22:43, Kevin Wolf wrote:
This adds a separate block driver for the bochs image format called
'bochs-rs' so that for the moment both the C implementation and the Rust
implementation can be present in the same build. The intention is to
remove the C implementation eventually and rename t
17 matches
Mail list logo