conf: Introduce virCapabilitiesHostNUMAGetMaxNode()

This is just a small helper that will be used later.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
Michal Privoznik 2021-08-19 15:21:41 +02:00
parent 406a6c20a8
commit 20816cbda5
3 changed files with 12 additions and 0 deletions

View File

@ -1433,6 +1433,15 @@ virCapabilitiesHostNUMAGetCpus(virCapsHostNUMA *caps,
} }
int
virCapabilitiesHostNUMAGetMaxNode(virCapsHostNUMA *caps)
{
virCapsHostNUMACell *cell = g_ptr_array_index(caps->cells, caps->cells->len - 1);
return cell->num;
}
int int
virCapabilitiesGetNodeInfo(virNodeInfoPtr nodeinfo) virCapabilitiesGetNodeInfo(virNodeInfoPtr nodeinfo)
{ {

View File

@ -328,6 +328,8 @@ virCapabilitiesFormatXML(virCaps *caps);
virBitmap *virCapabilitiesHostNUMAGetCpus(virCapsHostNUMA *caps, virBitmap *virCapabilitiesHostNUMAGetCpus(virCapsHostNUMA *caps,
virBitmap *nodemask); virBitmap *nodemask);
int virCapabilitiesHostNUMAGetMaxNode(virCapsHostNUMA *caps);
int virCapabilitiesGetNodeInfo(virNodeInfoPtr nodeinfo); int virCapabilitiesGetNodeInfo(virNodeInfoPtr nodeinfo);
int virCapabilitiesInitPages(virCaps *caps); int virCapabilitiesInitPages(virCaps *caps);

View File

@ -69,6 +69,7 @@ virCapabilitiesGetNodeInfo;
virCapabilitiesHostInitIOMMU; virCapabilitiesHostInitIOMMU;
virCapabilitiesHostNUMAAddCell; virCapabilitiesHostNUMAAddCell;
virCapabilitiesHostNUMAGetCpus; virCapabilitiesHostNUMAGetCpus;
virCapabilitiesHostNUMAGetMaxNode;
virCapabilitiesHostNUMANew; virCapabilitiesHostNUMANew;
virCapabilitiesHostNUMANewHost; virCapabilitiesHostNUMANewHost;
virCapabilitiesHostNUMARef; virCapabilitiesHostNUMARef;