pvh: Introduce EntryPoint struct

In order to properly initialize the kvm regs/sregs structs for
the guest, the load_kernel() return type must specify which
boot protocol to use with the entry point address it returns.

Make load_kernel() return an EntryPoint struct containing the
required information. This structure will later be used
in the vCPU configuration methods to setup the appropriate
initial conditions for the guest.

Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
This commit is contained in:
Alejandro Jimenez
2020-02-11 22:37:33 -05:00
committed by Sebastien Boeuf
parent 98b956886e
commit 24f0e42e6a
4 changed files with 64 additions and 18 deletions

View File

@@ -77,4 +77,5 @@ pub mod x86_64;
#[cfg(target_arch = "x86_64")]
pub use x86_64::{
arch_memory_regions, configure_system, layout, layout::CMDLINE_MAX_SIZE, layout::CMDLINE_START,
BootProtocol, EntryPoint,
};