firecracker icon indicating copy to clipboard operation
firecracker copied to clipboard

[RFC] vmm: handle uniformly GSIs and memory of a guest

Open bchalios opened this issue 3 years ago • 0 comments

Reason

Right now we have one pair of (IdAllocator, AddressAllocator) per device manager (mmio and legacy for x86, mmio for aarch64) and we separate the resources (GSIs and guest memory) these handle.

With ACPI we will add new types of devices that will need as well GSIs and guest memory, which would mean that with the current way of things we would need to create yet another pair of allocators.

This fragments the resources (we should divide the GSIs used by ACPI and MMIO devices for example) and keeps information about them fragmented.

Changes

This commit introduces a global resource manager for GSIs and guest memory. Its scope is the whole VM rather than type of devices, so we can avoid the aforementioned fragmentation.

License Acceptance

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

PR Checklist

  • [ ] All commits in this PR are signed (git commit -s).
  • [ ] If a specific issue led to this PR, this PR closes the issue.
  • [ ] The description of changes is clear and encompassing.
  • [ ] Any required documentation changes (code and docs) are included in this PR.
  • [ ] New unsafe code is documented.
  • [ ] API changes follow the Runbook for Firecracker API changes.
  • [ ] User-facing changes are mentioned in CHANGELOG.md.
  • [ ] All added/changed functionality is tested.

  • [ ] This functionality can be added in rust-vmm.

bchalios avatar Sep 06 '22 14:09 bchalios