Files
s390-tools/rust/pvinfo/src/constants.rs
Annu Sharma ce82010827 Add tool to display Secure Execution system information
Add 'pvinfo' a tool to display the information of enabled flags, and
print the debug information in Yaml and Human format.

Reviewed-by: Steffen Eiden <seiden@linux.ibm.com>
Signed-off-by: Serena Santosh <serena@linux.ibm.com>
Signed-off-by: Ann Mariya Jojo <annjojo@linux.ibm.com>
Signed-off-by: Annu Sharma <annu09@linux.ibm.com>
Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
2025-12-10 14:41:43 +01:00

44 lines
1.6 KiB
Rust

// SPDX-License-Identifier: MIT
//
// Copyright IBM Corp. 2025
//! Constants used throughout the PV Info Tool
// Base directories
#[cfg(test)]
pub const BASE_DIR: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/tests/assets");
#[cfg(not(test))]
pub const BASE_DIR: &str = "/sys/firmware/uv";
pub const QUERY_DIR: &str = "query";
// File names
pub const FACILITIES: &str = "facilities";
pub const FEATURE_INDICATIONS: &str = "feature_indications";
pub const PROT_VIRT_GUEST: &str = "prot_virt_guest";
pub const PROT_VIRT_HOST: &str = "prot_virt_host";
pub const MAX_ADDRESS: &str = "max_address";
pub const MAX_ASSOC_SECRETS: &str = "max_assoc_secrets";
pub const MAX_CPUS: &str = "max_cpus";
pub const MAX_GUESTS: &str = "max_guests";
pub const MAX_RETR_SECRETS: &str = "max_retr_secrets";
pub const MAX_SECRETS: &str = "max_secrets";
pub const SUPP_ADD_SECRET_PCF: &str = "supp_add_secret_pcf";
pub const SUPP_ADD_SECRET_REQ_VER: &str = "supp_add_secret_req_ver";
pub const SUPP_ATT_PFLAGS: &str = "supp_att_pflags";
pub const SUPP_ATT_REQ_HDR_VER: &str = "supp_att_req_hdr_ver";
pub const SUPP_SE_HDR_PCF: &str = "supp_se_hdr_pcf";
pub const SUPP_SE_HDR_VER: &str = "supp_se_hdr_ver";
pub const SUPP_SECRET_TYPES: &str = "supp_secret_types";
// Limits
pub const LIMITS: [(&str, &str); 6] = [
(MAX_ADDRESS, "Maximal Address for a SE-Guest"),
(MAX_ASSOC_SECRETS, "Maximal number of associated secrets"),
(MAX_CPUS, "Maximal number of CPUs in one SE-Guest"),
(MAX_GUESTS, "Maximal number of SE-Guests"),
(MAX_RETR_SECRETS, "Maximal number of retrievable secrets"),
(MAX_SECRETS, "Maximal number of secrets in the system"),
];