runtime-rs: Add guest protection to hypervisor state

Store guest-protection used while storing the state of the hypervisor.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
Archana Shinde
2023-12-19 20:57:51 -08:00
committed by Archana Shinde
parent cf74166d75
commit a5f0b92bca
5 changed files with 13 additions and 7 deletions

View File

@@ -1804,6 +1804,7 @@ dependencies = [
"once_cell",
"rand 0.8.5",
"safe-path 0.1.0",
"serde",
"serde_json",
"slog",
"slog-scope",

View File

@@ -5,9 +5,9 @@
//
use crate::HypervisorConfig;
use kata_sys_util::protection::GuestProtection;
use serde::{Deserialize, Serialize};
use std::collections::HashSet;
#[derive(Serialize, Deserialize, Default, Clone, Debug)]
pub struct HypervisorState {
// Type of hypervisor, E.g. dragonball/qemu/firecracker/acrn.
@@ -34,4 +34,6 @@ pub struct HypervisorState {
pub cached_block_devices: HashSet<String>,
pub virtiofs_daemon_pid: i32,
pub passfd_listener_port: Option<u32>,
/// guest protection
pub guest_protection_to_use: GuestProtection,
}