File tree Expand file tree Collapse file tree 6 files changed +13
-3
lines changed
openhcl/underhill_attestation/src Expand file tree Collapse file tree 6 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -1006,9 +1006,11 @@ async fn get_derived_keys(
10061006 gsp_response_by_id. seed . buffer [ ..gsp_response_by_id. seed . length as usize ]
10071007 . to_vec ( ) ,
10081008 ) ;
1009+ key_protector_settings. decrypt_gsp_type = GspType :: GspById ;
10091010 } else {
10101011 derived_keys. ingress = ingress_key;
10111012 }
1013+ } else {
10121014 key_protector_settings. decrypt_gsp_type = GspType :: GspById ;
10131015 }
10141016
Original file line number Diff line number Diff line change @@ -2529,6 +2529,7 @@ impl LoadedVmInner {
25292529 enable_vpci_boot,
25302530 uefi_console_mode,
25312531 default_boot_always_attempt,
2532+ bios_guid,
25322533 } => {
25332534 let madt = acpi_builder. build_madt ( ) ;
25342535 let srat = acpi_builder. build_srat ( ) ;
@@ -2545,6 +2546,7 @@ impl LoadedVmInner {
25452546 serial : enable_serial,
25462547 uefi_console_mode,
25472548 default_boot_always_attempt,
2549+ bios_guid,
25482550 } ;
25492551 let regs = super :: vm_loaders:: uefi:: load_uefi (
25502552 firmware,
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ pub struct UefiLoadSettings {
3838 pub serial : bool ,
3939 pub uefi_console_mode : Option < UefiConsoleMode > ,
4040 pub default_boot_always_attempt : bool ,
41+ pub bios_guid : Guid ,
4142}
4243
4344/// Loads the UEFI firmware.
@@ -126,7 +127,7 @@ pub fn load_uefi(
126127 . add_raw ( config:: BlobStructureType :: Madt , madt)
127128 . add_raw ( config:: BlobStructureType :: Srat , srat)
128129 . add_raw ( config:: BlobStructureType :: MemoryMap , memory_map. as_bytes ( ) )
129- . add ( & config:: BiosGuid ( Guid :: new_random ( ) ) )
130+ . add ( & config:: BiosGuid ( load_settings . bios_guid ) )
130131 . add ( & config:: Entropy ( entropy) )
131132 . add ( & config:: MmioRanges ( [
132133 config:: Mmio {
Original file line number Diff line number Diff line change @@ -119,6 +119,7 @@ pub enum LoadMode {
119119 enable_vpci_boot : bool ,
120120 uefi_console_mode : Option < UefiConsoleMode > ,
121121 default_boot_always_attempt : bool ,
122+ bios_guid : Guid ,
122123 } ,
123124 Pcat {
124125 firmware : RomFileLocation ,
Original file line number Diff line number Diff line change @@ -795,6 +795,9 @@ fn vm_config_from_command_line(
795795 ) ;
796796 }
797797
798+ // TODO: load from VMGS file if it exists
799+ let bios_guid = Guid :: new_random ( ) ;
800+
798801 let VmChipsetResult {
799802 chipset,
800803 mut chipset_devices,
@@ -863,6 +866,7 @@ fn vm_config_from_command_line(
863866 UefiConsoleModeCli :: None => UefiConsoleMode :: None ,
864867 } ) ,
865868 default_boot_always_attempt : opt. default_boot_always_attempt ,
869+ bios_guid,
866870 } ;
867871 } else {
868872 // Linux Direct
@@ -1049,8 +1053,7 @@ fn vm_config_from_command_line(
10491053 guest_secret_key : None ,
10501054 logger : None ,
10511055 is_confidential_vm : false ,
1052- // TODO: generate an actual BIOS guid and put it here
1053- bios_guid : guid:: guid!( "00000000-0000-0000-0000-000000000000" ) ,
1056+ bios_guid,
10541057 }
10551058 . into_resource ( ) ,
10561059 } ) ;
Original file line number Diff line number Diff line change @@ -673,6 +673,7 @@ impl PetriVmConfigSetupCore<'_> {
673673 enable_vpci_boot : matches ! ( self . boot_device_type, BootDeviceType :: Nvme ) ,
674674 uefi_console_mode : Some ( hvlite_defs:: config:: UefiConsoleMode :: Com1 ) ,
675675 default_boot_always_attempt : false ,
676+ bios_guid : Guid :: new_random ( ) ,
676677 }
677678 }
678679 (
You can’t perform that action at this time.
0 commit comments