Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: firecracker-microvm/firecracker
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: firecracker-microvm/firecracker
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: feature/pcie
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 35 files changed
  • 1 contributor

Commits on May 7, 2025

  1. chore: prepare virtio for multiple transport options

    This is just code organization changes. Create a new module under
    `virtio`, called `transport`. For the time being the only transport
    supported is `mmio`. Also, move `IrqInterrupt` type within the MMIO
    transport code, as it is MMIO specific.
    
    Signed-off-by: Babis Chalios <[email protected]>
    bchalios committed May 7, 2025
    Configuration menu
    Copy the full SHA
    7c28b2a View commit details
    Browse the repository at this point in the history
  2. chore: avoid IrqTrigger::new().unwrap()

    `IrqTrigger::new()` returns a `Result` because creating an `EventFd`
    might fail with an `std::io::Error` error. All users of `IrqTrigger`
    create the object and directly unwrap the error.
    
    To avoid unwraps all over the place, change `IrqTrigger::new()` to
    unwrap a potential error while creating the EventFd internally and just
    return `Self`.
    
    Signed-off-by: Babis Chalios <[email protected]>
    bchalios committed May 7, 2025
    Configuration menu
    Copy the full SHA
    7d450b3 View commit details
    Browse the repository at this point in the history
  3. refactor: set VirtIO interrupt during activation

    The MMIO transport for VirtIO devices uses an `IrqTrigger` object as the
    object that models the logic for sending interrupts from the device to
    the guest. We create one such object for every VirtIO device when
    creating it. The MMIO device manager associates this object with an IRQ
    number and registers it with KVM.
    
    This commit changes the timing of association of an `IrqTrigger` with a
    VirtIO-mmio device. It only assigns such an object to the device during
    its activation. We do this to prepare for supporting a PCI transport for
    VirtIO devices. The cloud hypervisor implementation for these passes the
    interrupt objects used by the device during activation, so we make this
    change to have a uniform way to handle interrupts for both transports.
    Functionally, nothing changes for MMIO devices, as before activation we
    don't trigger any interrupts.
    
    Signed-off-by: Babis Chalios <[email protected]>
    bchalios committed May 7, 2025
    Configuration menu
    Copy the full SHA
    6241aef View commit details
    Browse the repository at this point in the history
  4. virtio: add generic interrupt trait

    Describing the APIs that need to implement types that are used as
    interrupts for VirtIO devices. Currently, we only use `IrqInterrupt`
    interrupts, but this will change once we have MSI-X with PCIe devices.
    
    Signed-off-by: Babis Chalios <[email protected]>
    bchalios committed May 7, 2025
    Configuration menu
    Copy the full SHA
    aa5e311 View commit details
    Browse the repository at this point in the history
  5. refactor: use VirtioInterrupt in VirtIO devices

    VirtIO devices assume they're operating under an MMIO transport and as a
    consequence they use IrqTrigger as interrupts. Switch that to using
    VirtioInterrupt for all VirtIO device objects. Only assume a
    VirtioInterrupt is an IrqTrigger in MMIO specific code.
    
    Signed-off-by: Babis Chalios <[email protected]>
    bchalios committed May 7, 2025
    Configuration menu
    Copy the full SHA
    c4e3bf8 View commit details
    Browse the repository at this point in the history
Loading