mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-04 19:11:11 +00:00
vmm: tdx: Pass ACPI tables through the HOB
Relying on helpers for creating the ACPI tables and to add each table to the HOB, this patch connects the dot to provide the set of ACPI tables to the TD firmware. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
2acb50f752
commit
7b9a110540
@ -778,7 +778,6 @@ pub fn create_acpi_tables(
|
||||
}
|
||||
|
||||
#[cfg(feature = "tdx")]
|
||||
#[allow(unused)]
|
||||
pub fn create_acpi_tables_tdx(
|
||||
device_manager: &Arc<Mutex<DeviceManager>>,
|
||||
cpu_manager: &Arc<Mutex<CpuManager>>,
|
||||
|
@ -1841,6 +1841,18 @@ impl Vm {
|
||||
)
|
||||
.map_err(Error::PopulateHob)?;
|
||||
|
||||
// Loop over the ACPI tables and copy them to the HOB.
|
||||
#[cfg(feature = "acpi")]
|
||||
for acpi_table in crate::acpi::create_acpi_tables_tdx(
|
||||
&self.device_manager,
|
||||
&self.cpu_manager,
|
||||
&self.memory_manager,
|
||||
&self.numa_nodes,
|
||||
) {
|
||||
hob.add_acpi_table(&mem, acpi_table.as_slice())
|
||||
.map_err(Error::PopulateHob)?;
|
||||
}
|
||||
|
||||
hob.finish(&mem).map_err(Error::PopulateHob)?;
|
||||
|
||||
Ok(hob_offset)
|
||||
|
Loading…
Reference in New Issue
Block a user