-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[DRAFT] Prerequisite for proper device manager. #4509
base: main
Are you sure you want to change the base?
Commits on Mar 16, 2024
-
Add single entity to controll all devices in the vmm. There are currently 2 types of devices in Firecraker: mmio and pio devices. Each type is managed by it's own device manager. This works fine in current setup. But with prospect of adding ACPI there will be 3 types of devices and all interactions with them will become more entangled than they are right now. To prevent this from happening single device manager will controll all devices and have all device specific logic inside of it. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Configuration menu - View commit details
-
Copy full SHA for a4dd345 - Browse repository at this point
Copy the full SHA a4dd345View commit details -
refactor(mmio): move KVM device registration to MMIODeviceInfo
Now registration of KVM resources is not attached to the mmio_device_manager and can be performed outside of it. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 250d371 - Browse repository at this point
Copy the full SHA 250d371View commit details -
refactor(mmio): move cmd line update out of mmio_device_manager
Update of cmd line with virtio devices does not need to access to the mmio_device_manager and can be done outside of it. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Configuration menu - View commit details
-
Copy full SHA for f0d06c7 - Browse repository at this point
Copy the full SHA f0d06c7View commit details -
refactor(mmio): explicit bus device addition
MMIODeviceManager was aware of different types of devices like Rtc or BootTimer. Because of this MMIODeviceManager had specialized methods to deal with such devices. This commit tries to generalize addition of such devices, so MMIODeviceManager will not differentiate between them. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 069e62a - Browse repository at this point
Copy the full SHA 069e62aView commit details -
refactor(serial): remove generic from SerialDevice
SerialDevice is always used with stdin as an input source. Setting generic parameter of SerialDevice to always be Stdin removes duplication of it's definitions all over codebase. Also it allows to make a simple `new` method to create SerialDevice instead of specifying each field separately. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Configuration menu - View commit details
-
Copy full SHA for a507c22 - Browse repository at this point
Copy the full SHA a507c22View commit details -
refactor(mmio): move irqfd registration to MMIODeviceInfo
MMIODeviceInfo now handles registration of irqfd. This registration can happen outside of MMIODeviceManager in the future. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Configuration menu - View commit details
-
Copy full SHA for e08ef27 - Browse repository at this point
Copy the full SHA e08ef27View commit details -
refactor(mmio): rename allocate_mmio_resources
Rename allocate_mmio_resources into allocate_device_info to better specify the method output. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Configuration menu - View commit details
-
Copy full SHA for d83efb3 - Browse repository at this point
Copy the full SHA d83efb3View commit details -
refactor(mmio): remove serial device specific method
Remove special method for serial device from MMIODeviceManager. Now MMIODeviceManager does not have any device specific methods. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Configuration menu - View commit details
-
Copy full SHA for a23efd7 - Browse repository at this point
Copy the full SHA a23efd7View commit details -
refactor(builder): remove setup_serial_device method
setup_serial_device was only used for x86_64 PortIODeviceManager creation. Moving creation of serial device near creation of PortIODeviceManager removes a need to jump through the code to see how serial device is created. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 9e6c1b3 - Browse repository at this point
Copy the full SHA 9e6c1b3View commit details -
refactor(mmio): move MMIODeviceManager into separate module
MMIODeviceManager's implementation was spread across 2 modules: mmio.rs and persist.rs. By moving all implementation into mmio module we wil have an easir time when it comes to add more device managers (e.g. ACPI device_manager). Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Configuration menu - View commit details
-
Copy full SHA for e7a4972 - Browse repository at this point
Copy the full SHA e7a4972View commit details -
refactor(device_manager): use DeviceManager to save/restore state
Before the inner `MMIODeviceManager` was responsible for state of devices. With this commit it will be easier to save states of other device types (e.g. ACPI devices). Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Configuration menu - View commit details
-
Copy full SHA for c782e06 - Browse repository at this point
Copy the full SHA c782e06View commit details -
refactor(mmio): replace register_mmio_virtio with add_device_with_info
New `add_device_with_info` method plays a bit better with other new `add_*` methods. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
Configuration menu - View commit details
-
Copy full SHA for 6864abd - Browse repository at this point
Copy the full SHA 6864abdView commit details