runtime-rs: remove snp_certs_path support

SNP certs were apparently obsoleted by AMD.

Signed-off-by: Pavel Mores <pmores@redhat.com>
This commit is contained in:
Pavel Mores
2025-01-30 13:57:29 +01:00
committed by Pavel Mores
parent 644af52968
commit 133528a63c
5 changed files with 2 additions and 32 deletions

View File

@@ -829,10 +829,6 @@ pub struct SecurityInfo {
#[serde(default)]
pub sev_snp_guest: bool,
/// Path to SNP certificates
#[serde(default)]
pub snp_certs_path: String,
/// Path to OCI hook binaries in the *guest rootfs*.
///
/// This does not affect host-side hooks which must instead be added to the OCI spec passed to

View File

@@ -21,7 +21,6 @@ pub struct SevSnpConfig {
pub is_snp: bool,
pub cbitpos: u32,
pub firmware: String,
pub certs_path: String,
}
#[derive(Debug, Clone)]

View File

@@ -1785,7 +1785,6 @@ struct ObjectSevSnpGuest {
kernel_hashes: bool,
is_snp: bool,
certs_path: String,
}
impl ObjectSevSnpGuest {
@@ -1796,14 +1795,8 @@ impl ObjectSevSnpGuest {
reduced_phys_bits: 1,
kernel_hashes: true,
is_snp,
certs_path: "".to_owned(),
}
}
fn set_certs_path(&mut self, certs_path: &str) -> &mut Self {
self.certs_path = certs_path.to_owned();
self
}
}
#[async_trait]
@@ -1826,9 +1819,6 @@ impl ToQemuParams for ObjectSevSnpGuest {
"kernel-hashes={}",
if self.kernel_hashes { "on" } else { "off" }
));
if !self.certs_path.is_empty() {
params.push(format!("certs-path={}", self.certs_path));
}
}
Ok(vec!["-object".to_owned(), params.join(",")])
}
@@ -2189,14 +2179,8 @@ impl<'a> QemuCmdLine<'a> {
.set_nvdimm(false);
}
pub fn add_sev_snp_protection_device(
&mut self,
cbitpos: u32,
firmware: &str,
certs_path: &str,
) {
let mut sev_snp_object = ObjectSevSnpGuest::new(true, cbitpos);
sev_snp_object.set_certs_path(certs_path);
pub fn add_sev_snp_protection_device(&mut self, cbitpos: u32, firmware: &str) {
let sev_snp_object = ObjectSevSnpGuest::new(true, cbitpos);
self.devices.push(Box::new(sev_snp_object));
self.devices.push(Box::new(Bios::new(firmware.to_owned())));

View File

@@ -132,7 +132,6 @@ impl QemuInner {
cmdline.add_sev_snp_protection_device(
sev_snp_cfg.cbitpos,
&sev_snp_cfg.firmware,
&sev_snp_cfg.certs_path,
)
} else {
cmdline.add_sev_protection_device(

View File

@@ -343,7 +343,6 @@ impl VirtSandbox {
is_snp: false,
cbitpos: details.cbitpos,
firmware: hypervisor_config.boot_info.firmware.clone(),
certs_path: "".to_owned(),
})))
}
GuestProtection::Snp(details) => {
@@ -359,17 +358,10 @@ impl VirtSandbox {
info!(sl!(), "reverting to SEV even though SEV-SNP is available as requested by 'sev_snp_guest'");
}
let certs_path = if is_snp {
hypervisor_config.security_info.snp_certs_path.clone()
} else {
"".to_owned()
};
Ok(Some(ProtectionDeviceConfig::SevSnp(SevSnpConfig {
is_snp,
cbitpos: details.cbitpos,
firmware: hypervisor_config.boot_info.firmware.clone(),
certs_path,
})))
}
GuestProtection::Se => {