qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 4/4] scripts: add script to compare compatible properties


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

Hi!
 
16.09.2022, 08:57, "Markus Armbruster" <armbru@redhat.com>:

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"?

Yes)

 

 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?

Yes, it will be the next step after this series
 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?

for instance, 2.12 mt has `{ "EPYC-" TYPE_X86_CPU, "xlevel", "0x8000000a" }`, but compat_pros of 3.1 mt doesn't have it. So, to compare these machines we need to fill unknown value of "EPYC-x86_64-cpu-xlevel" for 3.1 mt. This unknown value in the table I called "hole". To get values (default values) for these "holes" the script uses list of appropriate methods.
I used the term "default values of property" because this is the value that will be used if machine type doesn't have this property in the compat_props

 

 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?

The example will be changed to `./scripts/compare_mt.py --mt pc-q35-3.1 pc-q35-4.1` to demonstrate a potential bug with Icelake-Client

 

 Signed-off-by: Maksim Davydov <davydov-max@yandex-team.ru>
Thanks for reviewing)
This patch will be reworked with your remarks
 
-- 
Best regards,
Maksim Davydov
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]