From 3da97c5ecba27b7f1fe05501c42274e04b316009 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Thu, 27 Nov 2025 02:00:12 +0000 Subject: [PATCH 1/3] Provide dummy NVMe controller identity values Provide a dummy value for model and firmware rev, otherwise the latest `nvme-cli` main branch build crashes in a Linux guest. --- lib/propolis/src/hw/nvme/mod.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/lib/propolis/src/hw/nvme/mod.rs b/lib/propolis/src/hw/nvme/mod.rs index d7e61b923..f6d0e2d17 100644 --- a/lib/propolis/src/hw/nvme/mod.rs +++ b/lib/propolis/src/hw/nvme/mod.rs @@ -785,12 +785,30 @@ impl PciNvme { let cqes = size_of::().trailing_zeros() as u8; let sqes = size_of::().trailing_zeros() as u8; + let mn = { + let mut mn = [0u8; 40]; + const MODEL: &'static str = "Oxide"; + let sz = MODEL.len().min(40); + mn[..sz].clone_from_slice(&MODEL.as_bytes()[..sz]); + mn + }; + + let fr = { + let mut fr = [0u8; 8]; + const FW_REV: &'static str = "1.0"; + let sz = FW_REV.len().min(40); + fr[..sz].clone_from_slice(&FW_REV.as_bytes()[..sz]); + fr + }; + // Initialize the Identify structure returned when the host issues // an Identify Controller command. let ctrl_ident = bits::IdentifyController { vid: VENDOR_OXIDE, ssvid: VENDOR_OXIDE, sn: *serial_number, + mn, + fr, ieee: OXIDE_OUI, mdts: mdts.unwrap_or(0), // We use standard Completion/Submission Queue Entry structures with no extra From 62ff32478851e28fc0188e0b6c7ebd21cdc8e0cb Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Thu, 27 Nov 2025 14:29:00 +0000 Subject: [PATCH 2/3] use all spaces for model --- lib/propolis/src/hw/nvme/mod.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/propolis/src/hw/nvme/mod.rs b/lib/propolis/src/hw/nvme/mod.rs index f6d0e2d17..e3f0878ff 100644 --- a/lib/propolis/src/hw/nvme/mod.rs +++ b/lib/propolis/src/hw/nvme/mod.rs @@ -786,10 +786,9 @@ impl PciNvme { let sqes = size_of::().trailing_zeros() as u8; let mn = { - let mut mn = [0u8; 40]; - const MODEL: &'static str = "Oxide"; - let sz = MODEL.len().min(40); - mn[..sz].clone_from_slice(&MODEL.as_bytes()[..sz]); + // Use all spaces for the model: otherwise, OVMF's boot order may be + // affected. + let mn = [20u8; 40]; mn }; From 744b131287ea1dae4680fa84177a4931c73919b7 Mon Sep 17 00:00:00 2001 From: James MacMahon Date: Thu, 27 Nov 2025 17:13:12 +0000 Subject: [PATCH 3/3] who has two thumbs and messed up the ascii value --- lib/propolis/src/hw/nvme/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/propolis/src/hw/nvme/mod.rs b/lib/propolis/src/hw/nvme/mod.rs index e3f0878ff..557d104f6 100644 --- a/lib/propolis/src/hw/nvme/mod.rs +++ b/lib/propolis/src/hw/nvme/mod.rs @@ -788,7 +788,7 @@ impl PciNvme { let mn = { // Use all spaces for the model: otherwise, OVMF's boot order may be // affected. - let mn = [20u8; 40]; + let mn = [0x20u8; 40]; mn };