Skip to content

Commit

Permalink
Decoupling memory-backend and numa/hugepage for default memory backend
Browse files Browse the repository at this point in the history
Memory: decoupling memory-backend and numa/hugepage for the default
memory backend

Signed-off-by: Boqiao Fu <[email protected]>
  • Loading branch information
fbq815 committed Apr 18, 2023
1 parent 6dbcb4b commit f2da584
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion virttest/qemu_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1053,8 +1053,12 @@ def add_memorys(devices, params):
name = output[0]
backend_options = {}
backend_options["size_mem"] = "%sM" % params["mem"]
if params.get("vm_mem_backend"):
mem_backend = params.get("vm_mem_backend")
if mem_backend:
backend_options["backend_mem"] = params.get("vm_mem_backend")
if not params.get("mem-path_mem") and mem_backend == \
"memory-backend-file":
LOG.error("expect mem-path for %s", mem_backend)
if params.get("hugepage_path"):
backend_options["backend_mem"] = "memory-backend-file"
backend_options["mem-path_mem"] = params["hugepage_path"]
Expand Down

0 comments on commit f2da584

Please sign in to comment.