vmm: config: Extend 'VmConfig' with 'preserved_fds'

Preserved FDs are the ones that share the same life-time as its holding
VmConfig instance, such as FDs for creating TAP devices.

Preserved FDs will stay open as long as the holding VmConfig instance is
valid, and will be closed when the holding VmConfig instance is destroyed.

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen
2023-04-14 16:44:41 -07:00
committed by Bo Chen
parent 1fc969d37a
commit 0d2e2cd4c3
4 changed files with 25 additions and 0 deletions

View File

@@ -722,6 +722,7 @@ mod unit_tests {
gdb: false,
platform: None,
tpm: None,
preserved_fds: None,
};
assert_eq!(expected_vm_config, result_vm_config);