arch, vmm: Expose platform uuid via SMBIOS

Parse and set uuid.

Signed-off-by: lizhaoxin1 <Lxiaoyouling@163.com>
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
lizhaoxin1
2022-08-04 11:34:26 +08:00
committed by Sebastien Boeuf
parent 3abc1e1e51
commit bc3a276b43
5 changed files with 95 additions and 13 deletions

View File

@@ -1119,6 +1119,14 @@ impl Vm {
.as_ref()
.and_then(|p| p.serial_number.clone());
let uuid = self
.config
.lock()
.unwrap()
.platform
.as_ref()
.and_then(|p| p.uuid.clone());
arch::configure_system(
&mem,
arch::layout::CMDLINE_START,
@@ -1127,6 +1135,7 @@ impl Vm {
rsdp_addr,
sgx_epc_region,
serial_number.as_deref(),
uuid.as_deref(),
)
.map_err(Error::ConfigureSystem)?;
Ok(())