[PATCH v6 0/4] compare machine type compat_props

Maksim Davydov posted 4 patches 1 year ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20231108153827.39692-1-davydov-max@yandex-team.ru
Maintainers: Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Yanan Wang <wangyanan55@huawei.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@redhat.com>, Beraldo Leal <bleal@redhat.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Alexander Bulekov <alxndr@bu.edu>, Bandan Das <bsd@redhat.com>, Stefan Hajnoczi <stefanha@redhat.com>, Thomas Huth <thuth@redhat.com>, Darren Kenny <darren.kenny@oracle.com>, Qiuhao Li <Qiuhao.Li@outlook.com>, Laurent Vivier <lvivier@redhat.com>
There is a newer version of this series
hw/core/machine-qmp-cmds.c     |  23 +-
python/qemu/machine/machine.py |   5 +
qapi/machine.json              |  54 +++-
qom/qom-qmp-cmds.c             |   1 +
scripts/compare_mt.py          | 484 +++++++++++++++++++++++++++++++++
tests/qtest/fuzz/qos_fuzz.c    |   2 +-
6 files changed, 565 insertions(+), 4 deletions(-)
create mode 100755 scripts/compare_mt.py
[PATCH v6 0/4] compare machine type compat_props
Posted by Maksim Davydov 1 year ago
This script can be used to choose the best machine type in the
appropriate cases. Also we have to check compat_props of the old MT
after changes to be sure that they haven't broken old the MT. For
example, pc_compat_3_1 of pc-q35-3.1 has Icelake-Client which was
removed.

v6 -> v5:
* add ability to compare different QEMU binaries
* replace abstract drivers by its implementations
* improve human-readable format
* code refactoring

v5 -> v4:
* minor fixes

v4 -> v3:
* increase read buffer limit to limit value in libvirt
* add caching of qmp requests to speed up the script 

v3 -> v2:
* simplify adding new methods for getting QEMU default values
* add typing
* change concept from fixed dictionaries to classes

v2 -> v1:
* fix script code style and descriptions
* reorder patches
 
v1 -> previous iteration:
* new default value print concept
* QEMU python library is used to collect qmp data
* remove auxiliary patches (that was used to fix `->get` sematics)
* print compat_props in the correct order
* delete `absract` field to reduce output JSON size

Maksim Davydov (4):
  qom: add default value
  qmp: add dump machine type compatible properties
  python: add binary
  scripts: add script to compare compatible properties

 hw/core/machine-qmp-cmds.c     |  23 +-
 python/qemu/machine/machine.py |   5 +
 qapi/machine.json              |  54 +++-
 qom/qom-qmp-cmds.c             |   1 +
 scripts/compare_mt.py          | 484 +++++++++++++++++++++++++++++++++
 tests/qtest/fuzz/qos_fuzz.c    |   2 +-
 6 files changed, 565 insertions(+), 4 deletions(-)
 create mode 100755 scripts/compare_mt.py

-- 
2.34.1
Re: [PATCH v6 0/4] compare machine type compat_props
Posted by Philippe Mathieu-Daudé 12 months ago
Hi Maksim,

On 8/11/23 16:38, Maksim Davydov wrote:
> This script can be used to choose the best machine type in the
> appropriate cases. Also we have to check compat_props of the old MT
> after changes to be sure that they haven't broken old the MT. For
> example, pc_compat_3_1 of pc-q35-3.1 has Icelake-Client which was
> removed.

> Maksim Davydov (4):
>    qom: add default value
>    qmp: add dump machine type compatible properties
>    python: add binary
>    scripts: add script to compare compatible properties
> 
>   hw/core/machine-qmp-cmds.c     |  23 +-
>   python/qemu/machine/machine.py |   5 +
>   qapi/machine.json              |  54 +++-
>   qom/qom-qmp-cmds.c             |   1 +
>   scripts/compare_mt.py          | 484 +++++++++++++++++++++++++++++++++

"compare_machine_types.py" name is more meaningful.

>   tests/qtest/fuzz/qos_fuzz.c    |   2 +-
>   6 files changed, 565 insertions(+), 4 deletions(-)
>   create mode 100755 scripts/compare_mt.py
>
Re: [PATCH v6 0/4] compare machine type compat_props
Posted by Markus Armbruster 12 months ago
Philippe Mathieu-Daudé <philmd@linaro.org> writes:

> Hi Maksim,
>
> On 8/11/23 16:38, Maksim Davydov wrote:
>> This script can be used to choose the best machine type in the
>> appropriate cases. Also we have to check compat_props of the old MT
>> after changes to be sure that they haven't broken old the MT. For
>> example, pc_compat_3_1 of pc-q35-3.1 has Icelake-Client which was
>> removed.
>
>> Maksim Davydov (4):
>>    qom: add default value
>>    qmp: add dump machine type compatible properties
>>    python: add binary
>>    scripts: add script to compare compatible properties
>>   hw/core/machine-qmp-cmds.c     |  23 +-
>>   python/qemu/machine/machine.py |   5 +
>>   qapi/machine.json              |  54 +++-
>>   qom/qom-qmp-cmds.c             |   1 +
>>   scripts/compare_mt.py          | 484 +++++++++++++++++++++++++++++++++
>
> "compare_machine_types.py" name is more meaningful.

Please use '-' instead of '_' in program names.

>>   tests/qtest/fuzz/qos_fuzz.c    |   2 +-
>>   6 files changed, 565 insertions(+), 4 deletions(-)
>>   create mode 100755 scripts/compare_mt.py