feat: add virtio-blk definitions - #33
Open
mkroening wants to merge 1 commit into
Open
Conversation
Co-authored-by: Stefan Lankes <slankes@eonerc.rwth-aachen.de> Co-authored-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
phip1611
approved these changes
Aug 21, 2026
phip1611
left a comment
Member
There was a problem hiding this comment.
LGTM but please consider adding context (why you performed certain changes) to the commit messages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the virtio-blk definitions. This is a combination of Kreb216@3f41c1e and stlankes@94d7608.
I have reworked the code to adhere to the style and naming conventions of this project. I have also added more definitions. I have tested this with the driver of @Kreb216 and the driver of @stlankes and both compile after adjusting a few names.
I have removed
RequestHeaderfrom @stlankes. Ideally, we would have avirtio::blk::Reqstruct corresponding to the definition in the spec:I did model this, and it works well from a Rust type perspective, but the first three fields and the last one are written by the driver, and the data is written by the device, though. This requires having three descriptors for one type, which does not work in the Hermit driver at the moment. Since it should be possible in principle, though, I would like to keep any implementation-specific helper types such as a header out of this project. It works fine to define the type in the Hermit driver, though.
@Kreb216, I cannot request a review from you through GitHub, but you are welcome to give this a try and leave comments if you have any. :)
This PR does not conflict with, but depends on, the following PRs:
Closes #28.