Skip to content

Commit 23d4f77

Browse files
authored
fix: add iLO7-Intel fallback virtualization key (#24)
HPE iLO7 Intels machines don't have the `IntelProcVtd` BIOS attribute but it does have `ProcVirtualization`. This MR updates `get_enable_virtualization_key()` to account for this. Manually verified this by enabling/disabling `ProcVirtualization` via the redfish BIOS which enables/disables `Intel(R) Virtualization Technology (Intel VT)` in the BMC UI BIOS setup menu. Signed-off-by: Krish Dandiwala <kdandiwala@nvidia.com>
1 parent 046ac4e commit 23d4f77

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

src/hpe.rs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,16 +1090,17 @@ impl Bmc {
10901090
/// Both Intel and AMD have virtualization technologies that help fix the issue of x86 instruction
10911091
/// architecture not being virtualizable.
10921092
/// get_enable_virtualization_key returns the KEY for enabling virtualization in the bios attributes
1093-
/// map that the Lenovo's BMC returns when querying the bios attributes registry. The string returned
1094-
/// will depend on the processors within the given HPE.
1093+
/// map that the HPE BMC returns when querying the bios attributes registry. The string returned
1094+
/// will depend on the processor type and BIOS version (e.g., iLO 7 may use ProcVirtualization instead of IntelProcVtd).
10951095
async fn get_enable_virtualization_key(
10961096
&self,
10971097
bios_attributes: &Value,
10981098
) -> Result<&str, RedfishError> {
10991099
const INTEL_ENABLE_VIRTUALIZATION_KEY: &str = "IntelProcVtd";
11001100
const AMD_ENABLE_VIRTUALIZATION_KEY: &str = "ProcAmdIoVt";
1101+
const PROC_VIRTUALIZATION_KEY: &str = "ProcVirtualization";
11011102

1102-
// Intel specific
1103+
// Intel specific (older iLO versions)
11031104
if bios_attributes
11041105
.get(INTEL_ENABLE_VIRTUALIZATION_KEY)
11051106
.is_some()
@@ -1108,11 +1109,14 @@ impl Bmc {
11081109
// AMD specific
11091110
} else if bios_attributes.get(AMD_ENABLE_VIRTUALIZATION_KEY).is_some() {
11101111
Ok(AMD_ENABLE_VIRTUALIZATION_KEY)
1112+
// iLO 7 Intel fallback
1113+
} else if bios_attributes.get(PROC_VIRTUALIZATION_KEY).is_some() {
1114+
Ok(PROC_VIRTUALIZATION_KEY)
11111115
} else {
11121116
Err(RedfishError::MissingKey {
11131117
key: format!(
1114-
"{}/{}",
1115-
INTEL_ENABLE_VIRTUALIZATION_KEY, AMD_ENABLE_VIRTUALIZATION_KEY
1118+
"{}/{}/{}",
1119+
INTEL_ENABLE_VIRTUALIZATION_KEY, AMD_ENABLE_VIRTUALIZATION_KEY, PROC_VIRTUALIZATION_KEY
11161120
)
11171121
.to_string(),
11181122
url: format!("Systems/{}/Bios", self.s.system_id()),

0 commit comments

Comments
 (0)