On Tue, Oct 31, 2023 at 18:13:41 -0500, Jonathon Jongsma wrote:
But while doing that, I discovered that the creation of these xml
definitions is largely undocumented. There is a
'src/cpu_map/sync_qemu_models.py' script which was clearly used to
generate them originally.
Not really, most of the models were manually translated from QEMU source
code and the script was created later to help with identifying
differences and new features and CPU models.
But when I run it against the current qemu codebase, it modifies
quite
a few of the CPU xml files. Most of the modifications are adding
features that (I assume) qemu added to the CPU model after the initial
xml files were generated.
Right, sometimes QEMU added new features to existing CPU models and
sometime existing features were removed. I believe they don't do so
anymore and introduce a new CPU model version instead.
So, the question is: are these intended to kept up-to-date with qemu?
The script name "sync_*" implies such, but I don't see much evidence
that it is happening.
No the CPU models in libvirt are not supposed to be synchronized with
QEMU. The script does synchronize them, but the result needs careful
review and manual processing to avoid submitting changes to existing CPU
models to avoid breaking migration between different versions of
libvirt. You can use the script to quickly see what changed in QEMU on
existing models though.
Jirka