Skip to content

Commit 3ec3f53

Browse files
committed
review: address Copilot comments
- OvmfVariant doc: clarify that the firmware switch and the runtime version-to-variant cutoff aren't the same line. 0.5.9 already ships the new OVMF, but the heuristic in ovmf_variant_for_version deliberately draws the boundary at 0.5.10. - dstack-mr CLI: drop unnecessary image_info.cmdline.clone() — the rest of the struct stays usable via partial move (ovmf_variant is Copy, version is only borrowed).
1 parent c827191 commit 3ec3f53

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

dstack-mr/cli/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ fn main() -> Result<()> {
103103
let firmware_path = parent_dir.join(&image_info.bios).display().to_string();
104104
let kernel_path = parent_dir.join(&image_info.kernel).display().to_string();
105105
let initrd_path = parent_dir.join(&image_info.initrd).display().to_string();
106-
let cmdline = image_info.cmdline.clone() + " initrd=initrd";
106+
let cmdline = image_info.cmdline + " initrd=initrd";
107107

108108
// CLI flag wins, then the explicit `ovmf_variant` in metadata.json,
109109
// and finally the OS version field. Older metadata.json files may

dstack-types/src/lib.rs

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,17 @@ use size_parser::human_size;
1111

1212
/// Identifies which OVMF flavour the guest image was built with.
1313
///
14-
/// dstack switched OVMF from an untagged 2024-09 snapshot to edk2-stable202505 in
15-
/// the run-up to 0.5.9 (commit f9f11f3 on meta-dstack). The newer firmware emits
16-
/// more boot-time measurement events into RTMR[0], so quote replay needs a
17-
/// different expected event list for the two flavours.
14+
/// The firmware switch happened in meta-dstack commit f9f11f3 (upgrade from an
15+
/// untagged 2024-09 snapshot to edk2-stable202505): 0.5.7 and earlier shipped
16+
/// `Pre202505`, 0.5.9 onwards ships `Stable202505`. The newer firmware emits
17+
/// more boot-time events into RTMR[0], so quote replay needs a different
18+
/// expected event list for the two flavours.
19+
///
20+
/// When the variant isn't carried explicitly in `VmConfig`, the runtime cutoff
21+
/// rule in `dstack_mr::ovmf_variant_for_version` draws the line at OS version
22+
/// `0.5.10` (and again at `0.6.1`) — a deliberate policy decision that doesn't
23+
/// follow the firmware-flip date exactly. See that function's docs for the
24+
/// authoritative selection rule.
1825
#[derive(Deserialize, Serialize, Debug, Clone, Copy, PartialEq, Eq, Default)]
1926
#[serde(rename_all = "snake_case")]
2027
pub enum OvmfVariant {

0 commit comments

Comments
 (0)