From nobody Tue Apr 30 01:32:43 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; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1536975205084508.8523053204674; Fri, 14 Sep 2018 18:33:25 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CBB6C30833C4; Sat, 15 Sep 2018 01:33: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 89C9930912F4; Sat, 15 Sep 2018 01:33: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 173BB18005D0; Sat, 15 Sep 2018 01:33:22 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8F1VeKL002472 for ; Fri, 14 Sep 2018 21:31:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2540A3091343; Sat, 15 Sep 2018 01:31:40 +0000 (UTC) Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 20B3D30912F4; Sat, 15 Sep 2018 01:31:35 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D160A3001966; Sat, 15 Sep 2018 01:31:33 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Sep 2018 18:31:31 -0700 Received: from david-unc.bj.intel.com ([10.238.145.63]) by orsmga002.jf.intel.com with ESMTP; 14 Sep 2018 18:31:30 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,375,1531810800"; d="scan'208";a="91889816" From: Wang Huaqiang To: jferlan@redhat.com, libvir-list@redhat.com Date: Sat, 15 Sep 2018 09:30:37 +0800 Message-Id: <1536975040-29424-2-git-send-email-huaqiang.wang@intel.com> In-Reply-To: <1536975040-29424-1-git-send-email-huaqiang.wang@intel.com> References: <1536975040-29424-1-git-send-email-huaqiang.wang@intel.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sat, 15 Sep 2018 01:31:34 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sat, 15 Sep 2018 01:31:34 +0000 (UTC) for IP:'134.134.136.65' DOMAIN:'mga03.intel.com' HELO:'mga03.intel.com' FROM:'huaqiang.wang@intel.com' RCPT:'' X-RedHat-Spam-Score: -5.001 (RCVD_IN_DNSWL_HI, SPF_PASS) 134.134.136.65 mga03.intel.com 134.134.136.65 mga03.intel.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.40 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.26 X-loop: libvir-list@redhat.com Cc: shaohe.feng@intel.com, huaqiang.wang@intel.com, bing.niu@intel.com, jian-feng.ding@intel.com, rui.zang@intel.com Subject: [libvirt] [PATCHv2 1/4] util: Introduce monitor capability interface 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.84 on 10.5.11.26 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Sat, 15 Sep 2018 01:33:23 +0000 (UTC) X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch introduces the resource monitor and creates the interface for getting host capability of resource monitor from the system resource control file system. The resource monitor take the role of RDT monitoring group, could be used to monitor the resource consumption information, such as the last level cache occupancy and the utilization of memory bandwidth. Signed-off-by: Wang Huaqiang Reviewed-by: John Ferlan --- src/util/virresctrl.c | 124 ++++++++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 124 insertions(+) diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 4b5442f..4601f69 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -83,6 +83,9 @@ typedef virResctrlInfoPerLevel *virResctrlInfoPerLevelPtr; typedef struct _virResctrlInfoMemBW virResctrlInfoMemBW; typedef virResctrlInfoMemBW *virResctrlInfoMemBWPtr; =20 +typedef struct _virResctrlInfoMongrp virResctrlInfoMongrp; +typedef virResctrlInfoMongrp *virResctrlInfoMongrpPtr; + typedef struct _virResctrlAllocPerType virResctrlAllocPerType; typedef virResctrlAllocPerType *virResctrlAllocPerTypePtr; =20 @@ -139,6 +142,28 @@ struct _virResctrlInfoMemBW { unsigned int max_id; }; =20 +struct _virResctrlInfoMongrp { + /* Maximum number of simultaneous monitors */ + unsigned int max_monitor; + /* null-terminal string list for monitor features */ + char **features; + /* Number of monitor features */ + size_t nfeatures; + + /* Last level cache related information */ + + /* This Adjustable value affects the final reuse of resources used by + * monitor. After the action of removing a monitor, the kernel may not + * release all hardware resources that monitor used immediately if the + * cache occupancy value associated with 'removed' monitor is above th= is + * threshold. Once the cache occupancy is below this threshold, the + * underlying hardware resource will be reclaimed and be put into the + * resource pool for next reusing.*/ + unsigned int cache_reuse_threshold; + /* The cache 'level' that has the monitor capability */ + unsigned int cache_level; +}; + struct _virResctrlInfo { virObject parent; =20 @@ -146,6 +171,8 @@ struct _virResctrlInfo { size_t nlevels; =20 virResctrlInfoMemBWPtr membw_info; + + virResctrlInfoMongrpPtr monitor_info; }; =20 =20 @@ -171,8 +198,12 @@ virResctrlInfoDispose(void *obj) VIR_FREE(level); } =20 + if (resctrl->monitor_info) + VIR_FREE(resctrl->monitor_info->features); + VIR_FREE(resctrl->membw_info); VIR_FREE(resctrl->levels); + VIR_FREE(resctrl->monitor_info); } =20 =20 @@ -555,6 +586,92 @@ virResctrlGetMemoryBandwidthInfo(virResctrlInfoPtr res= ctrl) } =20 =20 +/* + * Retrieve monitor capability from the resource control file system. + * + * The monitor capability is exposed through "SYSFS_RESCTRL_PATH/info/L3_M= ON" + * directory under the resource control file system. The monitor capabilit= y is + * parsed by reading the interface files and stored in the structure + * 'virResctrlInfoMongrp'. + * + * Not all host supports the resource monitor, leave the pointer + * @resctrl->monitor_info empty if not supported. + */ +static int +virResctrlGetMonitorInfo(virResctrlInfoPtr resctrl) +{ + int ret =3D -1; + int rv =3D -1; + char *featurestr =3D NULL; + char **features =3D NULL; + size_t nfeatures =3D 0; + virResctrlInfoMongrpPtr info_monitor =3D NULL; + + if (VIR_ALLOC(info_monitor) < 0) + return -1; + + /* monitor only exists in leve 3 cache */ + info_monitor->cache_level =3D 3; + + rv =3D virFileReadValueUint(&info_monitor->max_monitor, + SYSFS_RESCTRL_PATH "/info/L3_MON/num_rmids"); + if (rv =3D=3D -2) { + /* The file doesn't exist, so it's unusable for us, probably resou= rce + * monitor unsupported */ + VIR_INFO("The path '" SYSFS_RESCTRL_PATH "/info/L3_MON/num_rmids' " + "does not exist"); + ret =3D 0; + goto cleanup; + } else if (rv < 0) { + /* Other failures are fatal, so just quit */ + goto cleanup; + } + + rv =3D virFileReadValueUint(&info_monitor->cache_reuse_threshold, + SYSFS_RESCTRL_PATH + "/info/L3_MON/max_threshold_occupancy"); + if (rv =3D=3D -2) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Cannot get max_threshold_occupancy from resctrl" + " info")); + } + if (rv < 0) + goto cleanup; + + rv =3D virFileReadValueString(&featurestr, + SYSFS_RESCTRL_PATH + "/info/L3_MON/mon_features"); + if (rv =3D=3D -2) + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Cannot get mon_features from resctrl info")); + if (rv < 0) + goto cleanup; + + if (!featurestr) { + /* if no feature found in "/info/L3_MON/mon_features", + * some error happens */ + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Cannot get feature list from resctrl info")); + ret =3D -1; + goto cleanup; + } + + features =3D virStringSplitCount(featurestr, "\n", 0, &nfeatures); + VIR_DEBUG("Resctrl supported %ld monitoring features", nfeatures); + + info_monitor->nfeatures =3D nfeatures; + VIR_STEAL_PTR(info_monitor->features, features); + VIR_STEAL_PTR(resctrl->monitor_info, info_monitor); + + ret =3D 0; + cleanup: + VIR_FREE(featurestr); + virStringListFree(features); + VIR_FREE(info_monitor); + return ret; +} + + static int virResctrlGetInfo(virResctrlInfoPtr resctrl) { @@ -573,6 +690,10 @@ virResctrlGetInfo(virResctrlInfoPtr resctrl) if (ret < 0) goto cleanup; =20 + ret =3D virResctrlGetMonitorInfo(resctrl); + if (ret < 0) + goto cleanup; + ret =3D 0; cleanup: VIR_DIR_CLOSE(dirp); @@ -613,6 +734,9 @@ virResctrlInfoIsEmpty(virResctrlInfoPtr resctrl) if (resctrl->membw_info) return false; =20 + if (resctrl->monitor_info) + return false; + for (i =3D 0; i < resctrl->nlevels; i++) { virResctrlInfoPerLevelPtr i_level =3D resctrl->levels[i]; =20 --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue Apr 30 01:32:43 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; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1536975409071287.64943183085416; Fri, 14 Sep 2018 18:36:49 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B35ED5D68D; Sat, 15 Sep 2018 01:36:46 +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 6B5A2D35A0; Sat, 15 Sep 2018 01:36:46 +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 07E8B18005CF; Sat, 15 Sep 2018 01:36:46 +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 w8F1VcdF002460 for ; Fri, 14 Sep 2018 21:31:38 -0400 Received: by smtp.corp.redhat.com (Postfix) id 666B96BF93; Sat, 15 Sep 2018 01:31:38 +0000 (UTC) Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6E27D6E3E5; Sat, 15 Sep 2018 01:31:36 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 27E47308421C; Sat, 15 Sep 2018 01:31:35 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Sep 2018 18:31:33 -0700 Received: from david-unc.bj.intel.com ([10.238.145.63]) by orsmga002.jf.intel.com with ESMTP; 14 Sep 2018 18:31:32 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,375,1531810800"; d="scan'208";a="91889828" From: Wang Huaqiang To: jferlan@redhat.com, libvir-list@redhat.com Date: Sat, 15 Sep 2018 09:30:38 +0800 Message-Id: <1536975040-29424-3-git-send-email-huaqiang.wang@intel.com> In-Reply-To: <1536975040-29424-1-git-send-email-huaqiang.wang@intel.com> References: <1536975040-29424-1-git-send-email-huaqiang.wang@intel.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sat, 15 Sep 2018 01:31:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sat, 15 Sep 2018 01:31:35 +0000 (UTC) for IP:'134.134.136.65' DOMAIN:'mga03.intel.com' HELO:'mga03.intel.com' FROM:'huaqiang.wang@intel.com' RCPT:'' X-RedHat-Spam-Score: -5.001 (RCVD_IN_DNSWL_HI, SPF_PASS) 134.134.136.65 mga03.intel.com 134.134.136.65 mga03.intel.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.40 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: shaohe.feng@intel.com, huaqiang.wang@intel.com, bing.niu@intel.com, jian-feng.ding@intel.com, rui.zang@intel.com Subject: [libvirt] [PATCHv2 2/4] conf: Refactor cache bank capability structure 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.84 on 10.5.11.27 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sat, 15 Sep 2018 01:36:47 +0000 (UTC) X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Move all cache banks into one data structure, this allows us to add other cache component, such as cache monitor. Signed-off-by: Wang Huaqiang Reviewed-by: John Ferlan --- src/conf/capabilities.c | 36 +++++++++++++++++------------------- src/conf/capabilities.h | 10 ++++++++-- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 326bd15..9149e10 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -245,9 +245,9 @@ virCapsDispose(void *object) virCapabilitiesClearSecModel(&caps->host.secModels[i]); VIR_FREE(caps->host.secModels); =20 - for (i =3D 0; i < caps->host.ncaches; i++) - virCapsHostCacheBankFree(caps->host.caches[i]); - VIR_FREE(caps->host.caches); + for (i =3D 0; i < caps->host.cache.nbanks; i++) + virCapsHostCacheBankFree(caps->host.cache.banks[i]); + VIR_FREE(caps->host.cache.banks); =20 for (i =3D 0; i < caps->host.nnodes; i++) virCapsHostMemBWNodeFree(caps->host.nodes[i]); @@ -868,21 +868,20 @@ virCapabilitiesFormatNUMATopology(virBufferPtr buf, =20 static int virCapabilitiesFormatCaches(virBufferPtr buf, - size_t ncaches, - virCapsHostCacheBankPtr *caches) + virCapsHostCachePtr cache) { size_t i =3D 0; size_t j =3D 0; virBuffer childrenBuf =3D VIR_BUFFER_INITIALIZER; =20 - if (!ncaches) + if (!cache->nbanks) return 0; =20 virBufferAddLit(buf, "\n"); virBufferAdjustIndent(buf, 2); =20 - for (i =3D 0; i < ncaches; i++) { - virCapsHostCacheBankPtr bank =3D caches[i]; + for (i =3D 0; i < cache->nbanks; i++) { + virCapsHostCacheBankPtr bank =3D cache->banks[i]; char *cpus_str =3D virBitmapFormat(bank->cpus); const char *unit =3D NULL; unsigned long long short_size =3D virFormatIntPretty(bank->size, &= unit); @@ -1111,8 +1110,7 @@ virCapabilitiesFormatXML(virCapsPtr caps) caps->host.numaCell) < 0) goto error; =20 - if (virCapabilitiesFormatCaches(&buf, caps->host.ncaches, - caps->host.caches) < 0) + if (virCapabilitiesFormatCaches(&buf, &caps->host.cache) < 0) goto error; =20 if (virCapabilitiesFormatMemoryBandwidth(&buf, caps->host.nnodes, @@ -1668,8 +1666,8 @@ virCapabilitiesInitResctrlMemory(virCapsPtr caps) size_t i =3D 0; int ret =3D -1; =20 - for (i =3D 0; i < caps->host.ncaches; i++) { - virCapsHostCacheBankPtr bank =3D caps->host.caches[i]; + for (i =3D 0; i < caps->host.cache.nbanks; i++) { + virCapsHostCacheBankPtr bank =3D caps->host.cache.banks[i]; if (VIR_ALLOC(node) < 0) goto cleanup; =20 @@ -1791,11 +1789,11 @@ virCapabilitiesInitCaches(virCapsPtr caps) bank->type =3D kernel_type; VIR_FREE(type); =20 - for (i =3D 0; i < caps->host.ncaches; i++) { - if (virCapsHostCacheBankEquals(bank, caps->host.caches[i])) + for (i =3D 0; i < caps->host.cache.nbanks; i++) { + if (virCapsHostCacheBankEquals(bank, caps->host.cache.bank= s[i])) break; } - if (i =3D=3D caps->host.ncaches) { + if (i =3D=3D caps->host.cache.nbanks) { /* If it is a new cache, then update its resctrl informati= on. */ if (virResctrlInfoGetCache(caps->host.resctrl, bank->level, @@ -1804,8 +1802,8 @@ virCapabilitiesInitCaches(virCapsPtr caps) &bank->controls) < 0) goto cleanup; =20 - if (VIR_APPEND_ELEMENT(caps->host.caches, - caps->host.ncaches, + if (VIR_APPEND_ELEMENT(caps->host.cache.banks, + caps->host.cache.nbanks, bank) < 0) { goto cleanup; } @@ -1821,8 +1819,8 @@ virCapabilitiesInitCaches(virCapsPtr caps) /* Sort the array in order for the tests to be predictable. This way = we can * still traverse the directory instead of guessing names (in case the= re is * 'index1' and 'index3' but no 'index2'). */ - qsort(caps->host.caches, caps->host.ncaches, - sizeof(*caps->host.caches), virCapsHostCacheBankSorter); + qsort(caps->host.cache.banks, caps->host.cache.nbanks, + sizeof(*caps->host.cache.banks), virCapsHostCacheBankSorter); =20 if (virCapabilitiesInitResctrlMemory(caps) < 0) goto cleanup; diff --git a/src/conf/capabilities.h b/src/conf/capabilities.h index 046e275..744074b 100644 --- a/src/conf/capabilities.h +++ b/src/conf/capabilities.h @@ -151,6 +151,13 @@ struct _virCapsHostCacheBank { virResctrlInfoPerCachePtr *controls; }; =20 +typedef struct _virCapsHostCache virCapsHostCache; +typedef virCapsHostCache *virCapsHostCachePtr; +struct _virCapsHostCache { + size_t nbanks; + virCapsHostCacheBankPtr *banks; +}; + typedef struct _virCapsHostMemBWNode virCapsHostMemBWNode; typedef virCapsHostMemBWNode *virCapsHostMemBWNodePtr; struct _virCapsHostMemBWNode { @@ -180,8 +187,7 @@ struct _virCapsHost { =20 virResctrlInfoPtr resctrl; =20 - size_t ncaches; - virCapsHostCacheBankPtr *caches; + virCapsHostCache cache; =20 size_t nnodes; virCapsHostMemBWNodePtr *nodes; --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue Apr 30 01:32:43 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; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1536975227774478.6988590715695; Fri, 14 Sep 2018 18:33:47 -0700 (PDT) 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 94C763024647; Sat, 15 Sep 2018 01:33:45 +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 5DEF260559; Sat, 15 Sep 2018 01:33:45 +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 1AE0C4BB75; Sat, 15 Sep 2018 01:33:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8F1Ve1w002477 for ; Fri, 14 Sep 2018 21:31:41 -0400 Received: by smtp.corp.redhat.com (Postfix) id E57CC308BDAA; Sat, 15 Sep 2018 01:31:40 +0000 (UTC) Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 93729308BDA6; Sat, 15 Sep 2018 01:31:37 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 684763084029; Sat, 15 Sep 2018 01:31:36 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Sep 2018 18:31:35 -0700 Received: from david-unc.bj.intel.com ([10.238.145.63]) by orsmga002.jf.intel.com with ESMTP; 14 Sep 2018 18:31:34 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,375,1531810800"; d="scan'208";a="91889832" From: Wang Huaqiang To: jferlan@redhat.com, libvir-list@redhat.com Date: Sat, 15 Sep 2018 09:30:39 +0800 Message-Id: <1536975040-29424-4-git-send-email-huaqiang.wang@intel.com> In-Reply-To: <1536975040-29424-1-git-send-email-huaqiang.wang@intel.com> References: <1536975040-29424-1-git-send-email-huaqiang.wang@intel.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sat, 15 Sep 2018 01:31:36 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sat, 15 Sep 2018 01:31:36 +0000 (UTC) for IP:'134.134.136.65' DOMAIN:'mga03.intel.com' HELO:'mga03.intel.com' FROM:'huaqiang.wang@intel.com' RCPT:'' X-RedHat-Spam-Score: -5.001 (RCVD_IN_DNSWL_HI, SPF_PASS) 134.134.136.65 mga03.intel.com 134.134.136.65 mga03.intel.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.40 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Cc: shaohe.feng@intel.com, huaqiang.wang@intel.com, bing.niu@intel.com, jian-feng.ding@intel.com, rui.zang@intel.com Subject: [libvirt] [PATCHv2 3/4] conf: Refactor memory bandwidth capability structure 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.49]); Sat, 15 Sep 2018 01:33:46 +0000 (UTC) X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Move memory bandwidth capability nodes into one data structure, this allows us to add a monitor for memory bandwidth. Signed-off-by: Wang Huaqiang Reviewed-by: John Ferlan --- src/conf/capabilities.c | 22 ++++++++++------------ src/conf/capabilities.h | 10 ++++++++-- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 9149e10..66ad420 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -249,9 +249,9 @@ virCapsDispose(void *object) virCapsHostCacheBankFree(caps->host.cache.banks[i]); VIR_FREE(caps->host.cache.banks); =20 - for (i =3D 0; i < caps->host.nnodes; i++) - virCapsHostMemBWNodeFree(caps->host.nodes[i]); - VIR_FREE(caps->host.nodes); + for (i =3D 0; i < caps->host.memBW.nnodes; i++) + virCapsHostMemBWNodeFree(caps->host.memBW.nodes[i]); + VIR_FREE(caps->host.memBW.nodes); =20 VIR_FREE(caps->host.netprefix); VIR_FREE(caps->host.pagesSize); @@ -961,20 +961,19 @@ virCapabilitiesFormatCaches(virBufferPtr buf, =20 static int virCapabilitiesFormatMemoryBandwidth(virBufferPtr buf, - size_t nnodes, - virCapsHostMemBWNodePtr *nodes) + virCapsHostMemBWPtr memBW) { size_t i =3D 0; virBuffer childrenBuf =3D VIR_BUFFER_INITIALIZER; =20 - if (!nnodes) + if (!memBW->nnodes) return 0; =20 virBufferAddLit(buf, "\n"); virBufferAdjustIndent(buf, 2); =20 - for (i =3D 0; i < nnodes; i++) { - virCapsHostMemBWNodePtr node =3D nodes[i]; + for (i =3D 0; i < memBW->nnodes; i++) { + virCapsHostMemBWNodePtr node =3D memBW->nodes[i]; virResctrlInfoMemBWPerNodePtr control =3D &node->control; char *cpus_str =3D virBitmapFormat(node->cpus); =20 @@ -1113,8 +1112,7 @@ virCapabilitiesFormatXML(virCapsPtr caps) if (virCapabilitiesFormatCaches(&buf, &caps->host.cache) < 0) goto error; =20 - if (virCapabilitiesFormatMemoryBandwidth(&buf, caps->host.nnodes, - caps->host.nodes) < 0) + if (virCapabilitiesFormatMemoryBandwidth(&buf, &caps->host.memBW) < 0) goto error; =20 for (i =3D 0; i < caps->host.nsecModels; i++) { @@ -1677,8 +1675,8 @@ virCapabilitiesInitResctrlMemory(virCapsPtr caps) if (!(node->cpus =3D virBitmapNewCopy(bank->cpus))) goto cleanup; =20 - if (VIR_APPEND_ELEMENT(caps->host.nodes, - caps->host.nnodes, node) < 0) { + if (VIR_APPEND_ELEMENT(caps->host.memBW.nodes, + caps->host.memBW.nnodes, node) < 0) { goto cleanup; } } diff --git a/src/conf/capabilities.h b/src/conf/capabilities.h index 744074b..694fd6b 100644 --- a/src/conf/capabilities.h +++ b/src/conf/capabilities.h @@ -166,6 +166,13 @@ struct _virCapsHostMemBWNode { virResctrlInfoMemBWPerNode control; }; =20 +typedef struct _virCapsHostMemBW virCapsHostMemBW; +typedef virCapsHostMemBW *virCapsHostMemBWPtr; +struct _virCapsHostMemBW { + size_t nnodes; + virCapsHostMemBWNodePtr *nodes; +}; + typedef struct _virCapsHost virCapsHost; typedef virCapsHost *virCapsHostPtr; struct _virCapsHost { @@ -189,8 +196,7 @@ struct _virCapsHost { =20 virCapsHostCache cache; =20 - size_t nnodes; - virCapsHostMemBWNodePtr *nodes; + virCapsHostMemBW memBW; =20 size_t nsecModels; virCapsHostSecModelPtr secModels; --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Tue Apr 30 01:32:43 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; dmarc=fail(p=none dis=none) header.from=intel.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1536975385758610.9462872847979; Fri, 14 Sep 2018 18:36:25 -0700 (PDT) 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 DE8E381256; Sat, 15 Sep 2018 01:36:23 +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 AE0EE60501; Sat, 15 Sep 2018 01:36:23 +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 5B9A44BB7F; Sat, 15 Sep 2018 01:36:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w8F1VhY2002497 for ; Fri, 14 Sep 2018 21:31:43 -0400 Received: by smtp.corp.redhat.com (Postfix) id D432070137; Sat, 15 Sep 2018 01:31:43 +0000 (UTC) Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AFA4B7013E; Sat, 15 Sep 2018 01:31:40 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 441C7308404D; Sat, 15 Sep 2018 01:31:38 +0000 (UTC) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Sep 2018 18:31:38 -0700 Received: from david-unc.bj.intel.com ([10.238.145.63]) by orsmga002.jf.intel.com with ESMTP; 14 Sep 2018 18:31:36 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,375,1531810800"; d="scan'208";a="91889840" From: Wang Huaqiang To: jferlan@redhat.com, libvir-list@redhat.com Date: Sat, 15 Sep 2018 09:30:40 +0800 Message-Id: <1536975040-29424-5-git-send-email-huaqiang.wang@intel.com> In-Reply-To: <1536975040-29424-1-git-send-email-huaqiang.wang@intel.com> References: <1536975040-29424-1-git-send-email-huaqiang.wang@intel.com> X-Greylist: Sender passed SPF test, Sender IP whitelisted by DNSRBL, ACL 214 matched, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sat, 15 Sep 2018 01:31:38 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sat, 15 Sep 2018 01:31:38 +0000 (UTC) for IP:'134.134.136.65' DOMAIN:'mga03.intel.com' HELO:'mga03.intel.com' FROM:'huaqiang.wang@intel.com' RCPT:'' X-RedHat-Spam-Score: -5.001 (RCVD_IN_DNSWL_HI, SPF_PASS) 134.134.136.65 mga03.intel.com 134.134.136.65 mga03.intel.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.40 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: shaohe.feng@intel.com, huaqiang.wang@intel.com, bing.niu@intel.com, jian-feng.ding@intel.com, rui.zang@intel.com Subject: [libvirt] [PATCHv2 4/4] conf: Introduce RDT monitor host capability 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.25]); Sat, 15 Sep 2018 01:36:24 +0000 (UTC) X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cache monitoring technology(CMT) and memory bandwidth monitoring technology(MBM) are resource monitoring part of Intel resource director technology(RDT). This patch is introducing cache monitor(CMT) to cache and memory bandwidth monitor(MBM) for monitoring CPU memory bandwidth. The host capability of the two monitors is also introduced in this patch. For cache monitor, the host capability is shown like: ... ... For memory bandwidth monitor, the capability is shown like this: ... ... Signed-off-by: Wang Huaqiang --- docs/schemas/capability.rng | 37 ++++++- src/conf/capabilities.c | 68 ++++++++++++ src/conf/capabilities.h | 4 + src/libvirt_private.syms | 2 + src/util/virresctrl.c | 120 +++++++++++++++++= +++- src/util/virresctrl.h | 62 +++++++++++ .../resctrl/info/L3_MON/max_threshold_occupancy | 1 + .../resctrl/info/L3_MON/mon_features | 1 + .../resctrl/info/L3_MON/num_rmids | 1 + .../linux-resctrl-cmt/resctrl/manualres/cpus | 1 + .../linux-resctrl-cmt/resctrl/manualres/schemata | 1 + .../linux-resctrl-cmt/resctrl/manualres/tasks | 0 .../linux-resctrl-cmt/resctrl/schemata | 1 + tests/vircaps2xmldata/linux-resctrl-cmt/system | 1 + .../resctrl/info/L3/cbm_mask | 1 + .../resctrl/info/L3/min_cbm_bits | 1 + .../resctrl/info/L3/num_closids | 1 + .../resctrl/info/L3_MON/max_threshold_occupancy | 1 + .../resctrl/info/L3_MON/mon_features | 10 ++ .../resctrl/info/L3_MON/num_rmids | 1 + .../resctrl/info/MB/bandwidth_gran | 1 + .../resctrl/info/MB/min_bandwidth | 1 + .../resctrl/info/MB/num_closids | 1 + .../resctrl/manualres/cpus | 1 + .../resctrl/manualres/schemata | 1 + .../resctrl/manualres/tasks | 0 .../linux-resctrl-fake-feature/resctrl/schemata | 1 + .../linux-resctrl-fake-feature/system | 1 + .../resctrl/info/L3_MON/max_threshold_occupancy | 1 + .../linux-resctrl/resctrl/info/L3_MON/mon_features | 3 + .../linux-resctrl/resctrl/info/L3_MON/num_rmids | 1 + .../vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml | 53 +++++++++ .../vircaps-x86_64-resctrl-fake-feature.xml | 73 +++++++++++++ tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml | 7 ++ tests/vircaps2xmltest.c | 2 + 35 files changed, 459 insertions(+), 3 deletions(-) create mode 100644 tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3= _MON/max_threshold_occupancy create mode 100644 tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3= _MON/mon_features create mode 100644 tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3= _MON/num_rmids create mode 100644 tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualr= es/cpus create mode 100644 tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualr= es/schemata create mode 100644 tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualr= es/tasks create mode 100644 tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/schemata create mode 120000 tests/vircaps2xmldata/linux-resctrl-cmt/system create mode 100644 tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/info/L3/cbm_mask create mode 100644 tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/info/L3/min_cbm_bits create mode 100644 tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/info/L3/num_closids create mode 100644 tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/info/L3_MON/max_threshold_occupancy create mode 100644 tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/info/L3_MON/mon_features create mode 100644 tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/info/L3_MON/num_rmids create mode 100644 tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/info/MB/bandwidth_gran create mode 100644 tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/info/MB/min_bandwidth create mode 100644 tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/info/MB/num_closids create mode 100644 tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/manualres/cpus create mode 100644 tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/manualres/schemata create mode 100644 tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/manualres/tasks create mode 100644 tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/schemata create mode 120000 tests/vircaps2xmldata/linux-resctrl-fake-feature/system create mode 100644 tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON= /max_threshold_occupancy create mode 100644 tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON= /mon_features create mode 100644 tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON= /num_rmids create mode 100644 tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml create mode 100644 tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-featu= re.xml diff --git a/docs/schemas/capability.rng b/docs/schemas/capability.rng index d61515c..fe12bf9 100644 --- a/docs/schemas/capability.rng +++ b/docs/schemas/capability.rng @@ -316,6 +316,9 @@ + + + =20 @@ -347,7 +350,7 @@ - + @@ -356,9 +359,41 @@ + + + =20 + + + + + + + + + + + + + + + + + + + + + + + + + + (llc_|mbm_)[a-zA-Z0-9\-_]+ + + + diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index 66ad420..ba69d6f 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -247,10 +247,12 @@ virCapsDispose(void *object) =20 for (i =3D 0; i < caps->host.cache.nbanks; i++) virCapsHostCacheBankFree(caps->host.cache.banks[i]); + virResctrlInfoMonFree(caps->host.cache.monitor); VIR_FREE(caps->host.cache.banks); =20 for (i =3D 0; i < caps->host.memBW.nnodes; i++) virCapsHostMemBWNodeFree(caps->host.memBW.nodes[i]); + virResctrlInfoMonFree(caps->host.memBW.monitor); VIR_FREE(caps->host.memBW.nodes); =20 VIR_FREE(caps->host.netprefix); @@ -867,6 +869,50 @@ virCapabilitiesFormatNUMATopology(virBufferPtr buf, } =20 static int +virCapabilitiesFormatResctrlMonitor(virBufferPtr buf, + virResctrlInfoMonPtr monitor) +{ + size_t i =3D 0; + virBuffer childrenBuf =3D VIR_BUFFER_INITIALIZER; + + /* monitor not supported, no capability */ + if (!monitor) + return 0; + + /* no feature found in mointor means no capability, return */ + if (monitor->nfeatures =3D=3D 0) + return 0; + + virBufferAddLit(buf, "type =3D=3D VIR_MONITOR_TYPE_CACHE) + virBufferAsprintf(buf, + "level=3D'%u' reuseThreshold=3D'%u' ", + monitor->cache_level, + monitor->cache_reuse_threshold); + virBufferAsprintf(buf, + "maxMonitors=3D'%u'>\n", + monitor->max_monitor); + + + for (i =3D 0; i < monitor->nfeatures; i++) { + virBufferSetChildIndent(&childrenBuf, buf); + virBufferAsprintf(&childrenBuf, + "\n", + monitor->features[i]); + } + + if (virBufferCheckError(&childrenBuf) < 0) + return -1; + + virBufferAddBuffer(buf, &childrenBuf); + virBufferAddLit(buf, "\n"); + + return 0; +} + +static int virCapabilitiesFormatCaches(virBufferPtr buf, virCapsHostCachePtr cache) { @@ -953,6 +999,10 @@ virCapabilitiesFormatCaches(virBufferPtr buf, } } =20 + if (virCapabilitiesFormatResctrlMonitor(buf, + cache->monitor) < 0) + return -1; + virBufferAdjustIndent(buf, -2); virBufferAddLit(buf, "\n"); =20 @@ -1004,6 +1054,10 @@ virCapabilitiesFormatMemoryBandwidth(virBufferPtr bu= f, } } =20 + if (virCapabilitiesFormatResctrlMonitor(buf, + memBW->monitor) < 0) + return -1; + virBufferAdjustIndent(buf, -2); virBufferAddLit(buf, "\n"); =20 @@ -1664,6 +1718,8 @@ virCapabilitiesInitResctrlMemory(virCapsPtr caps) size_t i =3D 0; int ret =3D -1; =20 + const char *prefix =3D virMonitorPrefixTypeToString(VIR_MONITOR_TYPE_M= EMBW); + for (i =3D 0; i < caps->host.cache.nbanks; i++) { virCapsHostCacheBankPtr bank =3D caps->host.cache.banks[i]; if (VIR_ALLOC(node) < 0) @@ -1684,6 +1740,11 @@ virCapabilitiesInitResctrlMemory(virCapsPtr caps) node =3D NULL; } =20 + if (virResctrlInfoGetMonitorPrefix(caps->host.resctrl, + prefix, + &caps->host.memBW.monitor) < 0) + goto cleanup; + ret =3D 0; cleanup: virCapsHostMemBWNodeFree(node); @@ -1704,6 +1765,8 @@ virCapabilitiesInitCaches(virCapsPtr caps) struct dirent *ent =3D NULL; virCapsHostCacheBankPtr bank =3D NULL; =20 + const char *prefix =3D virMonitorPrefixTypeToString(VIR_MONITOR_TYPE_C= ACHE); + /* Minimum level to expose in capabilities. Can be lowered or removed= (with * the appropriate code below), but should not be increased, because w= e'd * lose information. */ @@ -1823,6 +1886,11 @@ virCapabilitiesInitCaches(virCapsPtr caps) if (virCapabilitiesInitResctrlMemory(caps) < 0) goto cleanup; =20 + if (virResctrlInfoGetMonitorPrefix(caps->host.resctrl, + prefix, + &caps->host.cache.monitor) < 0) + goto cleanup; + ret =3D 0; cleanup: VIR_FREE(type); diff --git a/src/conf/capabilities.h b/src/conf/capabilities.h index 694fd6b..45b331a 100644 --- a/src/conf/capabilities.h +++ b/src/conf/capabilities.h @@ -156,6 +156,8 @@ typedef virCapsHostCache *virCapsHostCachePtr; struct _virCapsHostCache { size_t nbanks; virCapsHostCacheBankPtr *banks; + + virResctrlInfoMonPtr monitor; }; =20 typedef struct _virCapsHostMemBWNode virCapsHostMemBWNode; @@ -171,6 +173,8 @@ typedef virCapsHostMemBW *virCapsHostMemBWPtr; struct _virCapsHostMemBW { size_t nnodes; virCapsHostMemBWNodePtr *nodes; + + virResctrlInfoMonPtr monitor; }; =20 typedef struct _virCapsHost virCapsHost; diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index e7a4d61..8061e1c 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2668,6 +2668,8 @@ virResctrlAllocSetCacheSize; virResctrlAllocSetID; virResctrlAllocSetMemoryBandwidth; virResctrlInfoGetCache; +virResctrlInfoGetMonitorPrefix; +virResctrlInfoMonFree; virResctrlInfoNew; =20 =20 diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 4601f69..156618f 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -70,6 +70,18 @@ VIR_ENUM_IMPL(virResctrl, VIR_CACHE_TYPE_LAST, "CODE", "DATA") =20 +/* Monitor name mapping for monitor naming */ +VIR_ENUM_IMPL(virMonitor, VIR_MONITOR_TYPE_LAST, + "unsupported monitor", + "cache monitor", + "memory bandwidth monitor") + +/* Monitor feature name prefix mapping for monitor naming */ +VIR_ENUM_IMPL(virMonitorPrefix, VIR_MONITOR_TYPE_LAST, + "__unsupported__", + "llc_", + "mbm_") + =20 /* All private typedefs so that they exist for all later definitions. Thi= s way * structs can be included in one or another without reorganizing the code= every @@ -207,6 +219,17 @@ virResctrlInfoDispose(void *obj) } =20 =20 +void +virResctrlInfoMonFree(virResctrlInfoMonPtr mon) +{ + if (!mon) + return; + + virStringListFree(mon->features); + VIR_FREE(mon); +} + + /* virResctrlAlloc */ =20 /* @@ -686,11 +709,11 @@ virResctrlGetInfo(virResctrlInfoPtr resctrl) if (ret < 0) goto cleanup; =20 - ret =3D virResctrlGetCacheInfo(resctrl, dirp); + ret =3D virResctrlGetMonitorInfo(resctrl); if (ret < 0) goto cleanup; =20 - ret =3D virResctrlGetMonitorInfo(resctrl); + ret =3D virResctrlGetCacheInfo(resctrl, dirp); if (ret < 0) goto cleanup; =20 @@ -851,6 +874,99 @@ virResctrlInfoGetCache(virResctrlInfoPtr resctrl, } =20 =20 +/* virResctrlInfoGetMonitorPrefix + * + * @resctrl: Pointer to virResctrlInfo + * @prefix: Monitor prefix name for monitor looking for. + * @monitor: Returns the capability inforamtion for taget monitor if the + * monitor with prefix name @prefex is supported by host. + * + * Return monitor capability information describe in prefix name @prefix + * through @monitor + * + * Returns 0 if a monitor is found or a valid monitor is not supported by = host, + * -1 on failure with error message set. + * */ +int +virResctrlInfoGetMonitorPrefix(virResctrlInfoPtr resctrl, + const char *prefix, + virResctrlInfoMonPtr *monitor) +{ + size_t i =3D 0; + virResctrlInfoMongrpPtr mongrp_info =3D NULL; + virResctrlInfoMonPtr mon =3D NULL; + int ret =3D -1; + + if (virResctrlInfoIsEmpty(resctrl)) + return 0; + + mongrp_info =3D resctrl->monitor_info; + + if (!mongrp_info) { + VIR_INFO("Monitor is not supported in host"); + return 0; + } + + if (!prefix) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Empty prefix name for resctrl monitor")); + return -1; + } + + for (i =3D 0; i < VIR_MONITOR_TYPE_LAST; i++) { + if (STREQ(prefix, virMonitorPrefixTypeToString(i))) { + if (VIR_ALLOC(mon) < 0) + goto cleanup; + mon->type =3D i; + break; + } + } + + if (!mon) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Bad prefix name \"%s\" for resctrl monitor"), + prefix); + goto cleanup; + } + + mon->max_monitor =3D mongrp_info->max_monitor; + + if (mon->type =3D=3D VIR_MONITOR_TYPE_CACHE) { + mon->cache_reuse_threshold =3D mongrp_info->cache_reuse_threshold; + mon->cache_level =3D mongrp_info->cache_level; + } + + for (i =3D 0; i < mongrp_info->nfeatures; i++) { + if (STRPREFIX(mongrp_info->features[i], prefix)) { + if (virStringListAdd(&mon->features, + mongrp_info->features[i]) < 0) + goto cleanup; + mon->nfeatures++; + } + } + + ret =3D 0; + + if (mon->nfeatures =3D=3D 0) { + /* No feature found for current monitor, means host does not suppo= rt + * monitor type with @prefix name. + * Telling caller this monitor is supported by hardware specificat= ion, + * but not supported by this host */ + VIR_INFO("%s is not supported by host", + virMonitorTypeToString(mon->type)); + goto cleanup; + } + + /* In case *monitor is pointed to some monitor, clean it. */ + VIR_FREE(*monitor); + + VIR_STEAL_PTR(*monitor, mon); + cleanup: + virResctrlInfoMonFree(mon); + return ret; +} + + /* virResctrlAlloc-related definitions */ virResctrlAllocPtr virResctrlAllocNew(void) diff --git a/src/util/virresctrl.h b/src/util/virresctrl.h index cfd56dd..949e20f 100644 --- a/src/util/virresctrl.h +++ b/src/util/virresctrl.h @@ -36,6 +36,16 @@ typedef enum { VIR_ENUM_DECL(virCache); VIR_ENUM_DECL(virCacheKernel); =20 +typedef enum { + VIR_MONITOR_TYPE_UNSUPPORT, + VIR_MONITOR_TYPE_CACHE, + VIR_MONITOR_TYPE_MEMBW, + + VIR_MONITOR_TYPE_LAST +} virMonitorType; +VIR_ENUM_DECL(virMonitor); +VIR_ENUM_DECL(virMonitorPrefix); + =20 typedef struct _virResctrlInfoPerCache virResctrlInfoPerCache; typedef virResctrlInfoPerCache *virResctrlInfoPerCachePtr; @@ -61,6 +71,51 @@ struct _virResctrlInfoMemBWPerNode { unsigned int max_allocation; }; =20 +typedef struct _virResctrlInfoMon virResctrlInfoMon; +typedef virResctrlInfoMon *virResctrlInfoMonPtr; +struct _virResctrlInfoMon { + /* Common fields */ + + /* Maximum number of simultaneous monitors */ + unsigned int max_monitor; + /* null-terminal string list for monitor features */ + char **features; + /* Number of monitor features */ + size_t nfeatures; + /* Monitor type */ + virMonitorType type; + + /* cache monitor (CMT) related field + * + * CMT has following resource monitor event: + * "llc_occupancy" + * + * If this is a cache monitor, the memory bandwidth monitor related + * fields and feture events will not be valid. */ + + /* This Adjustable value affects the final reuse of resources used by + * monitor. After the action of removing a monitor, the kernel may not + * release all hardware resources that monitor used immediately if the + * cache occupancy value associated with 'removed' monitor is above th= is + * threshold. Once the cache occupancy is below this threshold, the + * underlying hardware resource will be reclaimed and be put into the + * resource pool for next reusing.*/ + unsigned int cache_reuse_threshold; + /* The cache 'level' that has the monitor capability */ + unsigned int cache_level; + + /* memory bandwidth monitor (MBM) related field + * + * MBM has following resource monitor events: + * "mbm_total_bytes" + * "mbm_local_bytes" + * + * If this is a memory bandwidth monitor, the cache monitor related + * fields and feature events will not be valid. */ + + /* MBM related field is empty */ +}; + typedef struct _virResctrlInfo virResctrlInfo; typedef virResctrlInfo *virResctrlInfoPtr; =20 @@ -145,4 +200,11 @@ virResctrlAllocAddPID(virResctrlAllocPtr alloc, int virResctrlAllocRemove(virResctrlAllocPtr alloc); =20 +void +virResctrlInfoMonFree(virResctrlInfoMonPtr mon); + +int +virResctrlInfoGetMonitorPrefix(virResctrlInfoPtr resctrl, + const char *prefix, + virResctrlInfoMonPtr *monitor); #endif /* __VIR_RESCTRL_H__ */ diff --git a/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/ma= x_threshold_occupancy b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/inf= o/L3_MON/max_threshold_occupancy new file mode 100644 index 0000000..77f05e2 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/max_thres= hold_occupancy @@ -0,0 +1 @@ +270336 diff --git a/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/mo= n_features b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/mo= n_features new file mode 100644 index 0000000..8467d90 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/mon_featu= res @@ -0,0 +1 @@ +llc_occupancy diff --git a/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/nu= m_rmids b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/num_r= mids new file mode 100644 index 0000000..1057e9a --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/num_rmids @@ -0,0 +1 @@ +176 diff --git a/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualres/cpus= b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualres/cpus new file mode 100644 index 0000000..8f087a3 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualres/cpus @@ -0,0 +1 @@ +000 diff --git a/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualres/sche= mata b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualres/schemata new file mode 100644 index 0000000..e499ef7 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualres/schemata @@ -0,0 +1 @@ +L3:0=3De0000;1=3De0000 diff --git a/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualres/task= s b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualres/tasks new file mode 100644 index 0000000..e69de29 diff --git a/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/schemata b/tes= ts/vircaps2xmldata/linux-resctrl-cmt/resctrl/schemata new file mode 100644 index 0000000..78d2d8a --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/schemata @@ -0,0 +1 @@ + L3:0=3D1ff00;1=3D1ff0f diff --git a/tests/vircaps2xmldata/linux-resctrl-cmt/system b/tests/vircaps= 2xmldata/linux-resctrl-cmt/system new file mode 120000 index 0000000..5607d59 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-cmt/system @@ -0,0 +1 @@ +../linux-resctrl/system \ No newline at end of file diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/= L3/cbm_mask b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info= /L3/cbm_mask new file mode 100644 index 0000000..78031da --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/L3/cbm_= mask @@ -0,0 +1 @@ +fffff diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/= L3/min_cbm_bits b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/= info/L3/min_cbm_bits new file mode 100644 index 0000000..0cfbf08 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/L3/min_= cbm_bits @@ -0,0 +1 @@ +2 diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/= L3/num_closids b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/i= nfo/L3/num_closids new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/L3/num_= closids @@ -0,0 +1 @@ +4 diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/= L3_MON/max_threshold_occupancy b/tests/vircaps2xmldata/linux-resctrl-fake-f= eature/resctrl/info/L3_MON/max_threshold_occupancy new file mode 100644 index 0000000..77f05e2 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/L3_MON/= max_threshold_occupancy @@ -0,0 +1 @@ +270336 diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/= L3_MON/mon_features b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resc= trl/info/L3_MON/mon_features new file mode 100644 index 0000000..337cfa2 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/L3_MON/= mon_features @@ -0,0 +1,10 @@ +llc_occupancy +mbm_total_bytes +mbm_local_bytes +llc_new_feature +llc_unknown_feature +mbm_new_feature +mbm_unknown_feature +ukn_feature +fak_feature +fake_unknown_feature diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/= L3_MON/num_rmids b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl= /info/L3_MON/num_rmids new file mode 100644 index 0000000..1057e9a --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/L3_MON/= num_rmids @@ -0,0 +1 @@ +176 diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/= MB/bandwidth_gran b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctr= l/info/MB/bandwidth_gran new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/MB/band= width_gran @@ -0,0 +1 @@ +10 diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/= MB/min_bandwidth b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl= /info/MB/min_bandwidth new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/MB/min_= bandwidth @@ -0,0 +1 @@ +10 diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/= MB/num_closids b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/i= nfo/MB/num_closids new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/MB/num_= closids @@ -0,0 +1 @@ +4 diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manua= lres/cpus b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manual= res/cpus new file mode 100644 index 0000000..8f087a3 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manualres/cp= us @@ -0,0 +1 @@ +000 diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manua= lres/schemata b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/ma= nualres/schemata new file mode 100644 index 0000000..e499ef7 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manualres/sc= hemata @@ -0,0 +1 @@ +L3:0=3De0000;1=3De0000 diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manua= lres/tasks b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manua= lres/tasks new file mode 100644 index 0000000..e69de29 diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/schem= ata b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/schemata new file mode 100644 index 0000000..78d2d8a --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/schemata @@ -0,0 +1 @@ + L3:0=3D1ff00;1=3D1ff0f diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/system b/test= s/vircaps2xmldata/linux-resctrl-fake-feature/system new file mode 120000 index 0000000..5607d59 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/system @@ -0,0 +1 @@ +../linux-resctrl/system \ No newline at end of file diff --git a/tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/max_th= reshold_occupancy b/tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON= /max_threshold_occupancy new file mode 100644 index 0000000..77f05e2 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/max_threshold= _occupancy @@ -0,0 +1 @@ +270336 diff --git a/tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/mon_fe= atures b/tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/mon_featur= es new file mode 100644 index 0000000..0c57b8d --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/mon_features @@ -0,0 +1,3 @@ +llc_occupancy +mbm_total_bytes +mbm_local_bytes diff --git a/tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/num_rm= ids b/tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/num_rmids new file mode 100644 index 0000000..1057e9a --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/num_rmids @@ -0,0 +1 @@ +176 diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml b/tests/v= ircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml new file mode 100644 index 0000000..6a8cd0e --- /dev/null +++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml @@ -0,0 +1,53 @@ + + + + + x86_64 + + + + + + + + + + 1048576 + 2048 + 4096 + 6144 + + + + + + + + + + + 2097152 + 4096 + 6144 + 8192 + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml = b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml new file mode 100644 index 0000000..4e46ead --- /dev/null +++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl-fake-feature.xml @@ -0,0 +1,73 @@ + + + + + x86_64 + + + + + + + + + + 1048576 + 2048 + 4096 + 6144 + + + + + + + + + + + 2097152 + 4096 + 6144 + 8192 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml b/tests/virca= ps2xmldata/vircaps-x86_64-resctrl.xml index 9b00cf0..a27b3e2 100644 --- a/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml +++ b/tests/vircaps2xmldata/vircaps-x86_64-resctrl.xml @@ -48,6 +48,9 @@ + + + @@ -56,6 +59,10 @@ + + + + =20 diff --git a/tests/vircaps2xmltest.c b/tests/vircaps2xmltest.c index 1fb8861..7f3c26a 100644 --- a/tests/vircaps2xmltest.c +++ b/tests/vircaps2xmltest.c @@ -111,9 +111,11 @@ mymain(void) DO_TEST_FULL("caches", VIR_ARCH_X86_64, true, true); =20 DO_TEST_FULL("resctrl", VIR_ARCH_X86_64, true, true); + DO_TEST_FULL("resctrl-cmt", VIR_ARCH_X86_64, true, true); DO_TEST_FULL("resctrl-cdp", VIR_ARCH_X86_64, true, true); DO_TEST_FULL("resctrl-skx", VIR_ARCH_X86_64, true, true); DO_TEST_FULL("resctrl-skx-twocaches", VIR_ARCH_X86_64, true, true); + DO_TEST_FULL("resctrl-fake-feature", VIR_ARCH_X86_64, true, true); =20 return ret; } --=20 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list