Skip to content

Conversation

@jiangliu
Copy link
Member

This is an RFC PR, which depends on rust-vmm/vm-device#9 and rust-vmm/vm-device#11

It refines the VirtioDevice trait to better support virtio backends.
Also introduce VirtioQueueConfig and VirtioDeviceConfig to manage
virtio device configuration information.

Signed-off-by: Xingjun Liu [email protected]
Signed-off-by: Liu Jiang [email protected]

Refine the VirtioDevice trait to better support virtio backends.
Also introduce VirtioQueueConfig and VirtioDeviceConfig to manage
virtio device configuration information.

Signed-off-by: Xingjun Liu <[email protected]>
Signed-off-by: Liu Jiang <[email protected]>
@sameo
Copy link

sameo commented Nov 1, 2019

@andreeaflorescu you may want to have a look here.

@andreeaflorescu
Copy link
Member

Yap, I'll take a look next week once I am back home.

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.

I was also working on a design for the virtio devices, but it's not really complete. Should we sync and see how we can merge them?

}

/// Get all irqfds associated with vritio queues.
pub fn get_vring_irqfds(&self) -> Vec<&EventFd> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a usecase where both LegacyIrq and MsiIrq are supported at the same time? It looks like the implementation of the DeviceConfig is wildly different depending on the interrupt system. Each function here is converted in a match on the type of interrupt.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per PCI spec, a device will work in Legacy mode after reset, and may switch to/from PCI MSI/MSI-x mode when OS programs the interrupt configuration registers. So it's a must for a PCI device to support both legacy and MSI/MSIx interrupts.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, can we have VirtioDeviceConfig as a trait as well? What we have here can be the implementation of the trait and in Firecracker's case we can implement our own Device Configuration which should be much simpler.

@sameo
Copy link

sameo commented Nov 4, 2019 via email

@jiangliu
Copy link
Member Author

jiangliu commented Nov 4, 2019

I have given an overview of the rust-vmm project on OpenInfra SH forum.
The status becomes a little bit clear with the following pic, only dependency from higher block to lower block is allowed.
image

@sameo
Copy link

sameo commented Nov 5, 2019 via email

@jiangliu
Copy link
Member Author

This has been moved to vm-device, so close it.

@jiangliu jiangliu closed this Jun 10, 2020
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.

3 participants