mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-22 03:12:27 +00:00
hypervisor: Add implementation to fetch host IPA limit on MSHV
This fixes an compilation error when we try to compile CloudHypervisor for MSHV on aarch64. Signed-off-by: Jinank Jain <jinankjain@microsoft.com>
This commit is contained in:
parent
bfeab76059
commit
5cbf907200
@ -443,6 +443,23 @@ impl hypervisor::Hypervisor for MshvHypervisor {
|
||||
fn get_guest_debug_hw_bps(&self) -> usize {
|
||||
0
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
///
|
||||
/// Retrieve AArch64 host maximum IPA size supported by MSHV.
|
||||
///
|
||||
fn get_host_ipa_limit(&self) -> i32 {
|
||||
let host_ipa = self.mshv.get_host_partition_property(
|
||||
hv_partition_property_code_HV_PARTITION_PROPERTY_PHYSICAL_ADDRESS_WIDTH as u64,
|
||||
);
|
||||
|
||||
match host_ipa {
|
||||
Ok(ipa) => ipa,
|
||||
Err(e) => {
|
||||
panic!("Failed to get host IPA limit: {:?}", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "sev_snp")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user