All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Maksim Davydov <davydov-max@yandex-team.ru>
Cc: qemu-devel@nongnu.org,  yc-core@yandex-team.ru,
	 pbonzini@redhat.com, berrange@redhat.com,  eduardo@habkost.net,
	 marcel.apfelbaum@gmail.com, f4bug@amsat.org,
	 wangyanan55@huawei.com,  alxndr@bu.edu, bsd@redhat.com,
	 stefanha@redhat.com,  thuth@redhat.com, darren.kenny@oracle.com,
	 Qiuhao.Li@outlook.com,  lvivier@redhat.com, jsnow@redhat.com,
	 crosa@redhat.com,  bleal@redhat.com
Subject: Re: [PATCH v2 4/4] scripts: add script to compare compatible properties
Date: Fri, 16 Sep 2022 07:57:30 +0200	[thread overview]
Message-ID: <87illng8tx.fsf@pond.sub.org> (raw)
In-Reply-To: <20220914105539.18461-5-davydov-max@yandex-team.ru> (Maksim Davydov's message of "Wed, 14 Sep 2022 13:55:39 +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>



  parent reply	other threads:[~2022-09-16  6:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-14 10:55 [PATCH v2 0/4] compare machine type compat_props Maksim Davydov
2022-09-14 10:55 ` [PATCH v2 1/4] qom: add devault value Maksim Davydov
2022-09-14 10:55 ` [PATCH v2 2/4] python/qmp: increase read buffer size Maksim Davydov
2022-09-14 10:55 ` [PATCH v2 3/4] qmp: add dump machine type compatible properties Maksim Davydov
2022-09-14 10:55 ` [PATCH v2 4/4] scripts: add script to compare " Maksim Davydov
2022-09-14 18:25   ` Vladimir Sementsov-Ogievskiy
2022-09-19 10:04     ` Maksim Davydov
2022-09-16  5:57   ` Markus Armbruster [this message]
2022-09-19 10:41     ` Maksim Davydov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87illng8tx.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=Qiuhao.Li@outlook.com \
    --cc=alxndr@bu.edu \
    --cc=berrange@redhat.com \
    --cc=bleal@redhat.com \
    --cc=bsd@redhat.com \
    --cc=crosa@redhat.com \
    --cc=darren.kenny@oracle.com \
    --cc=davydov-max@yandex-team.ru \
    --cc=eduardo@habkost.net \
    --cc=f4bug@amsat.org \
    --cc=jsnow@redhat.com \
    --cc=lvivier@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=thuth@redhat.com \
    --cc=wangyanan55@huawei.com \
    --cc=yc-core@yandex-team.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.