Skip to content

Commit

Permalink
Merge branch 'main' into aml_error_handling
Browse files Browse the repository at this point in the history
  • Loading branch information
bchalios authored Oct 24, 2024
2 parents fdba04a + 0b9cf39 commit 6f7bfeb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/vmm/src/arch/aarch64/cache_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ pub(crate) struct CacheEntry {
// Type of cache: Unified, Data, Instruction.
pub type_: CacheType,
pub size_: Option<u32>,
pub number_of_sets: Option<u16>,
pub number_of_sets: Option<u32>,
pub line_size: Option<u16>,
// How many CPUS share this cache.
pub cpus_per_unit: u16,
Expand Down Expand Up @@ -114,7 +114,7 @@ impl CacheEntry {
}

if let Ok(number_of_sets) = store.get_by_key(index, "number_of_sets") {
cache.number_of_sets = Some(number_of_sets.parse::<u16>().map_err(|err| {
cache.number_of_sets = Some(number_of_sets.parse::<u32>().map_err(|err| {
CacheInfoError::InvalidCacheAttr("number_of_sets".to_string(), err.to_string())
})?);
} else {
Expand Down
4 changes: 2 additions & 2 deletions src/vmm/src/arch/aarch64/fdt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ fn create_cpu_nodes(fdt: &mut FdtWriter, vcpu_mpidr: &[u64]) -> Result<(), FdtEr
fdt.property_u32(cache.type_.of_cache_line_size(), u32::from(line_size))?;
}
if let Some(number_of_sets) = cache.number_of_sets {
fdt.property_u32(cache.type_.of_cache_sets(), u32::from(number_of_sets))?;
fdt.property_u32(cache.type_.of_cache_sets(), number_of_sets)?;
}
}

Expand Down Expand Up @@ -197,7 +197,7 @@ fn create_cpu_nodes(fdt: &mut FdtWriter, vcpu_mpidr: &[u64]) -> Result<(), FdtEr
fdt.property_u32(cache.type_.of_cache_line_size(), u32::from(line_size))?;
}
if let Some(number_of_sets) = cache.number_of_sets {
fdt.property_u32(cache.type_.of_cache_sets(), u32::from(number_of_sets))?;
fdt.property_u32(cache.type_.of_cache_sets(), number_of_sets)?;
}
if let Some(cache_type) = cache.type_.of_cache_type() {
fdt.property_null(cache_type)?;
Expand Down
2 changes: 1 addition & 1 deletion src/vmm/src/arch/aarch64/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ use crate::vstate::memory::{Address, Bytes, GuestAddress, GuestMemory, GuestMemo
/// Errors thrown while configuring aarch64 system.
#[derive(Debug, thiserror::Error, displaydoc::Display)]
pub enum ConfigurationError {
/// Failed to create a Flattened Device Tree for this aarch64 microVM.
/// Failed to create a Flattened Device Tree for this aarch64 microVM: {0}
SetupFDT(#[from] fdt::FdtError),
/// Failed to compute the initrd address.
InitrdAddress,
Expand Down

0 comments on commit 6f7bfeb

Please sign in to comment.