mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
hypervisor: mshv: Add missing implementation
Currently a lot of functions are stubbed out with unimplemented feature tag. Add the missing implementation to successfully boot ARM64 guests on MSHV. Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
This commit is contained in:
@@ -1255,12 +1255,12 @@ impl cpu::Vcpu for MshvVcpu {
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
fn init_pmu(&self, _irq: u32) -> cpu::Result<()> {
|
||||
unimplemented!()
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
fn has_pmu_support(&self) -> bool {
|
||||
unimplemented!()
|
||||
true
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
@@ -1308,17 +1308,17 @@ impl cpu::Vcpu for MshvVcpu {
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
fn vcpu_init(&self, _kvi: &crate::VcpuInit) -> cpu::Result<()> {
|
||||
unimplemented!()
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
fn vcpu_finalize(&self, _feature: i32) -> cpu::Result<()> {
|
||||
unimplemented!()
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
fn vcpu_get_finalized_features(&self) -> i32 {
|
||||
unimplemented!()
|
||||
0
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
@@ -1328,12 +1328,12 @@ impl cpu::Vcpu for MshvVcpu {
|
||||
_kvi: &mut crate::VcpuInit,
|
||||
_id: u8,
|
||||
) -> cpu::Result<()> {
|
||||
unimplemented!()
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
fn create_vcpu_init(&self) -> crate::VcpuInit {
|
||||
unimplemented!();
|
||||
MshvVcpuInit {}.into()
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "x86_64")]
|
||||
@@ -2272,7 +2272,7 @@ impl vm::Vm for MshvVm {
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
fn get_preferred_target(&self, _kvi: &mut crate::VcpuInit) -> vm::Result<()> {
|
||||
unimplemented!()
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Pause the VM
|
||||
|
||||
Reference in New Issue
Block a user