From nobody Fri May 3 05:36:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1513254861412524.187660055113; Thu, 14 Dec 2017 04:34:21 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CE83261B8C; Thu, 14 Dec 2017 12:34:19 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ABF537EF61; Thu, 14 Dec 2017 12:34:19 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 74D9B4A46A; Thu, 14 Dec 2017 12:34:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBECYExh011118 for ; Thu, 14 Dec 2017 07:34:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id BA94C6061E; Thu, 14 Dec 2017 12:34:14 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-182.brq.redhat.com [10.40.204.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B33236F985 for ; Thu, 14 Dec 2017 12:34:11 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 14 Dec 2017 13:33:57 +0100 Message-Id: <20171214123401.28950-2-abologna@redhat.com> In-Reply-To: <20171214123401.28950-1-abologna@redhat.com> References: <20171214123401.28950-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 1/5] tests: Add host CPU data for Moonshot (RHEL 7.4) X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 14 Dec 2017 12:34:20 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- .../linux-aarch64-rhel74-moonshot.cpuinfo | 72 ++++++++++++++++++= ++++ .../linux-aarch64-rhel74-moonshot.expected | 1 + .../linux-rhel74-moonshot/cpu/cpu0/node0 | 1 + .../linux-rhel74-moonshot/cpu/cpu0/online | 1 + .../cpu/cpu0/topology/core_id | 1 + .../cpu/cpu0/topology/core_siblings | 1 + .../cpu/cpu0/topology/core_siblings_list | 1 + .../cpu/cpu0/topology/physical_package_id | 1 + .../cpu/cpu0/topology/thread_siblings | 1 + .../cpu/cpu0/topology/thread_siblings_list | 1 + .../linux-rhel74-moonshot/cpu/cpu1/node0 | 1 + .../linux-rhel74-moonshot/cpu/cpu1/online | 1 + .../cpu/cpu1/topology/core_id | 1 + .../cpu/cpu1/topology/core_siblings | 1 + .../cpu/cpu1/topology/core_siblings_list | 1 + .../cpu/cpu1/topology/physical_package_id | 1 + .../cpu/cpu1/topology/thread_siblings | 1 + .../cpu/cpu1/topology/thread_siblings_list | 1 + .../linux-rhel74-moonshot/cpu/cpu2/node0 | 1 + .../linux-rhel74-moonshot/cpu/cpu2/online | 1 + .../cpu/cpu2/topology/core_id | 1 + .../cpu/cpu2/topology/core_siblings | 1 + .../cpu/cpu2/topology/core_siblings_list | 1 + .../cpu/cpu2/topology/physical_package_id | 1 + .../cpu/cpu2/topology/thread_siblings | 1 + .../cpu/cpu2/topology/thread_siblings_list | 1 + .../linux-rhel74-moonshot/cpu/cpu3/node0 | 1 + .../linux-rhel74-moonshot/cpu/cpu3/online | 1 + .../cpu/cpu3/topology/core_id | 1 + .../cpu/cpu3/topology/core_siblings | 1 + .../cpu/cpu3/topology/core_siblings_list | 1 + .../cpu/cpu3/topology/physical_package_id | 1 + .../cpu/cpu3/topology/thread_siblings | 1 + .../cpu/cpu3/topology/thread_siblings_list | 1 + .../linux-rhel74-moonshot/cpu/cpu4/node0 | 1 + .../linux-rhel74-moonshot/cpu/cpu4/online | 1 + .../cpu/cpu4/topology/core_id | 1 + .../cpu/cpu4/topology/core_siblings | 1 + .../cpu/cpu4/topology/core_siblings_list | 1 + .../cpu/cpu4/topology/physical_package_id | 1 + .../cpu/cpu4/topology/thread_siblings | 1 + .../cpu/cpu4/topology/thread_siblings_list | 1 + .../linux-rhel74-moonshot/cpu/cpu5/node0 | 1 + .../linux-rhel74-moonshot/cpu/cpu5/online | 1 + .../cpu/cpu5/topology/core_id | 1 + .../cpu/cpu5/topology/core_siblings | 1 + .../cpu/cpu5/topology/core_siblings_list | 1 + .../cpu/cpu5/topology/physical_package_id | 1 + .../cpu/cpu5/topology/thread_siblings | 1 + .../cpu/cpu5/topology/thread_siblings_list | 1 + .../linux-rhel74-moonshot/cpu/cpu6/node0 | 1 + .../linux-rhel74-moonshot/cpu/cpu6/online | 1 + .../cpu/cpu6/topology/core_id | 1 + .../cpu/cpu6/topology/core_siblings | 1 + .../cpu/cpu6/topology/core_siblings_list | 1 + .../cpu/cpu6/topology/physical_package_id | 1 + .../cpu/cpu6/topology/thread_siblings | 1 + .../cpu/cpu6/topology/thread_siblings_list | 1 + .../linux-rhel74-moonshot/cpu/cpu7/node0 | 1 + .../linux-rhel74-moonshot/cpu/cpu7/online | 1 + .../cpu/cpu7/topology/core_id | 1 + .../cpu/cpu7/topology/core_siblings | 1 + .../cpu/cpu7/topology/core_siblings_list | 1 + .../cpu/cpu7/topology/physical_package_id | 1 + .../cpu/cpu7/topology/thread_siblings | 1 + .../cpu/cpu7/topology/thread_siblings_list | 1 + .../linux-rhel74-moonshot/cpu/kernel_max | 1 + .../linux-rhel74-moonshot/cpu/offline | 1 + .../linux-rhel74-moonshot/cpu/online | 1 + .../linux-rhel74-moonshot/cpu/possible | 1 + .../linux-rhel74-moonshot/cpu/present | 1 + .../linux-rhel74-moonshot/node/has_cpu | 1 + .../linux-rhel74-moonshot/node/has_memory | 1 + .../linux-rhel74-moonshot/node/has_normal_memory | 1 + .../linux-rhel74-moonshot/node/node0/cpu0 | 1 + .../linux-rhel74-moonshot/node/node0/cpu1 | 1 + .../linux-rhel74-moonshot/node/node0/cpu2 | 1 + .../linux-rhel74-moonshot/node/node0/cpu3 | 1 + .../linux-rhel74-moonshot/node/node0/cpu4 | 1 + .../linux-rhel74-moonshot/node/node0/cpu5 | 1 + .../linux-rhel74-moonshot/node/node0/cpu6 | 1 + .../linux-rhel74-moonshot/node/node0/cpu7 | 1 + .../linux-rhel74-moonshot/node/node0/cpulist | 1 + .../linux-rhel74-moonshot/node/node0/cpumap | 1 + .../linux-rhel74-moonshot/node/online | 1 + .../linux-rhel74-moonshot/node/possible | 1 + tests/virhostcputest.c | 1 + 87 files changed, 158 insertions(+) create mode 100644 tests/virhostcpudata/linux-aarch64-rhel74-moonshot.cpui= nfo create mode 100644 tests/virhostcpudata/linux-aarch64-rhel74-moonshot.expe= cted create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/nod= e0 create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/onl= ine create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/top= ology/core_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/top= ology/core_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/top= ology/core_siblings_list create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/top= ology/physical_package_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/top= ology/thread_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/top= ology/thread_siblings_list create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/nod= e0 create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/onl= ine create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/top= ology/core_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/top= ology/core_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/top= ology/core_siblings_list create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/top= ology/physical_package_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/top= ology/thread_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/top= ology/thread_siblings_list create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/nod= e0 create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/onl= ine create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/top= ology/core_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/top= ology/core_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/top= ology/core_siblings_list create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/top= ology/physical_package_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/top= ology/thread_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/top= ology/thread_siblings_list create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/nod= e0 create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/onl= ine create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/top= ology/core_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/top= ology/core_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/top= ology/core_siblings_list create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/top= ology/physical_package_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/top= ology/thread_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/top= ology/thread_siblings_list create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/nod= e0 create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/onl= ine create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/top= ology/core_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/top= ology/core_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/top= ology/core_siblings_list create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/top= ology/physical_package_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/top= ology/thread_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/top= ology/thread_siblings_list create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/nod= e0 create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/onl= ine create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/top= ology/core_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/top= ology/core_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/top= ology/core_siblings_list create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/top= ology/physical_package_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/top= ology/thread_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/top= ology/thread_siblings_list create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/nod= e0 create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/onl= ine create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/top= ology/core_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/top= ology/core_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/top= ology/core_siblings_list create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/top= ology/physical_package_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/top= ology/thread_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/top= ology/thread_siblings_list create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/nod= e0 create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/onl= ine create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/top= ology/core_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/top= ology/core_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/top= ology/core_siblings_list create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/top= ology/physical_package_id create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/top= ology/thread_siblings create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/top= ology/thread_siblings_list create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/kernel_m= ax create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/offline create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/online create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/possible create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/cpu/present create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/node/has_cpu create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/node/has_mem= ory create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/node/has_nor= mal_memory create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/node/node0/c= pu0 create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/node/node0/c= pu1 create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/node/node0/c= pu2 create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/node/node0/c= pu3 create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/node/node0/c= pu4 create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/node/node0/c= pu5 create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/node/node0/c= pu6 create mode 120000 tests/virhostcpudata/linux-rhel74-moonshot/node/node0/c= pu7 create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/node/node0/c= pulist create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/node/node0/c= pumap create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/node/online create mode 100644 tests/virhostcpudata/linux-rhel74-moonshot/node/possible diff --git a/tests/virhostcpudata/linux-aarch64-rhel74-moonshot.cpuinfo b/t= ests/virhostcpudata/linux-aarch64-rhel74-moonshot.cpuinfo new file mode 100644 index 000000000..ae528bf61 --- /dev/null +++ b/tests/virhostcpudata/linux-aarch64-rhel74-moonshot.cpuinfo @@ -0,0 +1,72 @@ +processor : 0 +BogoMIPS : 100.00 +Features : fp asimd evtstrm cpuid +CPU implementer : 0x50 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0x000 +CPU revision : 1 + +processor : 1 +BogoMIPS : 100.00 +Features : fp asimd evtstrm cpuid +CPU implementer : 0x50 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0x000 +CPU revision : 1 + +processor : 2 +BogoMIPS : 100.00 +Features : fp asimd evtstrm cpuid +CPU implementer : 0x50 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0x000 +CPU revision : 1 + +processor : 3 +BogoMIPS : 100.00 +Features : fp asimd evtstrm cpuid +CPU implementer : 0x50 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0x000 +CPU revision : 1 + +processor : 4 +BogoMIPS : 100.00 +Features : fp asimd evtstrm cpuid +CPU implementer : 0x50 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0x000 +CPU revision : 1 + +processor : 5 +BogoMIPS : 100.00 +Features : fp asimd evtstrm cpuid +CPU implementer : 0x50 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0x000 +CPU revision : 1 + +processor : 6 +BogoMIPS : 100.00 +Features : fp asimd evtstrm cpuid +CPU implementer : 0x50 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0x000 +CPU revision : 1 + +processor : 7 +BogoMIPS : 100.00 +Features : fp asimd evtstrm cpuid +CPU implementer : 0x50 +CPU architecture: 8 +CPU variant : 0x0 +CPU part : 0x000 +CPU revision : 1 + diff --git a/tests/virhostcpudata/linux-aarch64-rhel74-moonshot.expected b/= tests/virhostcpudata/linux-aarch64-rhel74-moonshot.expected new file mode 100644 index 000000000..24ff0ea0b --- /dev/null +++ b/tests/virhostcpudata/linux-aarch64-rhel74-moonshot.expected @@ -0,0 +1 @@ +CPUs: 8/8, MHz: 100, Nodes: 1, Sockets: 1, Cores: 8, Threads: 1 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/node0 b/te= sts/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/node0 new file mode 120000 index 000000000..222b6af32 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/node0 @@ -0,0 +1 @@ +../../node/node0 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/online b/t= ests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/online new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/online @@ -0,0 +1 @@ +1 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology/c= ore_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology/core_= id new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology/core_id @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology/c= ore_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology= /core_siblings new file mode 100644 index 000000000..fcd15acf9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology/core_sib= lings @@ -0,0 +1 @@ +ff diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology/c= ore_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/top= ology/core_siblings_list new file mode 100644 index 000000000..74fc2fb6b --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology/core_sib= lings_list @@ -0,0 +1 @@ +0-7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology/p= hysical_package_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/to= pology/physical_package_id new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology/physical= _package_id @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology/t= hread_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topolo= gy/thread_siblings new file mode 100644 index 000000000..8a0f05e16 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology/thread_s= iblings @@ -0,0 +1 @@ +01 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology/t= hread_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/t= opology/thread_siblings_list new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu0/topology/thread_s= iblings_list @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/node0 b/te= sts/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/node0 new file mode 120000 index 000000000..222b6af32 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/node0 @@ -0,0 +1 @@ +../../node/node0 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/online b/t= ests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/online new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/online @@ -0,0 +1 @@ +1 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology/c= ore_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology/core_= id new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology/core_id @@ -0,0 +1 @@ +1 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology/c= ore_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology= /core_siblings new file mode 100644 index 000000000..fcd15acf9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology/core_sib= lings @@ -0,0 +1 @@ +ff diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology/c= ore_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/top= ology/core_siblings_list new file mode 100644 index 000000000..74fc2fb6b --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology/core_sib= lings_list @@ -0,0 +1 @@ +0-7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology/p= hysical_package_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/to= pology/physical_package_id new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology/physical= _package_id @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology/t= hread_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topolo= gy/thread_siblings new file mode 100644 index 000000000..9e22bcb8e --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology/thread_s= iblings @@ -0,0 +1 @@ +02 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology/t= hread_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/t= opology/thread_siblings_list new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu1/topology/thread_s= iblings_list @@ -0,0 +1 @@ +1 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/node0 b/te= sts/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/node0 new file mode 120000 index 000000000..222b6af32 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/node0 @@ -0,0 +1 @@ +../../node/node0 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/online b/t= ests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/online new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/online @@ -0,0 +1 @@ +1 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology/c= ore_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology/core_= id new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology/core_id @@ -0,0 +1 @@ +2 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology/c= ore_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology= /core_siblings new file mode 100644 index 000000000..fcd15acf9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology/core_sib= lings @@ -0,0 +1 @@ +ff diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology/c= ore_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/top= ology/core_siblings_list new file mode 100644 index 000000000..74fc2fb6b --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology/core_sib= lings_list @@ -0,0 +1 @@ +0-7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology/p= hysical_package_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/to= pology/physical_package_id new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology/physical= _package_id @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology/t= hread_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topolo= gy/thread_siblings new file mode 100644 index 000000000..64969239d --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology/thread_s= iblings @@ -0,0 +1 @@ +04 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology/t= hread_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/t= opology/thread_siblings_list new file mode 100644 index 000000000..0cfbf0888 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu2/topology/thread_s= iblings_list @@ -0,0 +1 @@ +2 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/node0 b/te= sts/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/node0 new file mode 120000 index 000000000..222b6af32 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/node0 @@ -0,0 +1 @@ +../../node/node0 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/online b/t= ests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/online new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/online @@ -0,0 +1 @@ +1 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology/c= ore_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology/core_= id new file mode 100644 index 000000000..00750edc0 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology/core_id @@ -0,0 +1 @@ +3 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology/c= ore_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology= /core_siblings new file mode 100644 index 000000000..fcd15acf9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology/core_sib= lings @@ -0,0 +1 @@ +ff diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology/c= ore_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/top= ology/core_siblings_list new file mode 100644 index 000000000..74fc2fb6b --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology/core_sib= lings_list @@ -0,0 +1 @@ +0-7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology/p= hysical_package_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/to= pology/physical_package_id new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology/physical= _package_id @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology/t= hread_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topolo= gy/thread_siblings new file mode 100644 index 000000000..adb9de8ee --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology/thread_s= iblings @@ -0,0 +1 @@ +08 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology/t= hread_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/t= opology/thread_siblings_list new file mode 100644 index 000000000..00750edc0 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu3/topology/thread_s= iblings_list @@ -0,0 +1 @@ +3 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/node0 b/te= sts/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/node0 new file mode 120000 index 000000000..222b6af32 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/node0 @@ -0,0 +1 @@ +../../node/node0 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/online b/t= ests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/online new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/online @@ -0,0 +1 @@ +1 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology/c= ore_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology/core_= id new file mode 100644 index 000000000..b8626c4cf --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology/core_id @@ -0,0 +1 @@ +4 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology/c= ore_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology= /core_siblings new file mode 100644 index 000000000..fcd15acf9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology/core_sib= lings @@ -0,0 +1 @@ +ff diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology/c= ore_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/top= ology/core_siblings_list new file mode 100644 index 000000000..74fc2fb6b --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology/core_sib= lings_list @@ -0,0 +1 @@ +0-7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology/p= hysical_package_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/to= pology/physical_package_id new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology/physical= _package_id @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology/t= hread_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topolo= gy/thread_siblings new file mode 100644 index 000000000..f599e28b8 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology/thread_s= iblings @@ -0,0 +1 @@ +10 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology/t= hread_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/t= opology/thread_siblings_list new file mode 100644 index 000000000..b8626c4cf --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu4/topology/thread_s= iblings_list @@ -0,0 +1 @@ +4 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/node0 b/te= sts/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/node0 new file mode 120000 index 000000000..222b6af32 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/node0 @@ -0,0 +1 @@ +../../node/node0 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/online b/t= ests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/online new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/online @@ -0,0 +1 @@ +1 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology/c= ore_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology/core_= id new file mode 100644 index 000000000..7ed6ff82d --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology/core_id @@ -0,0 +1 @@ +5 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology/c= ore_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology= /core_siblings new file mode 100644 index 000000000..fcd15acf9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology/core_sib= lings @@ -0,0 +1 @@ +ff diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology/c= ore_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/top= ology/core_siblings_list new file mode 100644 index 000000000..74fc2fb6b --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology/core_sib= lings_list @@ -0,0 +1 @@ +0-7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology/p= hysical_package_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/to= pology/physical_package_id new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology/physical= _package_id @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology/t= hread_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topolo= gy/thread_siblings new file mode 100644 index 000000000..209e3ef4b --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology/thread_s= iblings @@ -0,0 +1 @@ +20 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology/t= hread_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/t= opology/thread_siblings_list new file mode 100644 index 000000000..7ed6ff82d --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu5/topology/thread_s= iblings_list @@ -0,0 +1 @@ +5 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/node0 b/te= sts/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/node0 new file mode 120000 index 000000000..222b6af32 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/node0 @@ -0,0 +1 @@ +../../node/node0 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/online b/t= ests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/online new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/online @@ -0,0 +1 @@ +1 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology/c= ore_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology/core_= id new file mode 100644 index 000000000..1e8b31496 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology/core_id @@ -0,0 +1 @@ +6 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology/c= ore_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology= /core_siblings new file mode 100644 index 000000000..fcd15acf9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology/core_sib= lings @@ -0,0 +1 @@ +ff diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology/c= ore_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/top= ology/core_siblings_list new file mode 100644 index 000000000..74fc2fb6b --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology/core_sib= lings_list @@ -0,0 +1 @@ +0-7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology/p= hysical_package_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/to= pology/physical_package_id new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology/physical= _package_id @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology/t= hread_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topolo= gy/thread_siblings new file mode 100644 index 000000000..425151f3a --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology/thread_s= iblings @@ -0,0 +1 @@ +40 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology/t= hread_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/t= opology/thread_siblings_list new file mode 100644 index 000000000..1e8b31496 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu6/topology/thread_s= iblings_list @@ -0,0 +1 @@ +6 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/node0 b/te= sts/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/node0 new file mode 120000 index 000000000..222b6af32 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/node0 @@ -0,0 +1 @@ +../../node/node0 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/online b/t= ests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/online new file mode 100644 index 000000000..d00491fd7 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/online @@ -0,0 +1 @@ +1 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology/c= ore_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology/core_= id new file mode 100644 index 000000000..7f8f011eb --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology/core_id @@ -0,0 +1 @@ +7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology/c= ore_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology= /core_siblings new file mode 100644 index 000000000..fcd15acf9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology/core_sib= lings @@ -0,0 +1 @@ +ff diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology/c= ore_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/top= ology/core_siblings_list new file mode 100644 index 000000000..74fc2fb6b --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology/core_sib= lings_list @@ -0,0 +1 @@ +0-7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology/p= hysical_package_id b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/to= pology/physical_package_id new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology/physical= _package_id @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology/t= hread_siblings b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topolo= gy/thread_siblings new file mode 100644 index 000000000..d15a2cc44 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology/thread_s= iblings @@ -0,0 +1 @@ +80 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology/t= hread_siblings_list b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/t= opology/thread_siblings_list new file mode 100644 index 000000000..7f8f011eb --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/cpu7/topology/thread_s= iblings_list @@ -0,0 +1 @@ +7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/kernel_max b/te= sts/virhostcpudata/linux-rhel74-moonshot/cpu/kernel_max new file mode 100644 index 000000000..50b0f7906 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/kernel_max @@ -0,0 +1 @@ +4095 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/offline b/tests= /virhostcpudata/linux-rhel74-moonshot/cpu/offline new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/offline @@ -0,0 +1 @@ + diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/online b/tests/= virhostcpudata/linux-rhel74-moonshot/cpu/online new file mode 100644 index 000000000..74fc2fb6b --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/online @@ -0,0 +1 @@ +0-7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/possible b/test= s/virhostcpudata/linux-rhel74-moonshot/cpu/possible new file mode 100644 index 000000000..74fc2fb6b --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/possible @@ -0,0 +1 @@ +0-7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/cpu/present b/tests= /virhostcpudata/linux-rhel74-moonshot/cpu/present new file mode 100644 index 000000000..74fc2fb6b --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/cpu/present @@ -0,0 +1 @@ +0-7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/has_cpu b/test= s/virhostcpudata/linux-rhel74-moonshot/node/has_cpu new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/has_cpu @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/has_memory b/t= ests/virhostcpudata/linux-rhel74-moonshot/node/has_memory new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/has_memory @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/has_normal_mem= ory b/tests/virhostcpudata/linux-rhel74-moonshot/node/has_normal_memory new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/has_normal_memory @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu0 b/t= ests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu0 new file mode 120000 index 000000000..c841bea28 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu0 @@ -0,0 +1 @@ +../../cpu/cpu0 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu1 b/t= ests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu1 new file mode 120000 index 000000000..5f4536279 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu1 @@ -0,0 +1 @@ +../../cpu/cpu1 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu2 b/t= ests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu2 new file mode 120000 index 000000000..2dcca332c --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu2 @@ -0,0 +1 @@ +../../cpu/cpu2 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu3 b/t= ests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu3 new file mode 120000 index 000000000..c7690e5aa --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu3 @@ -0,0 +1 @@ +../../cpu/cpu3 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu4 b/t= ests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu4 new file mode 120000 index 000000000..9e77a64eb --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu4 @@ -0,0 +1 @@ +../../cpu/cpu4 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu5 b/t= ests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu5 new file mode 120000 index 000000000..cc07c3b97 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu5 @@ -0,0 +1 @@ +../../cpu/cpu5 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu6 b/t= ests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu6 new file mode 120000 index 000000000..2e7576354 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu6 @@ -0,0 +1 @@ +../../cpu/cpu6 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu7 b/t= ests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu7 new file mode 120000 index 000000000..09e3f79b4 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpu7 @@ -0,0 +1 @@ +../../cpu/cpu7 \ No newline at end of file diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpulist = b/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpulist new file mode 100644 index 000000000..74fc2fb6b --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpulist @@ -0,0 +1 @@ +0-7 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpumap b= /tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpumap new file mode 100644 index 000000000..fcd15acf9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/node0/cpumap @@ -0,0 +1 @@ +ff diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/online b/tests= /virhostcpudata/linux-rhel74-moonshot/node/online new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/online @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcpudata/linux-rhel74-moonshot/node/possible b/tes= ts/virhostcpudata/linux-rhel74-moonshot/node/possible new file mode 100644 index 000000000..573541ac9 --- /dev/null +++ b/tests/virhostcpudata/linux-rhel74-moonshot/node/possible @@ -0,0 +1 @@ +0 diff --git a/tests/virhostcputest.c b/tests/virhostcputest.c index d1208c373..d3ee18461 100644 --- a/tests/virhostcputest.c +++ b/tests/virhostcputest.c @@ -239,6 +239,7 @@ mymain(void) {"raspberrypi", VIR_ARCH_ARMV6L}, {"f21-mustang", VIR_ARCH_AARCH64}, {"rhelsa-3.19.0-mustang", VIR_ARCH_AARCH64}, + {"rhel74-moonshot", VIR_ARCH_AARCH64}, {"deconf-cpus", VIR_ARCH_PPC64}, /* subcores, default configuration */ {"subcores1", VIR_ARCH_PPC64}, --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 05:36:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1513254864318967.0128487790379; Thu, 14 Dec 2017 04:34:24 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A68617EA88; Thu, 14 Dec 2017 12:34:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7F5FA17D7B; Thu, 14 Dec 2017 12:34:22 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 423E01801213; Thu, 14 Dec 2017 12:34:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBECYHue011129 for ; Thu, 14 Dec 2017 07:34:18 -0500 Received: by smtp.corp.redhat.com (Postfix) id EF9897D906; Thu, 14 Dec 2017 12:34:17 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-182.brq.redhat.com [10.40.204.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3EE906061E for ; Thu, 14 Dec 2017 12:34:14 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 14 Dec 2017 13:33:58 +0100 Message-Id: <20171214123401.28950-3-abologna@redhat.com> In-Reply-To: <20171214123401.28950-1-abologna@redhat.com> References: <20171214123401.28950-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 2/5] util: virhostcpu: factor out frequency parsing X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 14 Dec 2017 12:34:23 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Bjoern Walk All different architectures use the same copy-pasted code to parse processor frequency information from /proc/cpuinfo. Let's extract that code into a function to avoid repetition. We now also tolerate if the parsing of /proc/cpuinfo is not successful and just report a warning instead of bailing out and abandoning the rest of the CPU information. Reviewed-by: Marc Hartmayer Reviewed-by: Boris Fiuczynski Reviewed-by: Andrea Bolognani Signed-off-by: Bjoern Walk Reviewed-by: John Ferlan --- src/util/virhostcpu.c | 141 ++++++++++++++++++++++------------------------= ---- 1 file changed, 62 insertions(+), 79 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index c485a9721..d47062013 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -508,6 +508,65 @@ virHostCPUHasValidSubcoreConfiguration(int threads_per= _subcore) return ret; } =20 +static int +virHostCPUParseFrequencyString(const char *str, + const char *prefix, + unsigned int *mhz) +{ + char *p; + unsigned int ui; + + if (!STRPREFIX(str, prefix)) + return 1; + + str +=3D strlen(prefix); + + while (*str && c_isspace(*str)) + str++; + + if (*str !=3D ':' || !str[1]) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("parsing cpu MHz from cpuinfo")); + return -1; + } + + if (virStrToLong_ui(str + 1, &p, 10, &ui) =3D=3D 0 && + /* Accept trailing fractional part. */ + (*p =3D=3D '\0' || *p =3D=3D '.' || c_isspace(*p))) + *mhz =3D ui; + + return 0; +} + +static int +virHostCPUParseFrequency(FILE *cpuinfo, + virArch arch, + unsigned int *mhz) +{ + const char *prefix =3D NULL; + char line[1024]; + + if (ARCH_IS_X86(arch)) + prefix =3D "cpu MHz"; + else if (ARCH_IS_PPC(arch)) + prefix =3D "clock"; + else if (ARCH_IS_ARM(arch)) + prefix =3D "BogoMIPS"; + + if (!prefix) { + VIR_WARN("Your architecture is not supported by the %s parser", + CPUINFO_PATH); + return 1; + } + + while (fgets(line, sizeof(line), cpuinfo) !=3D NULL) { + if (virHostCPUParseFrequencyString(line, prefix, mhz) < 0) + return -1; + } + + return 0; +} + int virHostCPUGetInfoPopulateLinux(FILE *cpuinfo, virArch arch, @@ -520,7 +579,6 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo, { virBitmapPtr present_cpus_map =3D NULL; virBitmapPtr online_cpus_map =3D NULL; - char line[1024]; DIR *nodedir =3D NULL; struct dirent *nodedirent =3D NULL; int nodecpus, nodecores, nodesockets, nodethreads, offline =3D 0; @@ -535,84 +593,9 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo, *cpus =3D *nodes =3D *sockets =3D *cores =3D *threads =3D 0; =20 /* Start with parsing CPU clock speed from /proc/cpuinfo */ - while (fgets(line, sizeof(line), cpuinfo) !=3D NULL) { - if (ARCH_IS_X86(arch)) { - char *buf =3D line; - if (STRPREFIX(buf, "cpu MHz")) { - char *p; - unsigned int ui; - - buf +=3D 7; - while (*buf && c_isspace(*buf)) - buf++; - - if (*buf !=3D ':' || !buf[1]) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("parsing cpu MHz from cpuinfo")); - goto cleanup; - } - - if (virStrToLong_ui(buf+1, &p, 10, &ui) =3D=3D 0 && - /* Accept trailing fractional part. */ - (*p =3D=3D '\0' || *p =3D=3D '.' || c_isspace(*p))) - *mhz =3D ui; - } - } else if (ARCH_IS_PPC(arch)) { - char *buf =3D line; - if (STRPREFIX(buf, "clock")) { - char *p; - unsigned int ui; - - buf +=3D 5; - while (*buf && c_isspace(*buf)) - buf++; - - if (*buf !=3D ':' || !buf[1]) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("parsing cpu MHz from cpuinfo")); - goto cleanup; - } - - if (virStrToLong_ui(buf+1, &p, 10, &ui) =3D=3D 0 && - /* Accept trailing fractional part. */ - (*p =3D=3D '\0' || *p =3D=3D '.' || c_isspace(*p))) - *mhz =3D ui; - /* No other interesting infos are available in /proc/cpuin= fo. - * However, there is a line identifying processor's versio= n, - * identification and machine, but we don't want it to be = caught - * and parsed in next iteration, because it is not in expe= cted - * format and thus lead to error. */ - } - } else if (ARCH_IS_ARM(arch)) { - char *buf =3D line; - if (STRPREFIX(buf, "BogoMIPS")) { - char *p; - unsigned int ui; - - buf +=3D 8; - while (*buf && c_isspace(*buf)) - buf++; - - if (*buf !=3D ':' || !buf[1]) { - virReportError(VIR_ERR_INTERNAL_ERROR, - "%s", _("parsing cpu MHz from cpuinfo")= ); - goto cleanup; - } - - if (virStrToLong_ui(buf+1, &p, 10, &ui) =3D=3D 0 - /* Accept trailing fractional part. */ - && (*p =3D=3D '\0' || *p =3D=3D '.' || c_isspace(*p))) - *mhz =3D ui; - } - } else if (ARCH_IS_S390(arch)) { - /* s390x has no realistic value for CPU speed, - * assign a value of zero to signify this */ - *mhz =3D 0; - } else { - VIR_WARN("Parser for /proc/cpuinfo needs to be adapted for you= r architecture"); - break; - } - } + if (virHostCPUParseFrequency(cpuinfo, arch, mhz) < 0) + VIR_WARN("Unable to parse CPU frequency information from %s", + CPUINFO_PATH); =20 /* Get information about what CPUs are present in the host and what * CPUs are online, so that we don't have to so for each node */ --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 05:36:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1513254863007295.6209726780461; Thu, 14 Dec 2017 04:34:23 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C47E261491; Thu, 14 Dec 2017 12:34:21 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 98E966061E; Thu, 14 Dec 2017 12:34:21 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 642FC3FCF9; Thu, 14 Dec 2017 12:34:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBECYKfv011139 for ; Thu, 14 Dec 2017 07:34:20 -0500 Received: by smtp.corp.redhat.com (Postfix) id 39D7960A9D; Thu, 14 Dec 2017 12:34:20 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-182.brq.redhat.com [10.40.204.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 90C206F982 for ; Thu, 14 Dec 2017 12:34:18 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 14 Dec 2017 13:33:59 +0100 Message-Id: <20171214123401.28950-4-abologna@redhat.com> In-Reply-To: <20171214123401.28950-1-abologna@redhat.com> References: <20171214123401.28950-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 3/5] util: Print architecture name in /proc/cpuinfo parser X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 14 Dec 2017 12:34:22 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Instead of a generic "your architecture", print the actual architecture name. Signed-off-by: Andrea Bolognani Reviewed-by: Bjoern Walk --- src/Makefile.am | 1 + src/util/virhostcpu.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Makefile.am b/src/Makefile.am index 4c022d1e4..166c9a8e9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2477,6 +2477,7 @@ noinst_LTLIBRARIES +=3D libvirt-setuid-rpc-client.la =20 libvirt_setuid_rpc_client_la_SOURCES =3D \ util/viralloc.c \ + util/virarch.c \ util/viratomic.c \ util/viratomic.h \ util/virbitmap.c \ diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index d47062013..3c20755eb 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -554,7 +554,8 @@ virHostCPUParseFrequency(FILE *cpuinfo, prefix =3D "BogoMIPS"; =20 if (!prefix) { - VIR_WARN("Your architecture is not supported by the %s parser", + VIR_WARN("%s is not supported by the %s parser", + virArchToString(arch), CPUINFO_PATH); return 1; } --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 05:36:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1513254865595922.075526753068; Thu, 14 Dec 2017 04:34:25 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 60BF0C074F14; Thu, 14 Dec 2017 12:34:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3B72860C9F; Thu, 14 Dec 2017 12:34:24 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 090FE3D3D4; Thu, 14 Dec 2017 12:34:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBECYMjC011150 for ; Thu, 14 Dec 2017 07:34:22 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8F2236061E; Thu, 14 Dec 2017 12:34:22 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-182.brq.redhat.com [10.40.204.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D6F6060A9D for ; Thu, 14 Dec 2017 12:34:20 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 14 Dec 2017 13:34:00 +0100 Message-Id: <20171214123401.28950-5-abologna@redhat.com> In-Reply-To: <20171214123401.28950-1-abologna@redhat.com> References: <20171214123401.28950-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 4/5] util: Improve CPU frequency parsing X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 14 Dec 2017 12:34:24 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Make the parser both more strict, by not ignoring errors reported by virStrToLong_ui(), and more permissive, by not failing due to unrelated fields which just happen to have a know prefix and accepting any amount of whitespace before the numeric value. Signed-off-by: Andrea Bolognani Reviewed-by: Bjoern Walk --- src/util/virhostcpu.c | 62 +++++++++++++++++++++= ---- tests/virhostcpudata/linux-x86_64-test1.cpuinfo | 4 ++ 2 files changed, 57 insertions(+), 9 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index 3c20755eb..9c9f362de 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -508,6 +508,27 @@ virHostCPUHasValidSubcoreConfiguration(int threads_per= _subcore) return ret; } =20 +/** + * virHostCPUParseFrequencyString: + * @str: string to be parsed + * @prefix: expected prefix + * @mhz: output location + * + * Parse a /proc/cpuinfo line and extract the CPU frequency, if present. + * + * The expected format of @str looks like + * + * cpu MHz : 2100.000 + * + * where @prefix ("cpu MHz" in the example), is architecture-dependent. + * + * The decimal part of the CPU frequency, as well as all whitespace, is + * ignored. + * + * Returns: 0 when the string has been parsed successfully and the CPU + * frequency has been stored in @mhz, >0 when the string has not + * been parsed but no error has occurred, <0 on failure. + */ static int virHostCPUParseFrequencyString(const char *str, const char *prefix, @@ -516,26 +537,49 @@ virHostCPUParseFrequencyString(const char *str, char *p; unsigned int ui; =20 + /* If the string doesn't start with the expected prefix, then + * we're not looking at the right string and we should move on */ if (!STRPREFIX(str, prefix)) return 1; =20 + /* Skip the prefix */ str +=3D strlen(prefix); =20 - while (*str && c_isspace(*str)) + /* Skip all whitespace */ + while (c_isspace(*str)) str++; + if (*str =3D=3D '\0') + goto error; =20 - if (*str !=3D ':' || !str[1]) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("parsing cpu MHz from cpuinfo")); - return -1; + /* Skip the colon. If anything but a colon is found, then we're + * not looking at the right string and we should move on */ + if (*str !=3D ':') + return 1; + str++; + + /* Skip all whitespace */ + while (c_isspace(*str)) + str++; + if (*str =3D=3D '\0') + goto error; + + /* Parse the frequency. We expect an unsigned value, optionally + * followed by a fractional part (which gets discarded) or some + * leading whitespace */ + if (virStrToLong_ui(str, &p, 10, &ui) < 0 || + (*p !=3D '.' && *p !=3D '\0' && !c_isspace(*p))) { + goto error; } =20 - if (virStrToLong_ui(str + 1, &p, 10, &ui) =3D=3D 0 && - /* Accept trailing fractional part. */ - (*p =3D=3D '\0' || *p =3D=3D '.' || c_isspace(*p))) - *mhz =3D ui; + *mhz =3D ui; =20 return 0; + + error: + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Missing or invalid CPU frequency in %s"), + CPUINFO_PATH); + return -1; } =20 static int diff --git a/tests/virhostcpudata/linux-x86_64-test1.cpuinfo b/tests/virhos= tcpudata/linux-x86_64-test1.cpuinfo index e88a48ff3..706b69a54 100644 --- a/tests/virhostcpudata/linux-x86_64-test1.cpuinfo +++ b/tests/virhostcpudata/linux-x86_64-test1.cpuinfo @@ -28,6 +28,10 @@ model : 4 model name : Intel(R) Xeon(TM) CPU 2.80GHz stepping : 8 cpu MHz : 2800.000 +# The following field is a made-up one, intended to make sure our cpuinfo +# parser deals correctly with the introduction of new fields that just so +# happen to share a prefix with the one used for CPU frequency +cpu MHz rounded up to GHz : 3000.000 cache size : 2048 KB physical id : 0 siblings : 2 --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri May 3 05:36:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1513254872653169.57508882403124; Thu, 14 Dec 2017 04:34:32 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7E57080B22; Thu, 14 Dec 2017 12:34:27 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 578A571910; Thu, 14 Dec 2017 12:34:27 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1650C1801214; Thu, 14 Dec 2017 12:34:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBECYPR1011160 for ; Thu, 14 Dec 2017 07:34:25 -0500 Received: by smtp.corp.redhat.com (Postfix) id 0AE0560A9D; Thu, 14 Dec 2017 12:34:25 +0000 (UTC) Received: from inaba.usersys.redhat.com (ovpn-204-182.brq.redhat.com [10.40.204.182]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3DB137D927 for ; Thu, 14 Dec 2017 12:34:22 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Thu, 14 Dec 2017 13:34:01 +0100 Message-Id: <20171214123401.28950-6-abologna@redhat.com> In-Reply-To: <20171214123401.28950-1-abologna@redhat.com> References: <20171214123401.28950-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 5/5] util: Don't report CPU frequency for ARM hosts X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 14 Dec 2017 12:34:28 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Some ARM platforms, such as the original Raspberry Pi, report the CPU frequency in the BogoMIPS field of /proc/cpuinfo, so libvirt parsed that field and returned it through its API. However, not only many more boards don't report any value there, but several - including ARMv8-based server hardware, and even the more recent Raspberry Pi 3 - use this field as originally intended: to report the BogoMIPS value instead of the CPU frequency. Since we have no way of detecting how the field is being used, it's better to report no information at all rather than something ludicrous like "your shiny 96-core aarch64 virtualization host's CPUs are running at a whopping 100 MHz". Signed-off-by: Andrea Bolognani Reviewed-by: John Ferlan --- src/util/virhostcpu.c | 6 ++++-- tests/virhostcpudata/linux-aarch64-rhel74-moonshot.expected | 2 +- tests/virhostcpudata/linux-armv6l-raspberrypi.expected | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index 9c9f362de..1c9ee5921 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -590,12 +590,14 @@ virHostCPUParseFrequency(FILE *cpuinfo, const char *prefix =3D NULL; char line[1024]; =20 + /* No sensible way to retrieve CPU frequency */ + if (ARCH_IS_ARM(arch)) + return 0; + if (ARCH_IS_X86(arch)) prefix =3D "cpu MHz"; else if (ARCH_IS_PPC(arch)) prefix =3D "clock"; - else if (ARCH_IS_ARM(arch)) - prefix =3D "BogoMIPS"; =20 if (!prefix) { VIR_WARN("%s is not supported by the %s parser", diff --git a/tests/virhostcpudata/linux-aarch64-rhel74-moonshot.expected b/= tests/virhostcpudata/linux-aarch64-rhel74-moonshot.expected index 24ff0ea0b..6776aa6c2 100644 --- a/tests/virhostcpudata/linux-aarch64-rhel74-moonshot.expected +++ b/tests/virhostcpudata/linux-aarch64-rhel74-moonshot.expected @@ -1 +1 @@ -CPUs: 8/8, MHz: 100, Nodes: 1, Sockets: 1, Cores: 8, Threads: 1 +CPUs: 8/8, MHz: 0, Nodes: 1, Sockets: 1, Cores: 8, Threads: 1 diff --git a/tests/virhostcpudata/linux-armv6l-raspberrypi.expected b/tests= /virhostcpudata/linux-armv6l-raspberrypi.expected index 146bd073e..1c4c713d5 100644 --- a/tests/virhostcpudata/linux-armv6l-raspberrypi.expected +++ b/tests/virhostcpudata/linux-armv6l-raspberrypi.expected @@ -1 +1 @@ -CPUs: 1/1, MHz: 697, Nodes: 1, Sockets: 1, Cores: 1, Threads: 1 +CPUs: 1/1, MHz: 0, Nodes: 1, Sockets: 1, Cores: 1, Threads: 1 --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list