On Tue, Feb 11, 2025 at 10:43:27PM +0100, 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 implemen
On Wed, Feb 12, 2025 at 09:14:57AM +, Daniel P. Berrangé wrote:
> On Tue, Feb 11, 2025 at 10:43:27PM +0100, 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 c
RBD schedules the request completion code (qemu_rbd_finish_bh()) to run
in the BDS's AioContext. The intent seems to be to run it in the same
context that the original request coroutine ran in, i.e. the thread on
whose stack the RBDTask object exists (see qemu_rbd_start_co()).
However, with multi
Am 12.02.2025 um 10:28 hat Paolo Bonzini geschrieben:
> On 2/11/25 22:43, Kevin Wolf wrote:
> > +/// Use QEMU's event loops to run a Rust [`Future`] to completion and
> > return its result.
> > +///
> > +/// This function must be called in coroutine context. If the future isn't
> > ready yet, it
Am 12.02.2025 um 10:41 hat Daniel P. Berrangé geschrieben:
> On Wed, Feb 12, 2025 at 09:14:57AM +, Daniel P. Berrangé wrote:
> > On Tue, Feb 11, 2025 at 10:43:27PM +0100, Kevin Wolf wrote:
> > > This adds a separate block driver for the bochs image format called
> > > 'bochs-rs' so that for the
On Wed, Feb 12, 2025 at 01:58:15PM +0100, Kevin Wolf wrote:
> Am 12.02.2025 um 10:41 hat Daniel P. Berrangé geschrieben:
> > On Wed, Feb 12, 2025 at 09:14:57AM +, Daniel P. Berrangé wrote:
> > > On Tue, Feb 11, 2025 at 10:43:27PM +0100, Kevin Wolf wrote:
> > > > This adds a separate block drive
Am 12.02.2025 um 10:29 hat Paolo Bonzini geschrieben:
> On 2/11/25 22:43, Kevin Wolf wrote:
> > Signed-off-by: Kevin Wolf
> > ---
> > rust/wrapper.h| 4
> > meson.build | 1 +
> > rust/qemu-api/src/zeroable.rs | 5 +++--
> > 3 files changed, 8 insertions
On Wed, Feb 12, 2025 at 1:47 PM Kevin Wolf wrote:
> > > +pub fn qemu_co_run_future(future: F) -> F::Output {
> > > +let waker = Arc::new(RunFutureWaker {
> > > +co: unsafe { bindings::qemu_coroutine_self() },
> > > +})
> > > +.into();
> >
> > into what? :) Maybe you can add th
Am 12.02.2025 um 08:45 hat Philippe Mathieu-Daudé geschrieben:
> 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 bui
Am 12.02.2025 um 10:32 hat Hanna Czenczek geschrieben:
> RBD schedules the request completion code (qemu_rbd_finish_bh()) to run
> in the BDS's AioContext. The intent seems to be to run it in the same
> context that the original request coroutine ran in, i.e. the thread on
> whose stack the RBDTas
On Wed, Feb 12, 2025 at 2:13 PM Kevin Wolf wrote:
> Yes, we definitely need some proper bindings there. I'm already tired of
> writing things like this:
>
> return -(bindings::EINVAL as std::os::raw::c_int)
>
> Or even:
>
> return e
> .raw_os_error()
> .unwrap_or(-(bindings
On 12/2/25 13:59, Kevin Wolf wrote:
Am 12.02.2025 um 08:45 hat Philippe Mathieu-Daudé geschrieben:
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
On 12.02.25 14:26, Kevin Wolf wrote:
Am 12.02.2025 um 10:32 hat Hanna Czenczek geschrieben:
RBD schedules the request completion code (qemu_rbd_finish_bh()) to run
in the BDS's AioContext. The intent seems to be to run it in the same
context that the original request coroutine ran in, i.e. the
Instead of comment
"Keep this type consistent with the nbd-server-start arguments", we
can simply merge these things.
Signed-off-by: Vladimir Sementsov-Ogievskiy
---
No problem for me to rebase on top of
[PATCH 0/2] nbd: Allow debugging tuning of handshake limit
if it goes earlier.
Also, not th
On 11.02.25 00:46, Eric Blake wrote:
On Thu, Feb 06, 2025 at 10:20:09AM +0300, Vladimir Sementsov-Ogievskiy wrote:
---
qapi/block-export.json | 10 ++
include/block/nbd.h| 6 +++---
[..]
@@ -52,6 +57,10 @@
#
# @addr: Address on which to listen.
#
+#
On 2/11/25 22:43, Kevin Wolf wrote:
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 cr
On 2/11/25 22:43, Kevin Wolf wrote:
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 41be87
On 2/11/25 22:43, Kevin Wolf wrote:
+/// Use QEMU's event loops to run a Rust [`Future`] to completion and return
its result.
+///
+/// This function must be called in coroutine context. If the future isn't
ready yet, it yields.
+pub fn qemu_co_run_future(future: F) -> F::Output {
+let wake
Am 12.02.2025 um 11:01 hat Paolo Bonzini geschrieben:
> On 2/11/25 22:43, Kevin Wolf wrote:
> > 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 qem
Am 12.02.2025 um 14:47 hat Paolo Bonzini geschrieben:
> On Wed, Feb 12, 2025 at 2:13 PM Kevin Wolf wrote:
> > Yes, we definitely need some proper bindings there. I'm already tired of
> > writing things like this:
> >
> > return -(bindings::EINVAL as std::os::raw::c_int)
> >
> > Or even:
> >
>
On 2/11/25 22:43, Kevin Wolf wrote:
+/// Implementing `SizedIoBuffer` provides an implementation for [`IoBuffer`]
without having to
+/// implement any functions manually.
+///
+/// # Safety
+///
+/// Types implementing `SizedIoBuffer` guarantee that the whole object can be
accessed as an I/O
+/
On 2/11/25 22:43, Kevin Wolf wrote:
+/// A request to a block driver
+pub enum Request {
+Read { offset: u64, len: u64 },
+}
+
Maybe add flags already?
+#[allow(dead_code)]
+pub enum MappingTarget {
+/// The described blocks are unallocated. Reading from them yields zeros.
+Unmappe
On 2/12/25 16:29, Kevin Wolf wrote:
Am 12.02.2025 um 11:01 hat Paolo Bonzini geschrieben:
On 2/11/25 22:43, Kevin Wolf wrote:
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"
Am 12.02.2025 um 17:48 hat Paolo Bonzini geschrieben:
> On 2/11/25 22:43, Kevin Wolf wrote:
> > +/// Implementing `SizedIoBuffer` provides an implementation for
> > [`IoBuffer`] without having to
> > +/// implement any functions manually.
> > +///
> > +/// # Safety
> > +///
> > +/// Types implemen
Il mer 12 feb 2025, 18:32 Kevin Wolf ha scritto:
> > > +mut buf: MaybeUninit,
> >
> > I think Rust doesn't guarantee no copies here, so maybe this could be
>
> Do you think that in practice the compiler won't optimise the copy away?
>
It's possiblr that it does not, because it has to bui
On 2/12/25 16:13, Kevin Wolf wrote:
Or if you have to define the constants anyway - you currently do this
only for Windows, but for into_negative_errno() you might need it on
Linux, too - and it wouldn't be a problem for the constants to be
signed (that they are unsigned is the main reason why it
Am 12.02.2025 um 18:16 hat Paolo Bonzini geschrieben:
> On 2/12/25 16:13, Kevin Wolf wrote:
> > Or if you have to define the constants anyway - you currently do this
> > only for Windows, but for into_negative_errno() you might need it on
> > Linux, too - and it wouldn't be a problem for the consta
Am 12.02.2025 um 16:05 hat Paolo Bonzini geschrieben:
> On 2/11/25 22:43, Kevin Wolf wrote:
> > +/// A request to a block driver
> > +pub enum Request {
> > +Read { offset: u64, len: u64 },
> > +}
> > +
>
> Maybe add flags already?
> > +#[allow(dead_code)]
> > +pub enum MappingTarget {
> > +
Am 12.02.2025 um 17:43 hat Paolo Bonzini geschrieben:
> On 2/11/25 22:43, Kevin Wolf wrote:
> > +/// Reads data from the child node into a linear typed buffer.
> > +pub async fn read(&self, offset: u64, buf: &mut
> > T) -> io::Result<()> {
> > +unsafe {
> > +self.read_r
On 2/11/25 22:43, Kevin Wolf wrote:
+/// Reads data from the child node into a linear typed buffer.
+pub async fn read(&self, offset: u64, buf: &mut T) ->
io::Result<()> {
+unsafe {
+self.read_raw(offset, buf.buffer_len(), buf.buffer_mut_ptr())
+.await
Il mer 12 feb 2025, 18:23 Kevin Wolf ha scritto:
> Am 12.02.2025 um 17:48 hat Paolo Bonzini geschrieben:
> > On 2/11/25 22:43, Kevin Wolf wrote:
> > > +/// Implementing `SizedIoBuffer` provides an implementation for
> [`IoBuffer`] without having to
> > > +/// implement any functions manually.
> >
On Wed, Feb 12, 2025 at 05:33:51PM +0300, Vladimir Sementsov-Ogievskiy wrote:
> Instead of comment
> "Keep this type consistent with the nbd-server-start arguments", we
> can simply merge these things.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
>
> No problem for me to rebase on top o
32 matches
Mail list logo