rust-vmm / vmm-reference

A VMM implementation based of rust-vmm components
Apache License 2.0
144 stars 60 forks source link

Allocate MMIO ranges & GSIs #136

Open andreeaflorescu opened 3 years ago

andreeaflorescu commented 3 years ago

Implement an abstraction for generating unique MMIO configurations (address ranges and interrupt numbers).

At the moment the vmm-reference only supports configuring one block device and one network device on the MMIO bus. Each of these devices have a predefined interrupt number and MMIO range assigned. As we add the RTC & Serial Console devices on the MMIO bus (for the aarch64 support) handling these in a static way becomes challenging. The legacy devices are typically using a fixed GSI for interrupts (i.e. serial port 1 uses GSI 4), and the static initialization is not allowing us to extend the vmm-reference to have more than one device type.

There were some discussions at some point to implement a SystemAllocator in rust-vmm. We should see what is the best way of upstreaming this functionality such that it can be reused by multiple VMMs. As a starting point, we can provide a POC in vmm-reference, and in parallel propose a new crate (or update vm-device).

The system allocator is also needed for adding PCI support.

(This issue should be moved to where we are going to implement the vm-allocator).

AlexandruCihodaru commented 1 year ago

What about integrating vm-allocator?

andreeaflorescu commented 1 year ago

What about integrating vm-allocator?

I think this is the right path forward, this issue was created before we implemented the vm-allocator crate.