vmm: support setting cpu affinity with host cpu indices >255

On hosts with >256 cpus, setting the cpu affinity to a host cpu index
>255 will return an error because type of `host_cpu` is `u8`.
This commit changes the type of `host_cpu` to `usize` to remove this
limitation.

Signed-off-by: Sean Banko <sbanko@crusoeenergy.com>
This commit is contained in:
Sean Banko
2024-01-16 23:39:09 +00:00
committed by Rob Bradford
parent 993a8324e2
commit e33279471f
4 changed files with 15 additions and 4 deletions
+1 -1
View File
@@ -590,7 +590,7 @@ impl CpusConfig {
.map_err(Error::ParseCpus)?
.unwrap_or(DEFAULT_MAX_PHYS_BITS);
let affinity = parser
.convert::<Tuple<u8, Vec<u8>>>("affinity")
.convert::<Tuple<u8, Vec<usize>>>("affinity")
.map_err(Error::ParseCpus)?
.map(|v| {
v.0.iter()