mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
conf: showing cache/memoryBW monitor features in capabilities
We learned that the hardware features of CAT, CMT, MBA and MBM are orthogonal ones, if CAT or MBA is not supported in system, but CMT or MBM are supported, then the cache monitor or memoryBW monitor features may not be correctly displayed in host capabilities through command 'virsh capabilites'. Showing the cache/memoryBW monitor capabilities even there is no support of cache allocation or memoryBW allocation features. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Huaqiang <huaqiang.wang@intel.com>
This commit is contained in:
parent
20071c9f99
commit
d0431255aa
@ -970,7 +970,7 @@ virCapabilitiesFormatCaches(virBufferPtr buf,
|
||||
size_t i = 0;
|
||||
size_t j = 0;
|
||||
|
||||
if (!cache->nbanks)
|
||||
if (!cache->nbanks && !cache->monitor)
|
||||
return 0;
|
||||
|
||||
virBufferAddLit(buf, "<cache>\n");
|
||||
@ -1055,7 +1055,7 @@ virCapabilitiesFormatMemoryBandwidth(virBufferPtr buf,
|
||||
{
|
||||
size_t i = 0;
|
||||
|
||||
if (!memBW->nnodes)
|
||||
if (!memBW->nnodes && !memBW->monitor)
|
||||
return 0;
|
||||
|
||||
virBufferAddLit(buf, "<memory_bandwidth>\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user