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
@@ -10,7 +10,7 @@ use virtio_devices::RateLimiterConfig;
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
pub struct CpuAffinity {
pub vcpu: u8,
pub host_cpus: Vec<u8>,
pub host_cpus: Vec<usize>,
}
#[derive(Clone, Debug, Default, PartialEq, Eq, Deserialize, Serialize)]