[libvirt PATCH 0/5] Simplify x86 cpu feature synchronization with qemu

Tim Wiederhake posted 5 patches 9 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20230725125301.35943-1-twiederh@redhat.com
src/cpu_map/x86_features.py  | 119 +++++++
src/cpu_map/x86_features.xml | 594 +++++++++++++++++------------------
2 files changed, 407 insertions(+), 306 deletions(-)
create mode 100755 src/cpu_map/x86_features.py
[libvirt PATCH 0/5] Simplify x86 cpu feature synchronization with qemu
Posted by Tim Wiederhake 9 months, 2 weeks ago
A recurring task in libvirt is synchronizing the list of (x86) cpu features
with qemu. This is an error-prone and manual task as it relies on parsing
qemu c source code and therefore neccessarily lags behind qemu development.

The better solution would be if qemu and libvirt both got the cpu feature
information from a common source. libcpuinfo [1] wants to be that source, a
comprehensive, architecture agnostic database of cpu information, together
with some handy tooling, e.g. a library to access this database at run-time,
quering the host for capabilities, calculate baselines for different sets of
capabilities. libcpuinfo comes with c headers and contains python bindings.

This patch series prepares libvirt's x86 feature list to be automatically
generated from libcpuinfo data, but introduces no dependency on libcpuinfo
yet. Introducing that dependency to generate the feature list on compile time
or making use of libcpuinfo's more advanced features would be up to discussion
at a later date.

Note that libcpuinfo's feature database is not on par with libvirt yet and
to generate an identical version of x86_features.xml the data from
libcpuinfo's "wip" branch is required.

[1] https://gitlab.com/twiederh/libcpuinfo

Tim Wiederhake (5):
  cpu_map: Sort cpu features
  cpu_map: Format register values uniformly
  cpu_map: Format comments
  cpu_map: Remove unused alias information
  cpu_map: Generate x86 feature map from libcpuinfo

 src/cpu_map/x86_features.py  | 119 +++++++
 src/cpu_map/x86_features.xml | 594 +++++++++++++++++------------------
 2 files changed, 407 insertions(+), 306 deletions(-)
 create mode 100755 src/cpu_map/x86_features.py

-- 
2.39.2