(Cc: Lyude) I assume something odd is going on with your mail client for people that have been added to a thread later on?
On Sat Jan 31, 2026 at 2:16 PM CET, Alexandre Courbot wrote: > On Sat Jan 31, 2026 at 9:27 PM JST, Danilo Krummrich wrote: >> We've just generalized I/O to support arbitrary I/O backends (busses, backing >> storage, etc.). >> >> With this we can wire up the I/O traits to DMA and generalize the dma_read() >> and >> dma_write() macros accordingly. I.e. we can extend the I/O traits with >> field_write() and field_read(). > > With the caveat that the I/O traits for now only support accessing > primitive types; is the plan to add a function to read any type > implementing `FromBytes`? That's exactly what I say above: generalize the dma_read!() and dma_write!() macros by adding field_write() and field_read() to the I/O traits. :) For reference, this is where I brought this up originally [1]. [1] https://lore.kernel.org/all/[email protected]/ >> (Lyude is going to work on this as a more integrated alternative to >> iosys_map. >> It would be good to align with her regarding this work.) > > Heads up, I am also doing some plumbing in `io.rs` related to the > register macro. Maybe we should have a thread on Zulip to discuss what > everyone is working on. Done! Link: https://rust-for-linux.zulipchat.com/#narrow/channel/288089-General/topic/Generic.20I.2FO.20backends/with/571198078 >> This has the advantage that we don't have to duplicate all this >> infrastructure >> for I/O memory, DMA, etc. >> >> I also think that CoherentSlice is too specific of a type. I'd rather have a >> generic type, maybe UnsafeSlice or IoSlice, that just uses the I/O backend >> for >> accesses. > > For me the main appeal of this patchset is that it provides a way to > work infallibly with a single object or a fixed-size array. I hope > that's something we can preserve. Of course, the generic I/O backend infrastructure is based on the distinction between compile-time and run-time.
