Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtio implementation in RVVM #63

Closed
ZLangJIT opened this issue Oct 4, 2024 · 5 comments
Closed

virtio implementation in RVVM #63

ZLangJIT opened this issue Oct 4, 2024 · 5 comments
Assignees

Comments

@ZLangJIT
Copy link

ZLangJIT commented Oct 4, 2024

hi

i am currently attempting to port semu virtio into rvvm which currently lacks support for virtio

such that i can then begin replicating the same setup in rvvm with help from the RVVM maintainer as per the best way to go about such

for example

Please see the RVVM API and only then try to adapt anything.

Devices should not touch CPU specifics directly, like load/store instruction opcodes, registers. Devices should not trap the CPU manually either, it is done by the MMU subsystem.

If semu project did it that way it's silly and should not be replicated here.

Originally posted by @LekKit in LekKit/RVVM#149 (comment)

@jserv jserv changed the title virtio implementation in https://github.com/LekKit/RVVM virtio implementation in RVVM Oct 4, 2024
@shengwen-tw
Copy link
Collaborator

Hi,

I understand that you're interested in porting semu's VirtIO implementations to RVVM. However, I'm unclear about the specific objectives you’d like to discuss.

Could you please clarify the specific information you would like to know?

@ZLangJIT
Copy link
Author

ZLangJIT commented Oct 4, 2024

Hi,

I understand that you're interested in porting semu's VirtIO implementations to RVVM. However, I'm unclear about the specific objectives you’d like to discuss.

Could you please clarify the specific information you would like to know?

in regards to the implementation detail of virtio and semu

basically if semu did not have virtio (more specifically if virtio was not "hooked into" semu at all) and you where adding virtio to semu how exactly would you do such on a step-by-step api-level

for example, something like "first we register MMIO stuff with xyz semu api and pass it xyz from virtio api xyz, then we register an interupt handler with xyz semu api xyz and pass it xyz from virtio api xyz..." and so on

with such we could begin figuring out what the equivilant RVVM api's/infastructure would be for each step of semu and adapt it to RVVM

@shengwen-tw
Copy link
Collaborator

shengwen-tw commented Oct 5, 2024

in regards to the implementation detail of virtio and semu
basically if semu did not have virtio (more specifically if virtio was not "hooked into" semu at all) and you where adding virtio to semu how exactly would you do such on a step-by-step api-level
for example, something like "first we register MMIO stuff with xyz semu api and pass it xyz from virtio api xyz, then we register an interupt handler with xyz semu api xyz and pass it xyz from virtio api xyz..." and so on
with such we could begin figuring out what the equivilant RVVM api's/infastructure would be for each step of semu and adapt it to RVVM

You may want to check device.h for the exposing APIs to the sub-systems for handling MMIO and interrupts of RV32 in semu.

Additionally, VirtIO Committee Specification is useful for tracing and understanding the VirtIO implementation in semu.

@ZLangJIT
Copy link
Author

ZLangJIT commented Oct 7, 2024

im not sure if that helps, as the spec covers quite a lot and doesnt exactly specify in what order things should be implemented, ei it does not specify that implementation foo depends on an implementation of bar and so on

nor does it specify what order things should be implemented

@jserv
Copy link
Collaborator

jserv commented Oct 25, 2024

I close this issue due to inactivity. Since VirtIO support for semu is still in development, it may not be suitable for RVVM integration at this time.

@jserv jserv closed this as completed Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants