mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-03 05:10:55 +00:00
fix support for pv
This commit is contained in:
@ -167,7 +167,7 @@ impl<I: BootImageLoader, P: BootSetupPlatform> BootSetup<I, P> {
|
|||||||
cmdline: &str,
|
cmdline: &str,
|
||||||
) -> Result<BootDomain> {
|
) -> Result<BootDomain> {
|
||||||
let total_pages = mem_mb << (20 - self.platform.page_shift());
|
let total_pages = mem_mb << (20 - self.platform.page_shift());
|
||||||
let image_info = self.image_loader.parse(true).await?;
|
let image_info = self.image_loader.parse(self.platform.hvm()).await?;
|
||||||
let mut domain = BootDomain {
|
let mut domain = BootDomain {
|
||||||
domid: self.domid,
|
domid: self.domid,
|
||||||
call: self.call.clone(),
|
call: self.call.clone(),
|
||||||
@ -266,6 +266,7 @@ pub trait BootSetupPlatform: Clone {
|
|||||||
fn page_size(&self) -> u64;
|
fn page_size(&self) -> u64;
|
||||||
fn page_shift(&self) -> u64;
|
fn page_shift(&self) -> u64;
|
||||||
fn needs_early_kernel(&self) -> bool;
|
fn needs_early_kernel(&self) -> bool;
|
||||||
|
fn hvm(&self) -> bool;
|
||||||
|
|
||||||
async fn initialize_early(&mut self, domain: &mut BootDomain) -> Result<()>;
|
async fn initialize_early(&mut self, domain: &mut BootDomain) -> Result<()>;
|
||||||
|
|
||||||
|
@ -453,6 +453,10 @@ impl BootSetupPlatform for X86PvPlatform {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn hvm(&self) -> bool {
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
async fn initialize_early(&mut self, _: &mut BootDomain) -> Result<()> {
|
async fn initialize_early(&mut self, _: &mut BootDomain) -> Result<()> {
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@ -330,6 +330,10 @@ impl BootSetupPlatform for X86PvhPlatform {
|
|||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn hvm(&self) -> bool {
|
||||||
|
true
|
||||||
|
}
|
||||||
|
|
||||||
async fn initialize_early(&mut self, domain: &mut BootDomain) -> Result<()> {
|
async fn initialize_early(&mut self, domain: &mut BootDomain) -> Result<()> {
|
||||||
{
|
{
|
||||||
let mut config: acpi_config = unsafe { MaybeUninit::zeroed().assume_init() };
|
let mut config: acpi_config = unsafe { MaybeUninit::zeroed().assume_init() };
|
||||||
|
Reference in New Issue
Block a user