mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
vmm: Enforce guest_numa_id on NUMA nodes
The documentation says guest_numa_id is required to be unique and therefore the parser() giving default value for non-existing guest_numa_id with .unwrap_or(0) is dangerous. Return a validation error if guest_numa_id is not provided instead of silently defaulting to 0. Signed-off-by: Saravanan D <saravanand@crusoe.ai>
This commit is contained in:
committed by
Rob Bradford
parent
9ba9c0819a
commit
231bbe2d5d
@@ -676,7 +676,6 @@ pub struct NumaDistance {
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
|
||||
pub struct NumaConfig {
|
||||
#[serde(default)]
|
||||
pub guest_numa_id: u32,
|
||||
#[serde(default)]
|
||||
pub cpus: Option<Vec<u32>>,
|
||||
|
||||
Reference in New Issue
Block a user