Skip to content

Conversation

@ramyak-mehra
Copy link
Contributor

@ramyak-mehra ramyak-mehra commented Jul 12, 2022

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:

  • All commits in this PR are signed (with git commit -s), and the commit
    message has max 60 characters for the summary and max 75 characters for each
    description line.
  • All added/changed functionality has a corresponding unit/integration
    test.
  • Any newly added unsafe code is properly documented.

Copy link
Member

@andreeaflorescu andreeaflorescu left a 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_range receives 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.

num_vcpus: Option<u32>,
serial_console: Option<(u64, u64)>,
rtc: Option<(u64, u64)>,
// It is in the order(addr , size , irq)
Copy link

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.

@ramyak-mehra ramyak-mehra force-pushed the virtio-aarch64 branch 2 times, most recently from 3801de7 to 866453f Compare July 14, 2022 14:52
@ramyak-mehra ramyak-mehra changed the title Adding virito support for arm Adding virtio support for arm Jul 14, 2022
assert_eq!(fdt.virtio_devices.len(), 1);
}
#[test]
fn test_virtio_device_len() {
Copy link
Member

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?

gsserge
gsserge previously approved these changes Jul 14, 2022
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>
@ramyak-mehra ramyak-mehra requested a review from gsserge July 14, 2022 15:27
@gsserge gsserge merged commit 0c8368e into rust-vmm:main Jul 14, 2022
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

Successfully merging this pull request may close these issues.

Add support for virtio block for aarch64

3 participants