virNodeGetInfo can return a synthetic CPU topology when the Linux topology consistency check fails. Callers cannot distinguish this result from a real single-node topology. Introduce virNodeGetInfoWithFlags and the VIR_NODE_INFO_TOPOLOGY_FALLBACK result flag to expose this distinction without changing virNodeInfo or the existing RPC reply. Propagate the fallback indicator through the host CPU helpers and add QEMU driver support, a separate remote procedure, and API documentation. Extend the host CPU tests to check the indicator for normal and fallback topology results. Assisted-by: Codex:gpt-6-astra Signed-off-by: Partha Sarathi Satapathy <partha.satapathy@oracle.com> --- include/libvirt/libvirt-host.h | 16 ++++++++ src/conf/capabilities.c | 18 ++++++++- src/conf/capabilities.h | 2 + src/driver-hypervisor.h | 7 ++++ src/libvirt-host.c | 57 +++++++++++++++++++++++++++ src/libvirt_private.syms | 1 + src/libvirt_public.syms | 5 +++ src/qemu/qemu_driver.c | 16 ++++++++ src/remote/remote_daemon_dispatch.c | 37 ++++++++++++++++++ src/remote/remote_driver.c | 34 ++++++++++++++++ src/remote/remote_protocol.x | 18 ++++++++- src/remote_protocol-structs | 8 ++++ src/util/virhostcpu.c | 16 ++++++-- src/util/virhostcpu.h | 3 +- src/util/virhostcpupriv.h | 3 +- tests/virhostcputest.c | 60 +++++++++++++++++------------ 16 files changed, 270 insertions(+), 31 deletions(-) diff --git a/include/libvirt/libvirt-host.h b/include/libvirt/libvirt-host.h index 5b448e7954f9..c4c8cf0d1539 100644 --- a/include/libvirt/libvirt-host.h +++ b/include/libvirt/libvirt-host.h @@ -896,6 +896,22 @@ int virConnectGetMaxVcpus (virConnectPtr conn, const char *type); int virNodeGetInfo (virConnectPtr conn, virNodeInfoPtr info); +/** + * virNodeInfoResultFlags: + * + * Result flags returned by virNodeGetInfoWithFlags(). + * + * Since: 12.9.0 + */ +typedef enum { + VIR_NODE_INFO_TOPOLOGY_FALLBACK = (1U << 0), /* Synthetic topology reported (Since: 12.9.0) */ +} virNodeInfoResultFlags; + +int virNodeGetInfoWithFlags(virConnectPtr conn, + virNodeInfoPtr info, + unsigned int *resultFlags, + unsigned int flags); + char * virConnectGetCapabilities (virConnectPtr conn); int virNodeGetCPUStats (virConnectPtr conn, diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c index e83de6d1bcfe..03fab1fa16db 100644 --- a/src/conf/capabilities.c +++ b/src/conf/capabilities.c @@ -1450,10 +1450,22 @@ virCapabilitiesHostNUMAGetMaxNode(virCapsHostNUMA *caps) int virCapabilitiesGetNodeInfo(virNodeInfoPtr nodeinfo) { + unsigned int resultFlags; + + return virCapabilitiesGetNodeInfoWithFlags(nodeinfo, &resultFlags); +} + + +int +virCapabilitiesGetNodeInfoWithFlags(virNodeInfoPtr nodeinfo, + unsigned int *resultFlags) +{ + bool topologyFallback = false; virArch hostarch = virArchFromHost(); unsigned long long memorybytes; memset(nodeinfo, 0, sizeof(*nodeinfo)); + *resultFlags = 0; if (virStrcpyStatic(nodeinfo->model, virArchToString(hostarch)) < 0) return -1; @@ -1465,9 +1477,13 @@ virCapabilitiesGetNodeInfo(virNodeInfoPtr nodeinfo) if (virHostCPUGetInfo(hostarch, &nodeinfo->cpus, &nodeinfo->mhz, &nodeinfo->nodes, &nodeinfo->sockets, - &nodeinfo->cores, &nodeinfo->threads) < 0) + &nodeinfo->cores, &nodeinfo->threads, + &topologyFallback) < 0) return -1; + if (topologyFallback) + *resultFlags |= VIR_NODE_INFO_TOPOLOGY_FALLBACK; + return 0; } diff --git a/src/conf/capabilities.h b/src/conf/capabilities.h index 0482e4297a28..ccc833bba4fa 100644 --- a/src/conf/capabilities.h +++ b/src/conf/capabilities.h @@ -339,6 +339,8 @@ virBitmap *virCapabilitiesHostNUMAGetCpus(virCapsHostNUMA *caps, int virCapabilitiesHostNUMAGetMaxNode(virCapsHostNUMA *caps); int virCapabilitiesGetNodeInfo(virNodeInfoPtr nodeinfo); +int virCapabilitiesGetNodeInfoWithFlags(virNodeInfoPtr nodeinfo, + unsigned int *resultFlags); int virCapabilitiesInitPages(virCaps *caps); diff --git a/src/driver-hypervisor.h b/src/driver-hypervisor.h index 0add95de9671..57bcecb43945 100644 --- a/src/driver-hypervisor.h +++ b/src/driver-hypervisor.h @@ -75,6 +75,12 @@ typedef int (*virDrvNodeGetInfo)(virConnectPtr conn, virNodeInfoPtr info); +typedef int +(*virDrvNodeGetInfoWithFlags)(virConnectPtr conn, + virNodeInfoPtr info, + unsigned int *resultFlags, + unsigned int flags); + typedef char * (*virDrvConnectGetCapabilities)(virConnectPtr conn); @@ -1507,6 +1513,7 @@ struct _virHypervisorDriver { virDrvConnectGetSysinfo connectGetSysinfo; virDrvConnectGetMaxVcpus connectGetMaxVcpus; virDrvNodeGetInfo nodeGetInfo; + virDrvNodeGetInfoWithFlags nodeGetInfoWithFlags; virDrvConnectGetCapabilities connectGetCapabilities; virDrvConnectListDomains connectListDomains; virDrvConnectNumOfDomains connectNumOfDomains; diff --git a/src/libvirt-host.c b/src/libvirt-host.c index 6b4345b09d1f..11b2eae23f5a 100644 --- a/src/libvirt-host.c +++ b/src/libvirt-host.c @@ -421,6 +421,8 @@ virConnectGetMaxVcpus(virConnectPtr conn, * can't faithfully represent the system. In such cases a fake topology * (nodes = 1, sockets = 1, cores = number of host cpus, threads = 1) which * only correctly represents the total host CPU count is reported. + * Use virNodeGetInfoWithFlags() to determine whether the Linux topology + * consistency check selected synthetic topology. * * Applications are recommended to use the virConnectGetCapabilities() * call instead, which provides all the information except CPU frequency, @@ -456,6 +458,61 @@ virNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info) } +/** + * virNodeGetInfoWithFlags: + * @conn: pointer to the hypervisor connection + * @info: pointer to a virNodeInfo structure allocated by the user + * @resultFlags: pointer to receive a bitwise OR of virNodeInfoResultFlags + * @flags: extra flags; not used yet, so callers must always pass 0 + * + * Extract hardware information about the node, as virNodeGetInfo() does, + * and report whether the Linux topology consistency check substituted + * synthetic topology via VIR_NODE_INFO_TOPOLOGY_FALLBACK in @resultFlags. + * A real single-node host does not by itself set this bit. Neither CPU + * online state nor detailed topology should be inferred from this bit; + * use virNodeGetCPUMap() and virConnectGetCapabilities() for those details. + * + * Both output pointers must be non-NULL. Outputs are valid only on success. + * Drivers or remote daemons without support return an error; callers must + * not interpret an unsupported operation as evidence of real topology. + * + * Returns 0 in case of success and -1 in case of failure. + * + * Since: 12.9.0 + */ +int +virNodeGetInfoWithFlags(virConnectPtr conn, + virNodeInfoPtr info, + unsigned int *resultFlags, + unsigned int flags) +{ + VIR_DEBUG("conn=%p, info=%p, resultFlags=%p, flags=0x%x", + conn, info, resultFlags, flags); + + virResetLastError(); + virCheckConnectReturn(conn, -1); + virCheckNonNullArgGoto(info, error); + virCheckNonNullArgGoto(resultFlags, error); + + if (flags) { + virReportInvalidArg(flags, _("unsupported flags (0x%1$x)"), flags); + goto error; + } + + *resultFlags = 0; + if (conn->driver->nodeGetInfoWithFlags) { + if (conn->driver->nodeGetInfoWithFlags(conn, info, resultFlags, flags) < 0) + goto error; + return 0; + } + + virReportUnsupportedError(); + error: + virDispatchError(conn); + return -1; +} + + /** * virConnectGetCapabilities: * @conn: pointer to the hypervisor connection diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms index 798d2d28c893..ea78251daf36 100644 --- a/src/libvirt_private.syms +++ b/src/libvirt_private.syms @@ -65,6 +65,7 @@ virCapabilitiesDomainSupported; virCapabilitiesFormatXML; virCapabilitiesFreeGuest; virCapabilitiesGetNodeInfo; +virCapabilitiesGetNodeInfoWithFlags; virCapabilitiesHostInitIOMMU; virCapabilitiesHostNUMAAddCell; virCapabilitiesHostNUMAGetCpus; diff --git a/src/libvirt_public.syms b/src/libvirt_public.syms index 64ed641b7f1b..f88f7f1f24ad 100644 --- a/src/libvirt_public.syms +++ b/src/libvirt_public.syms @@ -961,4 +961,9 @@ LIBVIRT_12.5.0 { virDomainAnnounceInterface; } LIBVIRT_11.2.0; +LIBVIRT_12.9.0 { + global: + virNodeGetInfoWithFlags; +} LIBVIRT_12.5.0; + # .... define new API here using predicted next version number .... diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 59220658972e..f62fe6dabe50 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -16742,6 +16742,21 @@ qemuNodeGetInfo(virConnectPtr conn, } +static int +qemuNodeGetInfoWithFlags(virConnectPtr conn, + virNodeInfoPtr nodeinfo, + unsigned int *resultFlags, + unsigned int flags) +{ + virCheckFlags(0, -1); + + if (virNodeGetInfoWithFlagsEnsureACL(conn) < 0) + return -1; + + return virCapabilitiesGetNodeInfoWithFlags(nodeinfo, resultFlags); +} + + static int qemuNodeGetCPUStats(virConnectPtr conn, int cpuNum, @@ -21148,6 +21163,7 @@ static virHypervisorDriver qemuHypervisorDriver = { .connectGetSysinfo = qemuConnectGetSysinfo, /* 0.8.8 */ .connectGetMaxVcpus = qemuConnectGetMaxVcpus, /* 0.2.1 */ .nodeGetInfo = qemuNodeGetInfo, /* 0.2.0 */ + .nodeGetInfoWithFlags = qemuNodeGetInfoWithFlags, /* 12.9.0 */ .connectGetCapabilities = qemuConnectGetCapabilities, /* 0.2.1 */ .connectListDomains = qemuConnectListDomains, /* 0.2.0 */ .connectNumOfDomains = qemuConnectNumOfDomains, /* 0.2.0 */ diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index e54843825086..6dbd8d03a585 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -2808,6 +2808,43 @@ remoteDispatchDomainGetSecurityLabelList(virNetServer *server G_GNUC_UNUSED, return rv; } +static int +remoteDispatchNodeGetInfoWithFlags(virNetServer *server G_GNUC_UNUSED, + virNetServerClient *client, + virNetMessage *msg G_GNUC_UNUSED, + struct virNetMessageError *rerr, + remote_node_get_info_with_flags_args *args, + remote_node_get_info_with_flags_ret *ret) +{ + virNodeInfo info = {0}; + unsigned int resultFlags = 0; + virConnectPtr conn = remoteGetHypervisorConn(client); + int rv = -1; + + if (!conn) + goto cleanup; + + if (virNodeGetInfoWithFlags(conn, &info, &resultFlags, args->flags) < 0) + goto cleanup; + + memcpy(ret->info.model, info.model, sizeof(ret->info.model)); + ret->info.memory = info.memory; + ret->info.cpus = info.cpus; + ret->info.mhz = info.mhz; + ret->info.nodes = info.nodes; + ret->info.sockets = info.sockets; + ret->info.cores = info.cores; + ret->info.threads = info.threads; + ret->resultFlags = resultFlags; + rv = 0; + + cleanup: + if (rv < 0) + virNetMessageSaveError(rerr); + return rv; +} + + static int remoteDispatchNodeGetSecurityModel(virNetServer *server G_GNUC_UNUSED, virNetServerClient *client, diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 5c358d58c47e..e07d4c06c5d1 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -6305,6 +6305,39 @@ remoteDomainGetInterfaceParameters(virDomainPtr domain, } +static int +remoteNodeGetInfoWithFlags(virConnectPtr conn, + virNodeInfoPtr info, + unsigned int *resultFlags, + unsigned int flags) +{ + remote_node_get_info_with_flags_args args = {0}; + remote_node_get_info_with_flags_ret ret = {0}; + struct private_data *priv = conn->privateData; + VIR_LOCK_GUARD lock = remoteDriverLock(priv); + + args.flags = flags; + if (call(conn, priv, 0, REMOTE_PROC_NODE_GET_INFO_WITH_FLAGS, + (xdrproc_t) xdr_remote_node_get_info_with_flags_args, (char *) &args, + (xdrproc_t) xdr_remote_node_get_info_with_flags_ret, (char *) &ret) == -1) + goto cleanup; + + memcpy(info->model, ret.info.model, sizeof(info->model)); + HYPER_TO_ULONG(info->memory, ret.info.memory); + info->cpus = ret.info.cpus; + info->mhz = ret.info.mhz; + info->nodes = ret.info.nodes; + info->sockets = ret.info.sockets; + info->cores = ret.info.cores; + info->threads = ret.info.threads; + *resultFlags = ret.resultFlags; + return 0; + + cleanup: + return -1; +} + + static int remoteNodeGetMemoryParameters(virConnectPtr conn, virTypedParameterPtr params, @@ -7776,6 +7809,7 @@ static virHypervisorDriver hypervisor_driver = { .connectGetSysinfo = remoteConnectGetSysinfo, /* 0.8.8 */ .connectGetMaxVcpus = remoteConnectGetMaxVcpus, /* 0.3.0 */ .nodeGetInfo = remoteNodeGetInfo, /* 0.3.0 */ + .nodeGetInfoWithFlags = remoteNodeGetInfoWithFlags, /* 12.9.0 */ .connectGetCapabilities = remoteConnectGetCapabilities, /* 0.3.0 */ .connectListDomains = remoteConnectListDomains, /* 0.3.0 */ .connectNumOfDomains = remoteConnectNumOfDomains, /* 0.3.0 */ diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 32185fde2fab..9befc41c558d 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote/remote_protocol.x @@ -556,6 +556,15 @@ struct remote_node_get_info_ret { /* insert@1 */ int threads; }; +struct remote_node_get_info_with_flags_args { + unsigned int flags; +}; + +struct remote_node_get_info_with_flags_ret { + remote_node_get_info_ret info; + unsigned int resultFlags; +}; + struct remote_connect_get_capabilities_ret { remote_nonnull_string capabilities; }; @@ -7163,5 +7172,12 @@ enum remote_procedure { * @generate: both * @acl: domain:write */ - REMOTE_PROC_DOMAIN_ANNOUNCE_INTERFACE = 456 + REMOTE_PROC_DOMAIN_ANNOUNCE_INTERFACE = 456, + + /** + * @generate: none + * @priority: high + * @acl: connect:read + */ + REMOTE_PROC_NODE_GET_INFO_WITH_FLAGS = 457 }; diff --git a/src/remote_protocol-structs b/src/remote_protocol-structs index 6093a85c9844..e2df42f1dfcb 100644 --- a/src/remote_protocol-structs +++ b/src/remote_protocol-structs @@ -148,6 +148,13 @@ struct remote_node_get_info_ret { int cores; int threads; }; +struct remote_node_get_info_with_flags_args { + u_int flags; +}; +struct remote_node_get_info_with_flags_ret { + remote_node_get_info_ret info; + u_int resultFlags; +}; struct remote_connect_get_capabilities_ret { remote_nonnull_string capabilities; }; @@ -3815,4 +3822,5 @@ enum remote_procedure { REMOTE_PROC_DOMAIN_EVENT_VCPU_REMOVED = 454, REMOTE_PROC_DOMAIN_EVENT_CALLBACK_CHANNEL_LIFECYCLE = 455, REMOTE_PROC_DOMAIN_ANNOUNCE_INTERFACE = 456, + REMOTE_PROC_NODE_GET_INFO_WITH_FLAGS = 457, }; diff --git a/src/util/virhostcpu.c b/src/util/virhostcpu.c index a428b0d9e6ca..8ed7f4e23620 100644 --- a/src/util/virhostcpu.c +++ b/src/util/virhostcpu.c @@ -660,7 +660,8 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo, unsigned int *nodes, unsigned int *sockets, unsigned int *cores, - unsigned int *threads) + unsigned int *threads, + bool *topologyFallback) { g_autoptr(virBitmap) present_cpus_map = NULL; g_autoptr(virBitmap) online_cpus_map = NULL; @@ -673,6 +674,7 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo, g_autofree char *sysfs_cpudir_fallback = NULL; int direrr; + *topologyFallback = false; *mhz = 0; *cpus = *nodes = *sockets = *cores = *threads = 0; @@ -812,6 +814,7 @@ virHostCPUGetInfoPopulateLinux(FILE *cpuinfo, *sockets * *cores * *threads) != (*cpus + offline)) { + *topologyFallback = true; *nodes = 1; *sockets = 1; *cores = *cpus + offline; @@ -951,12 +954,15 @@ virHostCPUGetInfo(virArch hostarch G_GNUC_UNUSED, unsigned int *nodes G_GNUC_UNUSED, unsigned int *sockets G_GNUC_UNUSED, unsigned int *cores G_GNUC_UNUSED, - unsigned int *threads G_GNUC_UNUSED) + unsigned int *threads G_GNUC_UNUSED, + bool *topologyFallback) { #ifdef __linux__ int ret = -1; FILE *cpuinfo = fopen(CPUINFO_PATH, "r"); + *topologyFallback = false; + if (!cpuinfo) { virReportSystemError(errno, _("cannot open %1$s"), CPUINFO_PATH); @@ -965,7 +971,7 @@ virHostCPUGetInfo(virArch hostarch G_GNUC_UNUSED, ret = virHostCPUGetInfoPopulateLinux(cpuinfo, hostarch, cpus, mhz, nodes, - sockets, cores, threads); + sockets, cores, threads, topologyFallback); if (ret < 0) goto cleanup; @@ -976,6 +982,8 @@ virHostCPUGetInfo(virArch hostarch G_GNUC_UNUSED, unsigned long cpu_freq; size_t cpu_freq_len = sizeof(cpu_freq); + *topologyFallback = false; + *cpus = virHostCPUGetCountAppleFreeBSD(); if (*cpus == -1) return -1; @@ -1032,6 +1040,8 @@ virHostCPUGetInfo(virArch hostarch G_GNUC_UNUSED, return 0; #else + *topologyFallback = false; + /* XXX Solaris will need an impl later if they port QEMU driver */ virReportError(VIR_ERR_NO_SUPPORT, "%s", _("node info not implemented on this platform")); diff --git a/src/util/virhostcpu.h b/src/util/virhostcpu.h index 7aa02b35aa5a..9ed1d888a5ca 100644 --- a/src/util/virhostcpu.h +++ b/src/util/virhostcpu.h @@ -55,7 +55,8 @@ int virHostCPUGetInfo(virArch hostarch, unsigned int *nodes, unsigned int *sockets, unsigned int *cores, - unsigned int *threads); + unsigned int *threads, + bool *topologyFallback); int virHostCPUGetKVMMaxVCPUs(void) ATTRIBUTE_MOCKABLE; diff --git a/src/util/virhostcpupriv.h b/src/util/virhostcpupriv.h index f7b1e7c93c95..3033f6d26efa 100644 --- a/src/util/virhostcpupriv.h +++ b/src/util/virhostcpupriv.h @@ -35,7 +35,8 @@ int virHostCPUGetInfoPopulateLinux(FILE *cpuinfo, unsigned int *nodes, unsigned int *sockets, unsigned int *cores, - unsigned int *threads); + unsigned int *threads, + bool *topologyFallback); int virHostCPUGetStatsLinux(FILE *procstat, int cpuNum, diff --git a/tests/virhostcputest.c b/tests/virhostcputest.c index e362ee8d39e8..ce9c95cac961 100644 --- a/tests/virhostcputest.c +++ b/tests/virhostcputest.c @@ -27,10 +27,12 @@ main(void) static int linuxTestCompareFiles(const char *cpuinfofile, virArch arch, - const char *outputfile) + const char *outputfile, + int expectedFallback) { g_autofree char *actualData = NULL; virNodeInfo nodeinfo = { 0 }; + bool topologyFallback = true; g_autoptr(FILE) cpuinfo = NULL; cpuinfo = fopen(cpuinfofile, "r"); @@ -43,7 +45,8 @@ linuxTestCompareFiles(const char *cpuinfofile, if (virHostCPUGetInfoPopulateLinux(cpuinfo, arch, &nodeinfo.cpus, &nodeinfo.mhz, &nodeinfo.nodes, &nodeinfo.sockets, - &nodeinfo.cores, &nodeinfo.threads) < 0) { + &nodeinfo.cores, &nodeinfo.threads, + &topologyFallback) < 0) { if (virTestGetDebug()) { if (virGetLastErrorCode()) VIR_TEST_DEBUG("\n%s", virGetLastErrorMessage()); @@ -51,6 +54,13 @@ linuxTestCompareFiles(const char *cpuinfofile, return -1; } + if (expectedFallback >= 0 && + topologyFallback != !!expectedFallback) { + fprintf(stderr, "Unexpected topology fallback flag: %d (expected %d)\n", + topologyFallback, expectedFallback); + return -1; + } + actualData = g_strdup_printf("CPUs: %u/%u, MHz: %u, Nodes: %u, Sockets: %u, " "Cores: %u, Threads: %u\n", nodeinfo.cpus, VIR_NODEINFO_MAXCPUS(nodeinfo), @@ -148,6 +158,7 @@ linuxCPUStatsCompareFiles(const char *cpustatfile, struct linuxTestHostCPUData { const char *testName; virArch arch; + int expectedFallback; /* -1 skips the explicit flag assertion */ }; static int @@ -168,7 +179,8 @@ linuxTestHostCPU(const void *opaque) abs_srcdir, archStr, data->testName); virFileWrapperAddPrefix(SYSFS_SYSTEM_PATH, sysfs_prefix); - result = linuxTestCompareFiles(cpuinfo, data->arch, output); + result = linuxTestCompareFiles(cpuinfo, data->arch, output, + data->expectedFallback); virFileWrapperRemovePrefix(SYSFS_SYSTEM_PATH); return result; @@ -280,30 +292,30 @@ mymain(void) g_autofree char *datadir = g_strdup_printf("%s/virhostcpudata", abs_srcdir); g_autoptr(DIR) dir = NULL; const struct linuxTestHostCPUData nodeData[] = { - {"test1", VIR_ARCH_X86_64}, - {"test1", VIR_ARCH_PPC}, - {"test2", VIR_ARCH_X86_64}, - {"test3", VIR_ARCH_X86_64}, - {"test4", VIR_ARCH_X86_64}, - {"test5", VIR_ARCH_X86_64}, - {"test6", VIR_ARCH_X86_64}, - {"test7", VIR_ARCH_X86_64}, - {"test8", VIR_ARCH_X86_64}, - {"raspberrypi", VIR_ARCH_ARMV6L}, - {"f21-mustang", VIR_ARCH_AARCH64}, - {"rhelsa-3.19.0-mustang", VIR_ARCH_AARCH64}, - {"rhel74-moonshot", VIR_ARCH_AARCH64}, - {"high-ids", VIR_ARCH_AARCH64}, - {"deconf-cpus", VIR_ARCH_PPC64}, + {"test1", VIR_ARCH_X86_64, 0}, + {"test1", VIR_ARCH_PPC, -1}, + {"test2", VIR_ARCH_X86_64, -1}, + {"test3", VIR_ARCH_X86_64, -1}, + {"test4", VIR_ARCH_X86_64, -1}, + {"test5", VIR_ARCH_X86_64, -1}, + {"test6", VIR_ARCH_X86_64, -1}, + {"test7", VIR_ARCH_X86_64, -1}, + {"test8", VIR_ARCH_X86_64, 1}, + {"raspberrypi", VIR_ARCH_ARMV6L, -1}, + {"f21-mustang", VIR_ARCH_AARCH64, -1}, + {"rhelsa-3.19.0-mustang", VIR_ARCH_AARCH64, -1}, + {"rhel74-moonshot", VIR_ARCH_AARCH64, -1}, + {"high-ids", VIR_ARCH_AARCH64, -1}, + {"deconf-cpus", VIR_ARCH_PPC64, -1}, /* subcores, default configuration */ - {"subcores1", VIR_ARCH_PPC64}, + {"subcores1", VIR_ARCH_PPC64, -1}, /* subcores, some of the cores are offline */ - {"subcores2", VIR_ARCH_PPC64}, + {"subcores2", VIR_ARCH_PPC64, -1}, /* subcores, invalid configuration */ - {"subcores3", VIR_ARCH_PPC64}, - {"with-frequency", VIR_ARCH_S390X}, - {"with-die", VIR_ARCH_X86_64}, - {"with-clusters", VIR_ARCH_AARCH64}, + {"subcores3", VIR_ARCH_PPC64, -1}, + {"with-frequency", VIR_ARCH_S390X, -1}, + {"with-die", VIR_ARCH_X86_64, -1}, + {"with-clusters", VIR_ARCH_AARCH64, -1}, }; if (virInitialize() < 0) -- 2.43.7