@@ -69,7 +69,7 @@ enum Commands {
6969 AwsNitro ( AwsNitroArgs ) ,
7070}
7171
72- struct AmdSevCli {
72+ struct AmdSevSnpCli {
7373 common_args : CommonArgs ,
7474 amd_sev_snp_args : AmdSevSnpArgs ,
7575}
@@ -81,7 +81,10 @@ struct AwsNitroCli {
8181
8282#[ derive( Clone , Debug , Args ) ]
8383struct AmdSevSnpArgs {
84- #[ arg( long = "firmware-image" , help = "Path to the firmware image file" ) ]
84+ #[ arg(
85+ long = "firmware-image" ,
86+ help = "Path to the firmware image file, defaulting to the relevant vendored image if not provided"
87+ ) ]
8588 firmware_image_path : Option < PathBuf > ,
8689
8790 #[ arg(
@@ -126,7 +129,7 @@ impl AwsNitroCli {
126129 }
127130}
128131
129- impl AmdSevCli {
132+ impl AmdSevSnpCli {
130133 fn to_vm_run_args ( & self ) -> Result < VmRunArgs > {
131134 let cpu_count = self . common_args . cpu_count ;
132135 let memory_mib = self . common_args . memory ;
@@ -155,7 +158,7 @@ fn main() -> Result<()> {
155158
156159 let common_args = cli. common_args ;
157160 match cli. command {
158- Commands :: AmdSevSnp ( amd_sev_snp_args) => run_amd_sev_enclave ( AmdSevCli {
161+ Commands :: AmdSevSnp ( amd_sev_snp_args) => run_amd_sev_enclave ( AmdSevSnpCli {
159162 common_args,
160163 amd_sev_snp_args,
161164 } ) ,
@@ -166,13 +169,14 @@ fn main() -> Result<()> {
166169 }
167170}
168171
169- fn run_amd_sev_enclave ( amd_sev_cli : AmdSevCli ) -> Result < ( ) > {
172+ fn run_amd_sev_enclave ( amd_sev_cli : AmdSevSnpCli ) -> Result < ( ) > {
170173 let run_args = amd_sev_cli. to_vm_run_args ( ) ?;
171- let AmdSevCli {
174+ let AmdSevSnpCli {
172175 common_args,
173176 amd_sev_snp_args,
174177 } = amd_sev_cli;
175178 if common_args. simulate {
179+ info ! ( "running in simulation mode without confidential computing protection" ) ;
176180 run_to_completion :: < VmSimulator > (
177181 run_args,
178182 amd_sev_snp_args. enclave_name ,
@@ -199,7 +203,7 @@ fn run_nitro_enclave(nitro_cli: AwsNitroCli) -> Result<()> {
199203 let elf = eif. application ( ) . context ( "failed to parse enclave file" ) ?;
200204 let elf_path = create_elf ( elf) . context ( "failed to create executable file" ) ?;
201205
202- info ! ( "Simulating enclave as {}" , elf_path. display( ) , ) ;
206+ info ! ( "simulating enclave as {}" , elf_path. display( ) , ) ;
203207 let run_args = EnclaveSimulatorArgs :: new ( elf_path) ;
204208 run_to_completion :: < EnclaveSimulator > (
205209 run_args,
0 commit comments