mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-27 07:48:55 +00:00
runtime-rs: Suppress kernel parameters for IBM SE
For IBM SE, the following kernel parameters are not required: - Basic parameters (reboot and systemd-related) - Rootfs parameters This commit suppresses these parameters when IBM SE is configured. Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
This commit is contained in:
parent
4c8e881a84
commit
59c1f0b59b
@ -123,6 +123,11 @@ impl KernelParams {
|
||||
self.params.push(new_param);
|
||||
}
|
||||
|
||||
pub(crate) fn remove_all_by_key(&mut self, key: String) {
|
||||
// Remove all params with the given key from the vector
|
||||
self.params.retain(|param| param.key != key);
|
||||
}
|
||||
|
||||
pub(crate) fn from_string(params_string: &str) -> Self {
|
||||
let mut params = vec![];
|
||||
|
||||
|
@ -2142,6 +2142,21 @@ impl<'a> QemuCmdLine<'a> {
|
||||
self.machine
|
||||
.set_confidential_guest_support("pv0")
|
||||
.set_nvdimm(false);
|
||||
|
||||
self.kernel.params.remove_all_by_key("reboot".to_string());
|
||||
self.kernel
|
||||
.params
|
||||
.remove_all_by_key("systemd.unit".to_string());
|
||||
self.kernel
|
||||
.params
|
||||
.remove_all_by_key("systemd.mask".to_string());
|
||||
self.kernel.params.remove_all_by_key("root".to_string());
|
||||
self.kernel
|
||||
.params
|
||||
.remove_all_by_key("rootflags".to_string());
|
||||
self.kernel
|
||||
.params
|
||||
.remove_all_by_key("rootfstype".to_string());
|
||||
}
|
||||
|
||||
pub fn add_sev_protection_device(&mut self, cbitpos: u32, firmware: &str) {
|
||||
|
Loading…
Reference in New Issue
Block a user