From 1970ee89da4600b0388c5cec56d1a7ada08f1a58 Mon Sep 17 00:00:00 2001 From: Sebastien Boeuf Date: Fri, 4 Sep 2020 11:54:41 +0200 Subject: [PATCH] main, vmm: Remove guest_numa_node option from memory zones The way to describe guest NUMA nodes has been updated through previous commits, letting the user describe the full NUMA topology through the --numa parameter (or NumaConfig). That's why we can remove the deprecated and unused 'guest_numa_node' option. Signed-off-by: Sebastien Boeuf --- src/main.rs | 2 +- vmm/src/api/openapi/cloud-hypervisor.yaml | 3 --- vmm/src/config.rs | 9 +-------- vmm/src/memory_manager.rs | 1 - 4 files changed, 2 insertions(+), 13 deletions(-) diff --git a/src/main.rs b/src/main.rs index 95c24abbc..4297401fa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -121,7 +121,7 @@ fn create_app<'a, 'b>( "User defined memory zone parameters \ \"size=,file=,\ shared=on|off,hugepages=on|off,host_numa_node=,\ - guest_numa_node=,id=\"", + id=\"", ) .takes_value(true) .min_values(1) diff --git a/vmm/src/api/openapi/cloud-hypervisor.yaml b/vmm/src/api/openapi/cloud-hypervisor.yaml index 0149d172b..0b72a5ca5 100644 --- a/vmm/src/api/openapi/cloud-hypervisor.yaml +++ b/vmm/src/api/openapi/cloud-hypervisor.yaml @@ -477,9 +477,6 @@ components: host_numa_node: type: integer format: uint32 - guest_numa_node: - type: integer - format: uint32 MemoryConfig: required: diff --git a/vmm/src/config.rs b/vmm/src/config.rs index 3a1b4f44c..9eff718b0 100644 --- a/vmm/src/config.rs +++ b/vmm/src/config.rs @@ -366,8 +366,6 @@ pub struct MemoryZoneConfig { pub hugepages: bool, #[serde(default)] pub host_numa_node: Option, - #[serde(default)] - pub guest_numa_node: Option, } #[derive(Clone, Debug, PartialEq, Deserialize, Serialize)] @@ -449,8 +447,7 @@ impl MemoryConfig { .add("file") .add("shared") .add("hugepages") - .add("host_numa_node") - .add("guest_numa_node"); + .add("host_numa_node"); parser.parse(memory_zone).map_err(Error::ParseMemoryZone)?; let id = parser.get("id").ok_or(Error::ParseMemoryZoneIdMissing)?; @@ -473,9 +470,6 @@ impl MemoryConfig { let host_numa_node = parser .convert::("host_numa_node") .map_err(Error::ParseMemoryZone)?; - let guest_numa_node = parser - .convert::("guest_numa_node") - .map_err(Error::ParseMemoryZone)?; zones.push(MemoryZoneConfig { id, @@ -484,7 +478,6 @@ impl MemoryConfig { shared, hugepages, host_numa_node, - guest_numa_node, }); } Some(zones) diff --git a/vmm/src/memory_manager.rs b/vmm/src/memory_manager.rs index 056d2fad9..3de8bb447 100644 --- a/vmm/src/memory_manager.rs +++ b/vmm/src/memory_manager.rs @@ -414,7 +414,6 @@ impl MemoryManager { shared: config.shared, hugepages: config.hugepages, host_numa_node: None, - guest_numa_node: None, }]; (config.size, zones)