-
Notifications
You must be signed in to change notification settings - Fork 61
Adding virtio support for arm #223
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
Conversation
ddbd011 to
5eb8e12
Compare
andreeaflorescu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add more details in the commit message? I am expecting to see stuff like:
- a description of what is needed for adding these devices on arm (i.e. the fdt)
- what other changes were required for this to be possible (i.e. the updates on the Mock interface, why were they needed? because otherwise you cannot register_irqfd)
- any changes that you did as part of this commit that are not directly related to the support (i.e. the
mmio_from_rangereceives a reference now).
This subtleties are not evident from reading the code and there is no other way of understanding why this commit introduces the changes that it does.
src/arch/src/lib.rs
Outdated
| num_vcpus: Option<u32>, | ||
| serial_console: Option<(u64, u64)>, | ||
| rtc: Option<(u64, u64)>, | ||
| // It is in the order(addr , size , irq) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that adding this comment kinda suggests that there should be an internal utility struct named DevConfig or something like that, with the fields addr, size and irq. It gets confusing to keep track of things when tuples have more than two values.
3801de7 to
866453f
Compare
src/arch/src/lib.rs
Outdated
| assert_eq!(fdt.virtio_devices.len(), 1); | ||
| } | ||
| #[test] | ||
| fn test_virtio_device_len() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test and the one above seem to be doing the same thing. Can you delete one of them?
for adding support of virtio devices on arm fdt needs to be updatedd to handle multiple virtio devices arm specific changes to EnvMock which is used to test virtio devices. Incase of arm we first needed to add a vcpu and register a GIC othervise register_irqfd call would fail. `mmio_from_range` function signature is also changed it now expects reference to `RangeInclusive` instead of taking its ownership, because we need it for adding virtio device to fdt. Closes rust-vmm#210 Signed-off-by: Ramyak mehra <rmehra_be19@thapar.edu>
866453f to
c2ed329
Compare
Closes #210
Signed-off-by: Ramyak mehra rmehra_be19@thapar.edu
Summary of the PR
Please summarize here why the changes in this PR are needed.
Requirements
Before submitting your PR, please make sure you addressed the following
requirements:
git commit -s), and the commitmessage has max 60 characters for the summary and max 75 characters for each
description line.
test.
unsafecode is properly documented.