kata-sys-util: Set NoProtection for riscv64

`available_guets_protection` is required for `runtime-rs` to infer while
building it on riscv64 platforms. Set it to `NoProtection` as riscv64
does not support guest protection for now.

Signed-off-by: Ruoqing He <heruoqing@iscas.ac.cn>
This commit is contained in:
Ruoqing He 2025-03-17 17:16:05 +08:00
parent 7968a3c09d
commit fd6c16e209

View File

@ -277,6 +277,13 @@ pub fn available_guest_protection() -> Result<GuestProtection, ProtectionError>
Ok(GuestProtection::NoProtection)
}
#[cfg(target_arch = "riscv64")]
#[allow(dead_code)]
// Guest protection is not supported on RISC-V.
pub fn available_guest_protection() -> Result<GuestProtection, ProtectionError> {
Ok(GuestProtection::NoProtection)
}
#[cfg(target_arch = "x86_64")]
#[cfg(test)]
mod tests {