mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
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:
+1
-1
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user