From a2fd7de97a78b74de1136e36d9083a0d65ed30fb Mon Sep 17 00:00:00 2001 From: leizongkun Date: Thu, 20 Nov 2025 21:55:19 +0800 Subject: [PATCH] Enable the function of providing QEMU with a more flexible memory NUMA binding approach, allowing a guest NUMA node to allocate memory to different host NUMA nodes according to specified proportions. Signed-off-by: wangzhigang Signed-off-by: zhangliang Signed-off-by: leizongkun --- backends/hostmem.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backends/hostmem.c b/backends/hostmem.c index 9c5162760f..33120a4861 100644 --- a/backends/hostmem.c +++ b/backends/hostmem.c @@ -655,6 +655,14 @@ host_memory_backend_class_init(ObjectClass *oc, void *data) host_memory_backend_get_host_nodes, host_memory_backend_set_host_nodes, NULL, NULL); +#ifdef CONFIG_MBIND_PROPORTION + object_class_property_add(oc, "host-nodes-propertion", "str", + NULL, + host_memory_backend_set_propertion, + NULL, NULL); + object_class_property_set_description(oc, "host-nodes-propertion", + "Mark the memory bind to host node by propertion"); +#endif object_class_property_set_description(oc, "host-nodes", "Binds memory to the list of NUMA host nodes"); object_class_property_add_enum(oc, "policy", "HostMemPolicy", -- Gitee