From nobody Thu May 2 12:51:14 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 1513010454300721.3677478915687; Mon, 11 Dec 2017 08:40:54 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 129094900F; Mon, 11 Dec 2017 16:40:52 +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 DCDBB46E87; Mon, 11 Dec 2017 16:40:51 +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 76BAA4A468; Mon, 11 Dec 2017 16:40:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBBGenPX002219 for ; Mon, 11 Dec 2017 11:40:49 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4CFB96046C; Mon, 11 Dec 2017 16:40:49 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.40.205.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C110660628 for ; Mon, 11 Dec 2017 16:40:47 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 11 Dec 2017 17:40:31 +0100 Message-Id: <20171211164036.12142-2-abologna@redhat.com> In-Reply-To: <20171211164036.12142-1-abologna@redhat.com> References: <20171211164036.12142-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/6] 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 11 Dec 2017 16:40:52 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Andrea Bolognani Reviewed-by: Bjoern Walk --- .../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 Thu May 2 12:51:14 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 1513010464414830.8850061477567; Mon, 11 Dec 2017 08:41:04 -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 A7AF7356D5; Mon, 11 Dec 2017 16:41:02 +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 6B7BA5C6D4; Mon, 11 Dec 2017 16:41:02 +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 2BC571800FC4; Mon, 11 Dec 2017 16:41:02 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBBGeoKp002226 for ; Mon, 11 Dec 2017 11:40:50 -0500 Received: by smtp.corp.redhat.com (Postfix) id D14396065E; Mon, 11 Dec 2017 16:40:50 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.40.205.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E175060628 for ; Mon, 11 Dec 2017 16:40:49 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 11 Dec 2017 17:40:32 +0100 Message-Id: <20171211164036.12142-3-abologna@redhat.com> In-Reply-To: <20171211164036.12142-1-abologna@redhat.com> References: <20171211164036.12142-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/6] util: Introduce virHostCPUGetInfoParseCPUInfo() 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.30]); Mon, 11 Dec 2017 16:41:03 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This handles only the /proc/cpuinfo part of virHostCPUGetInfo(). Signed-off-by: Andrea Bolognani Reviewed-by: Bjoern Walk --- src/util/virhostcpu.c | 60 +++++++++++++++++++++++++++++++++--------------= ---- 1 file changed, 39 insertions(+), 21 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index c485a9721..4d5c56659 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -508,33 +508,17 @@ virHostCPUHasValidSubcoreConfiguration(int threads_pe= r_subcore) return ret; } =20 -int -virHostCPUGetInfoPopulateLinux(FILE *cpuinfo, - virArch arch, - unsigned int *cpus, - unsigned int *mhz, - unsigned int *nodes, - unsigned int *sockets, - unsigned int *cores, - unsigned int *threads) + +static int +virHostCPUGetInfoParseCPUInfo(FILE *cpuinfo, + virArch arch, + unsigned int *mhz) { - 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; - int threads_per_subcore =3D 0; - unsigned int node; int ret =3D -1; - char *sysfs_nodedir =3D NULL; - char *sysfs_cpudir =3D NULL; - int direrr; =20 *mhz =3D 0; - *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; @@ -614,6 +598,40 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo, } } =20 + ret =3D 0; + + cleanup: + return ret; +} + +int +virHostCPUGetInfoPopulateLinux(FILE *cpuinfo, + virArch arch, + unsigned int *cpus, + unsigned int *mhz, + unsigned int *nodes, + unsigned int *sockets, + unsigned int *cores, + unsigned int *threads) +{ + virBitmapPtr present_cpus_map =3D NULL; + virBitmapPtr online_cpus_map =3D NULL; + DIR *nodedir =3D NULL; + struct dirent *nodedirent =3D NULL; + int nodecpus, nodecores, nodesockets, nodethreads, offline =3D 0; + int threads_per_subcore =3D 0; + unsigned int node; + int ret =3D -1; + char *sysfs_nodedir =3D NULL; + char *sysfs_cpudir =3D NULL; + int direrr; + + *cpus =3D *nodes =3D *sockets =3D *cores =3D *threads =3D 0; + + /* Start with parsing CPU clock speed from /proc/cpuinfo */ + if (virHostCPUGetInfoParseCPUInfo(cpuinfo, arch, mhz) < 0) + goto cleanup; + /* 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 */ present_cpus_map =3D virHostCPUGetPresentBitmap(); --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 12:51:14 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 1513010467623967.4363981844178; Mon, 11 Dec 2017 08:41:07 -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 A4EAB800A4; Mon, 11 Dec 2017 16:41:05 +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 7599C2D34D; Mon, 11 Dec 2017 16:41:05 +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 3A33C1801212; Mon, 11 Dec 2017 16:41:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBBGeq92002237 for ; Mon, 11 Dec 2017 11:40:52 -0500 Received: by smtp.corp.redhat.com (Postfix) id 658117C611; Mon, 11 Dec 2017 16:40:52 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.40.205.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7D386605E2 for ; Mon, 11 Dec 2017 16:40:51 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 11 Dec 2017 17:40:33 +0100 Message-Id: <20171211164036.12142-4-abologna@redhat.com> In-Reply-To: <20171211164036.12142-1-abologna@redhat.com> References: <20171211164036.12142-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/6] util: Introduce virHostCPUGetInfoParseCPUFrequency() 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.28]); Mon, 11 Dec 2017 16:41:06 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The algorithm used to extract the CPU frequency from /proc/cpuinfo is the same regardless of architecture, the only difference being the label used to identify the relevant field. Factor the parsing code out to a new helper and use it to implement virHostCPUGetInfoParseCPUInfo(), thus removing some duplication. Signed-off-by: Andrea Bolognani Reviewed-by: Bjoern Walk Reviewed-by: Boris Fiuczynski Reviewed-by: Marc Hartmayer --- src/util/virhostcpu.c | 105 +++++++++++++++++++---------------------------= ---- 1 file changed, 40 insertions(+), 65 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index 4d5c56659..85803d527 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -509,6 +509,40 @@ virHostCPUHasValidSubcoreConfiguration(int threads_per= _subcore) } =20 =20 +static int +virHostCPUGetInfoParseCPUFrequency(const char *buf, + const char *label, + unsigned int *mhz) +{ + int ret =3D -1; + + if (STRPREFIX(buf, label)) { + char *p; + unsigned int ui; + + buf +=3D strlen(label); + 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; + } + + ret =3D 0; + + cleanup: + return ret; +} + + static int virHostCPUGetInfoParseCPUInfo(FILE *cpuinfo, virArch arch, @@ -521,73 +555,14 @@ virHostCPUGetInfoParseCPUInfo(FILE *cpuinfo, =20 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; - } + if (virHostCPUGetInfoParseCPUFrequency(line, "cpu MHz", mhz) <= 0) + goto cleanup; } 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. */ - } + if (virHostCPUGetInfoParseCPUFrequency(line, "clock", mhz) < 0) + goto cleanup; } 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; - } + if (virHostCPUGetInfoParseCPUFrequency(line, "BogoMIPS", mhz) = < 0) + goto cleanup; } else if (ARCH_IS_S390(arch)) { /* s390x has no realistic value for CPU speed, * assign a value of zero to signify this */ --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 12:51:14 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 1513010464118785.1783192462602; Mon, 11 Dec 2017 08:41:04 -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 5CBFB85546; Mon, 11 Dec 2017 16:41:02 +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 385495E9CB; Mon, 11 Dec 2017 16:41:02 +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 EE7C51800C87; Mon, 11 Dec 2017 16:41:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBBGergv002247 for ; Mon, 11 Dec 2017 11:40:53 -0500 Received: by smtp.corp.redhat.com (Postfix) id A30EA60628; Mon, 11 Dec 2017 16:40:53 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.40.205.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DCD61605E2 for ; Mon, 11 Dec 2017 16:40:52 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 11 Dec 2017 17:40:34 +0100 Message-Id: <20171211164036.12142-5-abologna@redhat.com> In-Reply-To: <20171211164036.12142-1-abologna@redhat.com> References: <20171211164036.12142-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/6] util: Tweak virHostCPUGetInfoParseCPUFrequency() 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.28]); Mon, 11 Dec 2017 16:41:02 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Just a couple of small cosmetic improvements, performed separately from the pure code motion which created the function. Signed-off-by: Andrea Bolognani Reviewed-by: Bjoern Walk --- src/util/virhostcpu.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index 85803d527..e74125147 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -524,16 +524,19 @@ virHostCPUGetInfoParseCPUFrequency(const char *buf, while (*buf && c_isspace(*buf)) buf++; =20 - if (*buf !=3D ':' || !buf[1]) { - virReportError(VIR_ERR_INTERNAL_ERROR, "%s", - _("parsing cpu MHz from cpuinfo")); + if (buf[0] !=3D ':' || !buf[1]) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Missing or invalid CPU frequency in %s"), + CPUINFO_PATH); goto cleanup; } =20 - 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))) + /* Accept an unsigned value, optionally followed by + * a fractional part (which gets discarded) */ + if (virStrToLong_ui(buf + 1, &p, 10, &ui) =3D=3D 0 && + (*p =3D=3D '\0' || *p =3D=3D '.' || c_isspace(*p))) { *mhz =3D ui; + } } =20 ret =3D 0; --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 12:51:14 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 1513010466787708.7264832914428; Mon, 11 Dec 2017 08:41:06 -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 70CA0C0050CD; Mon, 11 Dec 2017 16:41:05 +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 3D66E2D34E; Mon, 11 Dec 2017 16:41:05 +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 F2B643FCFB; Mon, 11 Dec 2017 16:41:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBBGetVa002257 for ; Mon, 11 Dec 2017 11:40:55 -0500 Received: by smtp.corp.redhat.com (Postfix) id 250336062A; Mon, 11 Dec 2017 16:40:55 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.40.205.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 391386064D for ; Mon, 11 Dec 2017 16:40:53 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 11 Dec 2017 17:40:35 +0100 Message-Id: <20171211164036.12142-6-abologna@redhat.com> In-Reply-To: <20171211164036.12142-1-abologna@redhat.com> References: <20171211164036.12142-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 5/6] util: Tweak s390(x) case for CPU frequency 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.32]); Mon, 11 Dec 2017 16:41:05 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" We're going to use this branch for all architectures which don't have a way to report the CPU frequency, so remove references to any specific architecture. Avoid setting the output value again, too, since it is set to zero at the beginning of the function already. Signed-off-by: Andrea Bolognani Reviewed-by: Bjoern Walk --- src/util/virhostcpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index e74125147..3b478fc45 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -567,9 +567,7 @@ virHostCPUGetInfoParseCPUInfo(FILE *cpuinfo, if (virHostCPUGetInfoParseCPUFrequency(line, "BogoMIPS", mhz) = < 0) goto cleanup; } 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; + /* No reasonable way to obtain CPU frequency */ } else { VIR_WARN("Parser for /proc/cpuinfo needs to be adapted for you= r architecture"); break; --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu May 2 12:51:14 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 1513010460459740.1975624852887; Mon, 11 Dec 2017 08:41:00 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7964661461; Mon, 11 Dec 2017 16:40:58 +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 5366746E87; Mon, 11 Dec 2017 16:40:58 +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 14BEE1800BD3; Mon, 11 Dec 2017 16:40:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id vBBGeu95002267 for ; Mon, 11 Dec 2017 11:40:56 -0500 Received: by smtp.corp.redhat.com (Postfix) id A769A6046C; Mon, 11 Dec 2017 16:40:56 +0000 (UTC) Received: from inaba.usersys.redhat.com (unknown [10.40.205.47]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B928E60628 for ; Mon, 11 Dec 2017 16:40:55 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Mon, 11 Dec 2017 17:40:36 +0100 Message-Id: <20171211164036.12142-7-abologna@redhat.com> In-Reply-To: <20171211164036.12142-1-abologna@redhat.com> References: <20171211164036.12142-1-abologna@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 6/6] 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.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Mon, 11 Dec 2017 16:40:59 +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: Bjoern Walk --- src/util/virhostcpu.c | 5 +---- tests/virhostcpudata/linux-aarch64-rhel74-moonshot.expected | 2 +- tests/virhostcpudata/linux-armv6l-raspberrypi.expected | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index 3b478fc45..9bc213580 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -563,10 +563,7 @@ virHostCPUGetInfoParseCPUInfo(FILE *cpuinfo, } else if (ARCH_IS_PPC(arch)) { if (virHostCPUGetInfoParseCPUFrequency(line, "clock", mhz) < 0) goto cleanup; - } else if (ARCH_IS_ARM(arch)) { - if (virHostCPUGetInfoParseCPUFrequency(line, "BogoMIPS", mhz) = < 0) - goto cleanup; - } else if (ARCH_IS_S390(arch)) { + } else if (ARCH_IS_S390(arch) || ARCH_IS_ARM(arch)) { /* No reasonable way to obtain CPU frequency */ } else { VIR_WARN("Parser for /proc/cpuinfo needs to be adapted for you= r architecture"); 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