From 3d5dad473e493ab712897adde42b4dcaea5ca668 Mon Sep 17 00:00:00 2001 From: Mikko Ylinen Date: Fri, 17 Jul 2026 13:29:13 +0300 Subject: [PATCH] agent: move kbs:// scheme out of get_cdh_resource() helper With the plugins support added to CoCo Resource URI scheme, users may want to use get_cdh_resource() to pull resources from Trustee plugins. Currently, get_cdh_resource() unconditionally uses kbs:// scheme which prevents callers to specify plugin paths as kbs+://. Move kbs:// scheme out of get_cdh_resource() helper and update call sites accordingly. Currently, only s390x path uses this so only one caller needs to be updated. Signed-off-by: Mikko Ylinen --- src/agent/src/confidential_data_hub/mod.rs | 2 +- src/agent/src/device/vfio_device_handler.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/agent/src/confidential_data_hub/mod.rs b/src/agent/src/confidential_data_hub/mod.rs index b4386b6e33..6cf2024436 100644 --- a/src/agent/src/confidential_data_hub/mod.rs +++ b/src/agent/src/confidential_data_hub/mod.rs @@ -110,7 +110,7 @@ impl CDHClient { pub async fn get_resource(&self, resource_path: &str) -> Result> { let req = GetResourceRequest { - ResourcePath: format!("kbs://{resource_path}"), + ResourcePath: resource_path.to_string(), ..Default::default() }; let res = self diff --git a/src/agent/src/device/vfio_device_handler.rs b/src/agent/src/device/vfio_device_handler.rs index f6d852f047..d578cbe051 100644 --- a/src/agent/src/device/vfio_device_handler.rs +++ b/src/agent/src/device/vfio_device_handler.rs @@ -277,7 +277,7 @@ async fn check_ap_device(address: ap::Address) -> Result<()> { #[cfg(target_arch = "s390x")] async fn associate_ap_device(apqn: &Apqn, mkvp: &str) -> Result<()> { - let resource_path = format!("/vfio_ap/{mkvp}"); + let resource_path = format!("kbs:///vfio_ap/{mkvp}"); let secret_resource_path = format!("{resource_path}/secret"); let secret_id_resource_path = format!("{resource_path}/secret_id");