|
From: | Maksim Davydov |
Subject: | Re: [PATCH v2 4/4] scripts: add script to compare compatible properties |
Date: | Mon, 19 Sep 2022 13:41:50 +0300 |
Maksim Davydov <davydov-max@yandex-team.ru> writes:
This script run QEMU to obtain compat_props of machines and default
values of different types and produce appropriate table. This table
can be used to compare machine types to choose the most suitable
machine. Also table in json or csv format should be used to check that
new machine doesn't affect previous ones via comparisin tables with and
Do you mean "comparing tables"?
without new machine.
Sounds useful.
Can we make this check part of "make check"? Commit tables for stable
machine types, run the script and diff output against the committed
table?
Default values of properties are needed to fill "holes" in the table (one
machine has these properties and another not).
I'm confused. Can you elaborate?
Notes:
* some init values from the devices can't be available like properties
from virtio-9p when configure has --disable-virtfs. This situations will
be seen in the table as "unavailable driver".
* Default values can be get can be obtained in an unobvious way, like
x86 features. If the script doesn't know how to get property default value
to compare one machine with another it fills "holes" with "unavailable
method". This is done because script uses whitelist model to get default
values of different types. It means that the method that can't be applied
to a new type that can crash this script. It is better to get an
"unavailable driver" when creating a new machine with new compatible
properties than to break this script. So it turns out a more stable and
generic script.
* If the default value can't be obtained because this property doesn't
exist or because this property can't have default value, appropriate
"hole" will be filled by "unknown property" or "no default value"
* If the property is applied to the abstract class, the script collects
default values from all child classes (set of default values)
Example:
./scripts/compare_mt.py --mt pc-q35-3.1 pc-q35-2.12
╒════════════════════════════════════╤═══════════════╤═══════════════╕
│ │ pc-q35-2.12 │ pc-q35-3.1 │
╞════════════════════════════════════╪═══════════════╪═══════════════╡
│ EPYC-IBPB-x86_64-cpu-xlevel │ 0x8000000a │ 2147483678 │
├────────────────────────────────────┼───────────────┼───────────────┤
│ EPYC-x86_64-cpu-xlevel │ 0x8000000a │ 2147483678 │
├────────────────────────────────────┼───────────────┼───────────────┤
│ Skylake-Server-IBRS-x86_64-cpu-pku │ False │ True │
├────────────────────────────────────┼───────────────┼───────────────┤
│ Skylake-Server-x86_64-cpu-pku │ False │ True │
├────────────────────────────────────┼───────────────┼───────────────┤
│ VGA-global-vmstate │ True │ False │
├────────────────────────────────────┼───────────────┼───────────────┤
│ cirrus-vga-global-vmstate │ True │ False │
├────────────────────────────────────┼───────────────┼───────────────┤
│ hda-audio-use-timer │ False │ True │
├────────────────────────────────────┼───────────────┼───────────────┤
│ migration-decompress-error-check │ False │ True │
├────────────────────────────────────┼───────────────┼───────────────┤
│ qxl-vga-global-vmstate │ True │ False │
├────────────────────────────────────┼───────────────┼───────────────┤
│ vmware-svga-global-vmstate │ True │ False │
├────────────────────────────────────┼───────────────┼───────────────┤
│ x86_64-cpu-legacy-cache │ True │ [True, False] │
├────────────────────────────────────┼───────────────┼───────────────┤
│ x86_64-cpu-topoext │ False │ [True, False] │
├────────────────────────────────────┼───────────────┼───────────────┤
│ x86_64-cpu-x-hv-synic-kvm-only │ True │ False │
╘════════════════════════════════════╧═══════════════╧═══════════════╛
Would examples showing "unavailable driver", "unavailable method",
"unknown property", and "no default value" be useful here?
Signed-off-by: Maksim Davydov <davydov-max@yandex-team.ru>
[Prev in Thread] | Current Thread | [Next in Thread] |