mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
arch, vmm: Add e820 entry related to SGX EPC region
SGX expects the EPC region to be reported as "reserved" from the e820 table. This patch adds a new entry to the table if SGX is enabled. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
committed by
Samuel Ortiz
parent
e10d9b13d4
commit
a5c4f0fc6f
@@ -584,6 +584,14 @@ impl Vm {
|
||||
));
|
||||
}
|
||||
|
||||
let sgx_epc_region = self
|
||||
.memory_manager
|
||||
.lock()
|
||||
.unwrap()
|
||||
.sgx_epc_region()
|
||||
.as_ref()
|
||||
.cloned();
|
||||
|
||||
match entry_addr.setup_header {
|
||||
Some(hdr) => {
|
||||
arch::configure_system(
|
||||
@@ -595,6 +603,7 @@ impl Vm {
|
||||
Some(hdr),
|
||||
rsdp_addr,
|
||||
BootProtocol::LinuxBoot,
|
||||
sgx_epc_region,
|
||||
)
|
||||
.map_err(Error::ConfigureSystem)?;
|
||||
}
|
||||
@@ -608,6 +617,7 @@ impl Vm {
|
||||
None,
|
||||
rsdp_addr,
|
||||
entry_addr.protocol,
|
||||
sgx_epc_region,
|
||||
)
|
||||
.map_err(Error::ConfigureSystem)?;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user