diff --git a/docs/schemas/capability.rng b/docs/schemas/capability.rng index d61515ccbe4be6bb26753bfef409c52cb8d16346..fe90a2e4c64aa6e82bcea6e1927239869ad6002e 100644 --- a/docs/schemas/capability.rng +++ b/docs/schemas/capability.rng @@ -316,6 +316,9 @@ + + + @@ -347,7 +350,7 @@ - + @@ -356,9 +359,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (llc_|mbm_)[a-zA-Z0-9\-_]+ + + + diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index f84d2553f9170b75750e4ea7ec90517a87d19164..ef4e5ff53dc7574d769b4e91a2d7cc1f02157f59 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -243,10 +243,12 @@ virCapsDispose(void *object) for (i = 0; i < caps->host.cache.nbanks; i++) virCapsHostCacheBankFree(caps->host.cache.banks[i]); + virResctrlInfoMonFree(caps->host.cache.monitor); VIR_FREE(caps->host.cache.banks); for (i = 0; i < caps->host.memBW.nnodes; i++) virCapsHostMemBWNodeFree(caps->host.memBW.nodes[i]); + virResctrlInfoMonFree(caps->host.memBW.monitor); VIR_FREE(caps->host.memBW.nodes); VIR_FREE(caps->host.netprefix); @@ -862,6 +864,50 @@ virCapabilitiesFormatNUMATopology(virBufferPtr buf, return 0; } + +static int +virCapabilitiesFormatResctrlMonitor(virBufferPtr buf, + virResctrlInfoMonPtr monitor) +{ + size_t i = 0; + virBuffer childrenBuf = VIR_BUFFER_INITIALIZER; + + /* monitor not supported, no capability */ + if (!monitor) + return 0; + + /* no feature found in monitor means no capability, return */ + if (monitor->nfeatures == 0) + return 0; + + virBufferAddLit(buf, "type == VIR_RESCTRL_MONITOR_TYPE_CACHE) + virBufferAsprintf(buf, + "level='%u' reuseThreshold='%u' ", + monitor->cache_level, + monitor->cache_reuse_threshold); + virBufferAsprintf(buf, + "maxMonitors='%u'>\n", + monitor->max_monitor); + + virBufferSetChildIndent(&childrenBuf, buf); + for (i = 0; i < monitor->nfeatures; i++) { + 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) @@ -949,6 +995,9 @@ virCapabilitiesFormatCaches(virBufferPtr buf, } } + if (virCapabilitiesFormatResctrlMonitor(buf, cache->monitor) < 0) + return -1; + virBufferAdjustIndent(buf, -2); virBufferAddLit(buf, "\n"); @@ -1000,6 +1049,9 @@ virCapabilitiesFormatMemoryBandwidth(virBufferPtr buf, } } + if (virCapabilitiesFormatResctrlMonitor(buf, memBW->monitor) < 0) + return -1; + virBufferAdjustIndent(buf, -2); virBufferAddLit(buf, "\n"); @@ -1659,6 +1711,8 @@ virCapabilitiesInitResctrlMemory(virCapsPtr caps) virCapsHostMemBWNodePtr node = NULL; size_t i = 0; int ret = -1; + const virResctrlMonitorType montype = VIR_RESCTRL_MONITOR_TYPE_MEMBW; + const char *prefix = virResctrlMonitorPrefixTypeToString(montype); for (i = 0; i < caps->host.cache.nbanks; i++) { virCapsHostCacheBankPtr bank = caps->host.cache.banks[i]; @@ -1680,6 +1734,10 @@ virCapabilitiesInitResctrlMemory(virCapsPtr caps) node = NULL; } + if (virResctrlInfoGetMonitorPrefix(caps->host.resctrl, prefix, + &caps->host.memBW.monitor) < 0) + goto cleanup; + ret = 0; cleanup: virCapsHostMemBWNodeFree(node); @@ -1699,6 +1757,8 @@ virCapabilitiesInitCaches(virCapsPtr caps) char *type = NULL; struct dirent *ent = NULL; virCapsHostCacheBankPtr bank = NULL; + const virResctrlMonitorType montype = VIR_RESCTRL_MONITOR_TYPE_CACHE; + const char *prefix = virResctrlMonitorPrefixTypeToString(montype); /* Minimum level to expose in capabilities. Can be lowered or removed (with * the appropriate code below), but should not be increased, because we'd @@ -1819,6 +1879,10 @@ virCapabilitiesInitCaches(virCapsPtr caps) if (virCapabilitiesInitResctrlMemory(caps) < 0) goto cleanup; + if (virResctrlInfoGetMonitorPrefix(caps->host.resctrl, prefix, + &caps->host.cache.monitor) < 0) + goto cleanup; + ret = 0; cleanup: VIR_FREE(type); diff --git a/src/conf/capabilities.h b/src/conf/capabilities.h index 694fd6b0bb0aa0841e1c3681c3023dfecbb0cb51..45b331a7beba023cb0b271571c2d027249f1ddb8 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; }; typedef struct _virCapsHostMemBWNode virCapsHostMemBWNode; @@ -171,6 +173,8 @@ typedef virCapsHostMemBW *virCapsHostMemBWPtr; struct _virCapsHostMemBW { size_t nnodes; virCapsHostMemBWNodePtr *nodes; + + virResctrlInfoMonPtr monitor; }; typedef struct _virCapsHost virCapsHost; diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index b9dabfef1bce7f079f898dbe325e31d3412e1af0..36a15ada4be680a797195f9275895c261d227e69 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -2668,6 +2668,8 @@ virResctrlAllocSetCacheSize; virResctrlAllocSetID; virResctrlAllocSetMemoryBandwidth; virResctrlInfoGetCache; +virResctrlInfoGetMonitorPrefix; +virResctrlInfoMonFree; virResctrlInfoNew; diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c index 99cbe61447e9c8b300da1393ec7e709aeb15e46f..eddcc41b672c7f3ce86779cb7988dd10c678d9bc 100644 --- a/src/util/virresctrl.c +++ b/src/util/virresctrl.c @@ -70,6 +70,12 @@ VIR_ENUM_IMPL(virResctrl, VIR_CACHE_TYPE_LAST, "CODE", "DATA") +/* Monitor feature name prefix mapping for monitor naming */ +VIR_ENUM_IMPL(virResctrlMonitorPrefix, VIR_RESCTRL_MONITOR_TYPE_LAST, + "__unsupported__", + "llc_", + "mbm_") + /* All private typedefs so that they exist for all later definitions. This way * structs can be included in one or another without reorganizing the code every @@ -207,6 +213,17 @@ virResctrlInfoDispose(void *obj) } +void +virResctrlInfoMonFree(virResctrlInfoMonPtr mon) +{ + if (!mon) + return; + + virStringListFree(mon->features); + VIR_FREE(mon); +} + + /* virResctrlAlloc */ /* @@ -853,6 +870,99 @@ virResctrlInfoGetCache(virResctrlInfoPtr resctrl, } +/* virResctrlInfoGetMonitorPrefix + * + * @resctrl: Pointer to virResctrlInfo + * @prefix: Monitor prefix name for monitor looking for. + * @monitor: Returns the capability information for target monitor if the + * monitor with @prefex is supported by host. + * + * Return monitor capability information for @prefix through @monitor. + * If monitor with @prefix is not supported in system, @monitor will be + * cleared to NULL. + * + * Returns 0 if @monitor is created or monitor type with @prefix is not + * supported by host, -1 on failure with error message set. + */ +int +virResctrlInfoGetMonitorPrefix(virResctrlInfoPtr resctrl, + const char *prefix, + virResctrlInfoMonPtr *monitor) +{ + size_t i = 0; + virResctrlInfoMongrpPtr mongrp_info = NULL; + virResctrlInfoMonPtr mon = NULL; + int ret = -1; + + if (!prefix) { + virReportError(VIR_ERR_INTERNAL_ERROR, "%s", + _("Empty prefix name for resctrl monitor")); + return -1; + } + + if (virResctrlInfoIsEmpty(resctrl)) + return 0; + + mongrp_info = resctrl->monitor_info; + + if (!mongrp_info) { + VIR_INFO("Monitor is not supported in host"); + return 0; + } + + for (i = 0; i < VIR_RESCTRL_MONITOR_TYPE_LAST; i++) { + if (STREQ(prefix, virResctrlMonitorPrefixTypeToString(i))) { + if (VIR_ALLOC(mon) < 0) + goto cleanup; + mon->type = i; + break; + } + } + + if (!mon) { + virReportError(VIR_ERR_INTERNAL_ERROR, + _("Bad prefix name '%s' for resctrl monitor"), + prefix); + return -1; + } + + mon->max_monitor = mongrp_info->max_monitor; + + if (mon->type == VIR_RESCTRL_MONITOR_TYPE_CACHE) { + mon->cache_reuse_threshold = mongrp_info->cache_reuse_threshold; + mon->cache_level = mongrp_info->cache_level; + } + + for (i = 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 = 0; + + /* In case *monitor is pointed to some monitor, clean it. */ + virResctrlInfoMonFree(*monitor); + + if (mon->nfeatures == 0) { + /* No feature found for current monitor, means host does not support + * monitor type with @prefix name. + * Telling caller this monitor is supported by hardware specification, + * but not supported by this host. */ + VIR_INFO("No resctrl monitor features using prefix '%s' found", prefix); + goto cleanup; + } + + 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 cfd56ddd067fc325f98162c81bf2b2346afd9a94..10505e9c4e8026b98cc8fdc4bfb5f7556e4407ed 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); +typedef enum { + VIR_RESCTRL_MONITOR_TYPE_UNSUPPORT, + VIR_RESCTRL_MONITOR_TYPE_CACHE, + VIR_RESCTRL_MONITOR_TYPE_MEMBW, + + VIR_RESCTRL_MONITOR_TYPE_LAST +} virResctrlMonitorType; + +VIR_ENUM_DECL(virResctrlMonitorPrefix); + typedef struct _virResctrlInfoPerCache virResctrlInfoPerCache; typedef virResctrlInfoPerCache *virResctrlInfoPerCachePtr; @@ -61,6 +71,29 @@ struct _virResctrlInfoMemBWPerNode { unsigned int max_allocation; }; +typedef struct _virResctrlInfoMon virResctrlInfoMon; +typedef virResctrlInfoMon *virResctrlInfoMonPtr; +struct _virResctrlInfoMon { + /* 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 */ + virResctrlMonitorType type; + /* 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 this + * 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; +}; + typedef struct _virResctrlInfo virResctrlInfo; typedef virResctrlInfo *virResctrlInfoPtr; @@ -145,4 +178,11 @@ virResctrlAllocAddPID(virResctrlAllocPtr alloc, int virResctrlAllocRemove(virResctrlAllocPtr alloc); +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/max_threshold_occupancy b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/max_threshold_occupancy new file mode 100644 index 0000000000000000000000000000000000000000..77f05e25725893f11d84dc73101ae48b584b91cc --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/max_threshold_occupancy @@ -0,0 +1 @@ +270336 diff --git a/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/mon_features b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/mon_features new file mode 100644 index 0000000000000000000000000000000000000000..8467d9098566f75989996b5ee4c4c50b75599188 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/mon_features @@ -0,0 +1 @@ +llc_occupancy diff --git a/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/num_rmids b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/info/L3_MON/num_rmids new file mode 100644 index 0000000000000000000000000000000000000000..1057e9a27306e3e5567c601c522f00dc5ed6698e --- /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 0000000000000000000000000000000000000000..8f087a34c80c2123f05aae01e910c871b9e23773 --- /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/schemata b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualres/schemata new file mode 100644 index 0000000000000000000000000000000000000000..e499ef75baaf41693b55a009e5a55a5d3fe75a1e --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualres/schemata @@ -0,0 +1 @@ +L3:0=e0000;1=e0000 diff --git a/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualres/tasks b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/manualres/tasks new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/schemata b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/schemata new file mode 100644 index 0000000000000000000000000000000000000000..78d2d8a9b826e30a46b12addd254a70d804f4177 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-cmt/resctrl/schemata @@ -0,0 +1 @@ + L3:0=1ff00;1=1ff0f diff --git a/tests/vircaps2xmldata/linux-resctrl-cmt/system b/tests/vircaps2xmldata/linux-resctrl-cmt/system new file mode 120000 index 0000000000000000000000000000000000000000..5607d59fe4cc9c2126bc293679d73c416d4c5bfa --- /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 0000000000000000000000000000000000000000..78031dae83bfe3e99852a1c6ac48416fe794a0fc --- /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 0000000000000000000000000000000000000000..0cfbf08886fca9a91cb753ec8734c84fcbe52c9f --- /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/info/L3/num_closids new file mode 100644 index 0000000000000000000000000000000000000000..b8626c4cff2849624fb67f87cd0ad72b163671ad --- /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-feature/resctrl/info/L3_MON/max_threshold_occupancy new file mode 100644 index 0000000000000000000000000000000000000000..77f05e25725893f11d84dc73101ae48b584b91cc --- /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/resctrl/info/L3_MON/mon_features new file mode 100644 index 0000000000000000000000000000000000000000..337cfa2a5e787c84ccbd144754eed51aaafd64df --- /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 0000000000000000000000000000000000000000..1057e9a27306e3e5567c601c522f00dc5ed6698e --- /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/resctrl/info/MB/bandwidth_gran new file mode 100644 index 0000000000000000000000000000000000000000..f599e28b8ab0d8c9c57a486c89c4a5132dcbd3b2 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/info/MB/bandwidth_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 0000000000000000000000000000000000000000..f599e28b8ab0d8c9c57a486c89c4a5132dcbd3b2 --- /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/info/MB/num_closids new file mode 100644 index 0000000000000000000000000000000000000000..b8626c4cff2849624fb67f87cd0ad72b163671ad --- /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/manualres/cpus b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manualres/cpus new file mode 100644 index 0000000000000000000000000000000000000000..8f087a34c80c2123f05aae01e910c871b9e23773 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manualres/cpus @@ -0,0 +1 @@ +000 diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manualres/schemata b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manualres/schemata new file mode 100644 index 0000000000000000000000000000000000000000..e499ef75baaf41693b55a009e5a55a5d3fe75a1e --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manualres/schemata @@ -0,0 +1 @@ +L3:0=e0000;1=e0000 diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manualres/tasks b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/manualres/tasks new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/schemata b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/schemata new file mode 100644 index 0000000000000000000000000000000000000000..78d2d8a9b826e30a46b12addd254a70d804f4177 --- /dev/null +++ b/tests/vircaps2xmldata/linux-resctrl-fake-feature/resctrl/schemata @@ -0,0 +1 @@ + L3:0=1ff00;1=1ff0f diff --git a/tests/vircaps2xmldata/linux-resctrl-fake-feature/system b/tests/vircaps2xmldata/linux-resctrl-fake-feature/system new file mode 120000 index 0000000000000000000000000000000000000000..5607d59fe4cc9c2126bc293679d73c416d4c5bfa --- /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_threshold_occupancy b/tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/max_threshold_occupancy new file mode 100644 index 0000000000000000000000000000000000000000..77f05e25725893f11d84dc73101ae48b584b91cc --- /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_features b/tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/mon_features new file mode 100644 index 0000000000000000000000000000000000000000..0c57b8d88cd222717967eb77a8175be05fb574d4 --- /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_rmids b/tests/vircaps2xmldata/linux-resctrl/resctrl/info/L3_MON/num_rmids new file mode 100644 index 0000000000000000000000000000000000000000..1057e9a27306e3e5567c601c522f00dc5ed6698e --- /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/vircaps2xmldata/vircaps-x86_64-resctrl-cmt.xml new file mode 100644 index 0000000000000000000000000000000000000000..6a8cd0e9094dcab30567f574e5586156010417c2 --- /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 0000000000000000000000000000000000000000..4e46ead6166dec3b2ceaf923b307544178626402 --- /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/vircaps2xmldata/vircaps-x86_64-resctrl.xml index 9b00cf099571f7061039def4feea77767ed3a08d..a27b3e247e35c18a99122ec3664c036de1a8b588 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 @@ + + + + diff --git a/tests/vircaps2xmltest.c b/tests/vircaps2xmltest.c index 0a72bb77ebdb1222fedc2b56b7367182e7d5dadd..96e5a07555c456608117685e26a8cc43e9e04e74 100644 --- a/tests/vircaps2xmltest.c +++ b/tests/vircaps2xmltest.c @@ -110,9 +110,11 @@ mymain(void) DO_TEST_FULL("caches", VIR_ARCH_X86_64, true, true); 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); return ret; }