On Fri, Jun 19, 2026 at 12:28:12PM +0200, Peter Krempa via Devel wrote:
From: Peter Krempa <pkrempa@redhat.com>
Add general infrastructure for converting the generated introspection into XML which can be returned via 'virConnectGetIntrospection' and use it in the qemu driver. Example of the generated introspection XML:
$ virsh introspection <libvirt-introspection> <hypervisor> <api name='virConnectBaselineCPU'> <flags dec='3' hex='0x3'/> </api> <api name='virConnectBaselineHypervisorCPU'> <flags dec='7' hex='0x7'/> </api> <api name='virConnectClose'/>
This makes me somewhat uneasy. It is a pretty low level representation of the C API, and so not so helpful for application developers in non-C language. Most obviously, an application developer outside C will not know what libvirt C API name they are using. A single API in Perl may map to multiple APIs in C depending on parameters passed. In Rust, we have considered an API design for flags that does not express them as integer constants at all. The "builder pattern" would have API names per flag instead: https://gitlab.com/libvirt/libvirt-rust/-/work_items/10 I don't think this XML schema really works nicely enough for non-C usage. 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 :|