[PATCH 0/4] Generate x86 cpu features

Tim Wiederhake posted 4 patches 9 months, 1 week ago
Failed in applying to current master (apply log)
There is a newer version of this series
target/i386/cpu.c                   |  677 +----------
target/i386/feature_word_info.c.inc |  704 ++++++++++++
target/i386/feature_word_info.py    |  110 ++
target/i386/feature_word_info.xml   | 1610 +++++++++++++++++++++++++++
4 files changed, 2425 insertions(+), 676 deletions(-)
create mode 100644 target/i386/feature_word_info.c.inc
create mode 100755 target/i386/feature_word_info.py
create mode 100644 target/i386/feature_word_info.xml
[PATCH 0/4] Generate x86 cpu features
Posted by Tim Wiederhake 9 months, 1 week ago
Synchronizing the list of cpu features and models with qemu is a recurring
task in libvirt. For x86, this is done by reading qom-list-properties for
max-x86_64-cpu and manually filtering out everthing that does not look like
a feature name, as well as parsing target/i386/cpu.c for cpu models.

This is a flawed, tedious and error-prone procedure. Ideally, qemu
and libvirt would query a common source for cpu feature and model
related information. Meanwhile, converting this information into an easier
to parse format would help libvirt a lot.

This patch series converts the cpu feature information present in
target/i386/cpu.c (`feature_word_info`) into an xml file and adds a
script to generate the c code from this xml.

A patch set to convert the cpu model data (`builtin_x86_defs`) in the
same way will follow.

Tim Wiederhake (4):
  target/i386: Split out feature_word_info
  target/i386: Translate feature_word_info to xml
  target/i386: Format feature_word_info.c.inc
  target/i386: Autogenerate feature_word_info.c.inc

 target/i386/cpu.c                   |  677 +----------
 target/i386/feature_word_info.c.inc |  704 ++++++++++++
 target/i386/feature_word_info.py    |  110 ++
 target/i386/feature_word_info.xml   | 1610 +++++++++++++++++++++++++++
 4 files changed, 2425 insertions(+), 676 deletions(-)
 create mode 100644 target/i386/feature_word_info.c.inc
 create mode 100755 target/i386/feature_word_info.py
 create mode 100644 target/i386/feature_word_info.xml

-- 
2.39.2