vmm: x86_64: Rename load_firmware() to reflect its purpose

This function only supports loading legacy, non-PVH firmware binaries.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2022-08-16 13:08:24 +01:00
parent 0d682e185f
commit 282a1001ef

View File

@ -989,7 +989,7 @@ impl Vm {
}
#[cfg(target_arch = "x86_64")]
fn load_firmware(
fn load_legacy_firmware(
mut firmware: File,
memory_manager: &Arc<Mutex<MemoryManager>>,
) -> Result<EntryPoint> {
@ -1055,7 +1055,9 @@ impl Vm {
) {
Ok(entry_addr) => entry_addr,
Err(e) => match e {
Elf(InvalidElfMagicNumber) => return Self::load_firmware(kernel, &memory_manager),
Elf(InvalidElfMagicNumber) => {
return Self::load_legacy_firmware(kernel, &memory_manager)
}
_ => {
return Err(Error::KernelLoad(e));
}