Skip to content

Commit

Permalink
Merge pull request #5886 from smitterl/cpu_top
Browse files Browse the repository at this point in the history
capabilities: don't check cluster_id on s390x
  • Loading branch information
chunfuwen authored Sep 11, 2024
2 parents 1083f23 + 17bd4ce commit 029f201
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libvirt/tests/src/virsh_cmd/host/virsh_capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def _compare_value(cmd, value_in_capxml, key_in_cpu):
current_arch = platform.machine()
is_x8664 = True if current_arch == "x86_64" else False
is_aarch64 = True if current_arch == "aarch64" else False
is_s390x = True if current_arch == "s390x" else False
prefix_cmd = "cat /sys/devices/system/cpu/cpu%s/topology/%s"
file_name_key_mapping = {"physical_package_id": "socket_id",
"cluster_id": "cluster_id",
Expand All @@ -82,6 +83,8 @@ def _compare_value(cmd, value_in_capxml, key_in_cpu):
file_name_key_mapping.update({"die_id": "die_id"})
if is_aarch64 or is_x8664:
file_name_key_mapping.update({"cluster_id": "cluster_id"})
if is_s390x:
del file_name_key_mapping["cluster_id"]
for a_cell in cell_list:
cpu_list = a_cell.cpu
for a_cpu in cpu_list:
Expand Down

0 comments on commit 029f201

Please sign in to comment.