On Fri, Nov 27, 2026 at 06:39:04AM +0000, Partha Sarathi Satapathy via Devel wrote:
When the Linux host CPU topology consistency check fails, virNodeGetInfo() returns a synthetic topology. For example, offlining one complete SMT core on each of two NUMA nodes can cause the legacy API to report one NUMA cell, one socket, and one thread per core.
Applications cannot distinguish this fallback from detected topology using the existing virNodeInfo fields. We encountered this in a host management application that compared the node count from virNodeGetInfo() with the NUMA cells in capabilities XML. Capacity management had offlined host CPUs, and the synthetic node count no longer matched the detailed topology.
Both the API docs and man page: https://libvirt.org/html/libvirt-libvirt-host.html#virNodeGetInfo https://libvirt.org/manpages/virsh.html#nodeinfo report that the nodeinfo topology is likely to be incorrect and that this API/command should not be used if you want accurate info, pointing users/app devs to the capabilities API/XML instead. Comparing the virNodeGetInfo data with the capabilities XML is clearly wrong and serves no purpose. The application in question should just be fixed to use the currently recommended APIs.
Is exposing the fallback state useful enough to justify a new public API, given the recommendation to use capabilities XML for detailed topology? Feedback on the API shape, result flag naming, and virsh presentation would be appreciated.
If applications can't follow the current API docs which state the current nodeinfo API should not be used, it does not seem any more likely they will do the correct thing after these patches are applied. Changing apps to use a new nodeinfoflags API which reports exactly the same broken info, along with returning a flag that says "this information is broken" is just a waste of time. With regards, Daniel -- |: https://berrange.com ~~ https://hachyderm.io/@berrange :| |: https://libvirt.org ~~ https://entangle-photo.org :| |: https://pixelfed.art/berrange ~~ https://fstop138.berrange.com :|