Skip to content

Commit 6f7bfeb

Browse files
authored
Merge branch 'main' into aml_error_handling
2 parents fdba04a + 0b9cf39 commit 6f7bfeb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/vmm/src/arch/aarch64/cache_info.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub(crate) struct CacheEntry {
3838
// Type of cache: Unified, Data, Instruction.
3939
pub type_: CacheType,
4040
pub size_: Option<u32>,
41-
pub number_of_sets: Option<u16>,
41+
pub number_of_sets: Option<u32>,
4242
pub line_size: Option<u16>,
4343
// How many CPUS share this cache.
4444
pub cpus_per_unit: u16,
@@ -114,7 +114,7 @@ impl CacheEntry {
114114
}
115115

116116
if let Ok(number_of_sets) = store.get_by_key(index, "number_of_sets") {
117-
cache.number_of_sets = Some(number_of_sets.parse::<u16>().map_err(|err| {
117+
cache.number_of_sets = Some(number_of_sets.parse::<u32>().map_err(|err| {
118118
CacheInfoError::InvalidCacheAttr("number_of_sets".to_string(), err.to_string())
119119
})?);
120120
} else {

src/vmm/src/arch/aarch64/fdt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ fn create_cpu_nodes(fdt: &mut FdtWriter, vcpu_mpidr: &[u64]) -> Result<(), FdtEr
147147
fdt.property_u32(cache.type_.of_cache_line_size(), u32::from(line_size))?;
148148
}
149149
if let Some(number_of_sets) = cache.number_of_sets {
150-
fdt.property_u32(cache.type_.of_cache_sets(), u32::from(number_of_sets))?;
150+
fdt.property_u32(cache.type_.of_cache_sets(), number_of_sets)?;
151151
}
152152
}
153153

@@ -197,7 +197,7 @@ fn create_cpu_nodes(fdt: &mut FdtWriter, vcpu_mpidr: &[u64]) -> Result<(), FdtEr
197197
fdt.property_u32(cache.type_.of_cache_line_size(), u32::from(line_size))?;
198198
}
199199
if let Some(number_of_sets) = cache.number_of_sets {
200-
fdt.property_u32(cache.type_.of_cache_sets(), u32::from(number_of_sets))?;
200+
fdt.property_u32(cache.type_.of_cache_sets(), number_of_sets)?;
201201
}
202202
if let Some(cache_type) = cache.type_.of_cache_type() {
203203
fdt.property_null(cache_type)?;

src/vmm/src/arch/aarch64/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use crate::vstate::memory::{Address, Bytes, GuestAddress, GuestMemory, GuestMemo
2828
/// Errors thrown while configuring aarch64 system.
2929
#[derive(Debug, thiserror::Error, displaydoc::Display)]
3030
pub enum ConfigurationError {
31-
/// Failed to create a Flattened Device Tree for this aarch64 microVM.
31+
/// Failed to create a Flattened Device Tree for this aarch64 microVM: {0}
3232
SetupFDT(#[from] fdt::FdtError),
3333
/// Failed to compute the initrd address.
3434
InitrdAddress,

0 commit comments

Comments
 (0)