Skip to content

Commit ed57afa

Browse files
authored
Merge pull request #419 from Dstack-TEE/mr-qemu-ver
dstack-mr: Add option --qemu-version
2 parents c8fc789 + 3600ac9 commit ed57afa

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

dstack-mr/cli/src/main.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ struct MachineConfig {
3939
metadata: PathBuf,
4040

4141
/// Enable two-pass add pages
42-
#[arg(long, default_value = "true")]
43-
two_pass_add_pages: Bool,
42+
#[arg(long)]
43+
two_pass_add_pages: Option<Bool>,
4444

4545
/// Enable PIC
46-
#[arg(long, default_value = "true")]
47-
pic: Bool,
46+
#[arg(long)]
47+
pic: Option<Bool>,
4848

4949
/// Enable SMM
5050
#[arg(long, default_value = "false")]
@@ -74,6 +74,10 @@ struct MachineConfig {
7474
#[arg(long, default_value = "true")]
7575
root_verity: Bool,
7676

77+
/// QEMU version
78+
#[arg(long)]
79+
qemu_version: Option<String>,
80+
7781
/// Output JSON
7882
#[arg(long)]
7983
json: bool,
@@ -102,15 +106,16 @@ fn main() -> Result<()> {
102106
.kernel(&kernel_path)
103107
.initrd(&initrd_path)
104108
.kernel_cmdline(&cmdline)
105-
.two_pass_add_pages(config.two_pass_add_pages)
106-
.pic(config.pic)
109+
.maybe_two_pass_add_pages(config.two_pass_add_pages)
110+
.maybe_pic(config.pic)
107111
.smm(config.smm)
108112
.maybe_pci_hole64_size(config.pci_hole64_size)
109113
.hugepages(config.hugepages)
110114
.num_gpus(config.num_gpus)
111115
.num_nvswitches(config.num_nvswitches)
112116
.hotplug_off(config.hotplug_off)
113117
.root_verity(config.root_verity)
118+
.maybe_qemu_version(config.qemu_version.clone())
114119
.build();
115120

116121
let measurements = machine

0 commit comments

Comments
 (0)