mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-01-22 12:35:19 +00:00
vmm: Duplicate Vm::entry_point() across architectures
These will have very different implementations when asynchronously loading the kernel. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
1d1a087fc5
commit
56fe4c61af
@ -2055,12 +2055,23 @@ impl Vm {
|
|||||||
Some(rsdp_addr)
|
Some(rsdp_addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "x86_64")]
|
||||||
|
fn entry_point(&mut self) -> Result<Option<EntryPoint>> {
|
||||||
|
#[cfg(feature = "tdx")]
|
||||||
|
if self.config.lock().unwrap().tdx.is_some() {
|
||||||
|
return Ok(None);
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(if self.kernel.as_ref().is_some() {
|
||||||
|
Some(self.load_kernel()?)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(target_arch = "aarch64")]
|
||||||
fn entry_point(&mut self) -> Result<Option<EntryPoint>> {
|
fn entry_point(&mut self) -> Result<Option<EntryPoint>> {
|
||||||
Ok(if self.kernel.as_ref().is_some() {
|
Ok(if self.kernel.as_ref().is_some() {
|
||||||
#[cfg(feature = "tdx")]
|
|
||||||
if self.config.lock().unwrap().tdx.is_some() {
|
|
||||||
return Ok(None);
|
|
||||||
}
|
|
||||||
Some(self.load_kernel()?)
|
Some(self.load_kernel()?)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user