Skip to content

Commit

Permalink
Merge pull request autotest#5463 from dzhengfy/fix_model_on_arm
Browse files Browse the repository at this point in the history
libvirt_mem: fix cpu mode on arm
  • Loading branch information
chunfuwen authored Feb 27, 2024
2 parents d0636be + 0c19569 commit 6b8c599
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion libvirt/tests/cfg/libvirt_mem.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
host_known_unplug_errors = "'Memory unplug already in progress for device'"
vcpu = 4
wait_before_save_secs = 0
cpu_mode = "host-model"
aarch64:
cpu_mode = "host-passthrough"
pseries:
wait_before_save_secs = 10
variants:
Expand Down Expand Up @@ -99,7 +102,6 @@
max_mem = "2609152"
current_mem = "2609152"
numa_cells = "{'id':'0','cpus':'0-1','memory':'1048576','unit':'KiB'} {'id':'1','cpus':'2-3','memory':'1048576','unit':'KiB'}"
cpu_mode = "host-model"
model_fallback = "forbid"
tg_size = 524288
tg_node = 0
Expand Down
4 changes: 2 additions & 2 deletions libvirt/tests/src/libvirt_mem.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ def modify_domain_xml():
align_to_value))
cells[cell]["memory"] = memory_value
cpu_xml = vm_xml.VMCPUXML()
cpu_xml.xml = "<cpu mode='host-model'><numa/></cpu>"
cpu_mode = params.get("cpu_mode")
cpu_mode = params.get("cpu_mode", "host-model")
cpu_xml.xml = "<cpu mode='%s'><numa/></cpu>" % cpu_mode
model_fallback = params.get("model_fallback")
if cpu_mode:
cpu_xml.mode = cpu_mode
Expand Down

0 comments on commit 6b8c599

Please sign in to comment.