Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#4547: Refactor vmm builder code to simplify logic that creates the microVM to boot #4910

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Commits on Nov 14, 2024

  1. fix: Refactor vmm builder code to simplify logic

    pass vm_config to eliminate two extra arguments derived from it
    
    Signed-off-by: tommady <tommady@users.noreply.github.com>
    tommady committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    2b5ad8b View commit details
    Browse the repository at this point in the history
  2. fix: Refactor vmm builder code to simplify logic

    remove cfg_attr and extract create_vcpus from create_vmm_and_vcpus
    
    Signed-off-by: tommady <tommady@users.noreply.github.com>
    tommady committed Nov 14, 2024
    Configuration menu
    Copy the full SHA
    0093165 View commit details
    Browse the repository at this point in the history

Commits on Nov 15, 2024

  1. fix: Refactor vmm builder code to simplify logic

    extract codes into two architecture specific modes
    
    Signed-off-by: tommady <tommady@users.noreply.github.com>
    tommady committed Nov 15, 2024
    Configuration menu
    Copy the full SHA
    0bf17fb View commit details
    Browse the repository at this point in the history
  2. fix: Refactor vmm builder code to simplify logic

    eliminate the unnecessary usage of the event_manager argument
    
    Signed-off-by: tommady <tommady@users.noreply.github.com>
    tommady committed Nov 15, 2024
    Configuration menu
    Copy the full SHA
    6b97c07 View commit details
    Browse the repository at this point in the history

Commits on Nov 22, 2024

  1. test: test ARM CPU templates in Linux host 5.10

    Add the SVE CPU template as a valid template in 5.10 since it works.
    
    Signed-off-by: Pablo Barbáchano <pablob@amazon.com>
    pb8o authored and tommady committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    16cf6b0 View commit details
    Browse the repository at this point in the history
  2. chore: Update to v1.10.1 patch

    Update release policy to v1.10.1 patch
    
    Signed-off-by: Jack Thomson <jackabt@amazon.com>
    JackThomson2 authored and tommady committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    6221deb View commit details
    Browse the repository at this point in the history
  3. snapshot: Remove max_connections and max_pending_resets fields

    `TcpIPv4Handler` for MMDS network stack preallocates several buffers
    whose sizes are saved into a snapshot as `max_connections` and
    `max_pending_resets` in `MmdsNetworkStackState`. But they are always the
    same constant hardcoded values (`DEFAULT_MAX_CONNECTIONS` and
    `DEFAULT_MAX_PENDING_RESETS`) as of today, which means there is no need
    to save them into a snapshot. Even if we change the hardcoded sizes
    across Firecracker versions, that should not be a problem. This is
    because the snapshot feature does not support migration of network
    connections and those buffers are initialized with empty on snapshot
    restoration. When migrating from a Firecracker version with larger
    buffers to another version with smaller ones, guest workloads that
    worked previously might start to fail due to the less buffer spaces.
    However, the issue is not a problem of the snapshot feature and it
    should also occur even on a purely booted microVM (not restored from a
    snapshot). Thus, it is fine to remove those fields from a snapshot.
    
    Since this is a breaking change of the snapshot format, bumps the major
    version.
    
    Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
    zulinx86 authored and tommady committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    133e541 View commit details
    Browse the repository at this point in the history
  4. test(mmds): Do not use MmdsNetworkStack::new() in tests

    There is no need to use MmdsNetworkStack::new() instead of
    MmdsNetworkStack::new_with_defaults() in tests that pass the same
    default values.
    
    Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
    zulinx86 authored and tommady committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    e3e229b View commit details
    Browse the repository at this point in the history
  5. chore: Clarify user action

    We bumped the snapshot version up twice recently, requiring users to
    regenerate their snapshot, but the user action isn't clearly stated.
    
    Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
    zulinx86 authored and tommady committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    effeb7b View commit details
    Browse the repository at this point in the history
  6. refactor(builder): Refactor vmm builder code to simplify logic

    eliminate the unnecessary usage of the event_manager argument and
    fix up aarch64 attach_legacy_devices_aarch64 fn
    
    Signed-off-by: tommady <tommady@users.noreply.github.com>
    tommady committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    1e3fc10 View commit details
    Browse the repository at this point in the history
  7. refactor(builder): address comments

    remove the aarch64 suffix from the attach_legacy_devices_aarch64
    function and ensure that aarch64 smt is always set to false int the
    configure_system_for_boot function
    
    Signed-off-by: tommady <tommady@users.noreply.github.com>
    tommady committed Nov 22, 2024
    Configuration menu
    Copy the full SHA
    ef6e55a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    527ce80 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2024

  1. snapshot: Remove max_connections and max_pending_resets fields

    `TcpIPv4Handler` for MMDS network stack preallocates several buffers
    whose sizes are saved into a snapshot as `max_connections` and
    `max_pending_resets` in `MmdsNetworkStackState`. But they are always the
    same constant hardcoded values (`DEFAULT_MAX_CONNECTIONS` and
    `DEFAULT_MAX_PENDING_RESETS`) as of today, which means there is no need
    to save them into a snapshot. Even if we change the hardcoded sizes
    across Firecracker versions, that should not be a problem. This is
    because the snapshot feature does not support migration of network
    connections and those buffers are initialized with empty on snapshot
    restoration. When migrating from a Firecracker version with larger
    buffers to another version with smaller ones, guest workloads that
    worked previously might start to fail due to the less buffer spaces.
    However, the issue is not a problem of the snapshot feature and it
    should also occur even on a purely booted microVM (not restored from a
    snapshot). Thus, it is fine to remove those fields from a snapshot.
    
    Since this is a breaking change of the snapshot format, bumps the major
    version.
    
    Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
    zulinx86 authored and tommady committed Nov 23, 2024
    Configuration menu
    Copy the full SHA
    4344350 View commit details
    Browse the repository at this point in the history
  2. chore: Clarify user action

    We bumped the snapshot version up twice recently, requiring users to
    regenerate their snapshot, but the user action isn't clearly stated.
    
    Signed-off-by: Takahiro Itazuri <itazur@amazon.com>
    zulinx86 authored and tommady committed Nov 23, 2024
    Configuration menu
    Copy the full SHA
    0edb749 View commit details
    Browse the repository at this point in the history
  3. refactor(builder): address comments

    let the x86_64 and aarch64 architectures code can compile and without
    warnning
    
    Signed-off-by: tommady <tommady@users.noreply.github.com>
    tommady committed Nov 23, 2024
    Configuration menu
    Copy the full SHA
    b336e83 View commit details
    Browse the repository at this point in the history