[PATCH v1 0/9] Machine type compatible properties

Maxim Davydov posted 9 patches 3 years, 10 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220328211539.90170-1-maxim.davydov@openvz.org
Maintainers: "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Eduardo Habkost <eduardo@habkost.net>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Yanan Wang <wangyanan55@huawei.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Igor Mammedov <imammedo@redhat.com>, Ani Sinha <ani@anisinha.ca>, Xiao Guangrong <xiaoguangrong.eric@gmail.com>, Zhang Chen <chen.zhang@intel.com>, Li Zhijian <lizhijian@fujitsu.com>, Jason Wang <jasowang@redhat.com>, Eric Blake <eblake@redhat.com>, Markus Armbruster <armbru@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, John Snow <jsnow@redhat.com>, Cleber Rosa <crosa@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>
chardev/char-socket.c       |   9 ++
chardev/msmouse.c           |   4 +-
chardev/wctablet.c          |   4 +-
hw/core/machine-qmp-cmds.c  |  25 +++-
hw/i386/sgx-epc.c           |   5 +-
hw/mem/nvdimm.c             |   6 +
hw/mem/pc-dimm.c            |   5 +
hw/pci-host/i440fx.c        |  17 ++-
hw/pci-host/q35.c           |  17 ++-
net/colo-compare.c          |  25 ++--
qapi/machine.json           |  58 +++++++-
qapi/qom.json               |  69 +++++++++
qom/qom-qmp-cmds.c          | 121 ++++++++++++++++
scripts/print_MT.py         | 274 ++++++++++++++++++++++++++++++++++++
tests/qtest/fuzz/qos_fuzz.c |   2 +-
15 files changed, 613 insertions(+), 28 deletions(-)
create mode 100755 scripts/print_MT.py
[PATCH v1 0/9] Machine type compatible properties
Posted by Maxim Davydov 3 years, 10 months ago
We need to be able to check machine type after its definition. It's
necessary when using complicated inheritance of compatible features. For
instance, this tool can help to find bugs in the machine type definition
if the name of the device has been changed. Also, this tool was created
to help with MTs of other projects such as vz branches.

Maxim Davydov (9):
  qmp: Add dump machine type compatible properties
  pci: add null-pointer check
  mem: appropriate handling getting mem region
  msmouse: add appropriate unregister handler
  wctablet: add appropriate unregister handler
  chardev: add appropriate getting address
  colo-compare: safe finalization
  qom: add command to print initial properties
  scripts: printing machine type compat properties

 chardev/char-socket.c       |   9 ++
 chardev/msmouse.c           |   4 +-
 chardev/wctablet.c          |   4 +-
 hw/core/machine-qmp-cmds.c  |  25 +++-
 hw/i386/sgx-epc.c           |   5 +-
 hw/mem/nvdimm.c             |   6 +
 hw/mem/pc-dimm.c            |   5 +
 hw/pci-host/i440fx.c        |  17 ++-
 hw/pci-host/q35.c           |  17 ++-
 net/colo-compare.c          |  25 ++--
 qapi/machine.json           |  58 +++++++-
 qapi/qom.json               |  69 +++++++++
 qom/qom-qmp-cmds.c          | 121 ++++++++++++++++
 scripts/print_MT.py         | 274 ++++++++++++++++++++++++++++++++++++
 tests/qtest/fuzz/qos_fuzz.c |   2 +-
 15 files changed, 613 insertions(+), 28 deletions(-)
 create mode 100755 scripts/print_MT.py

-- 
2.31.1
Re: [PATCH v1 0/9] Machine type compatible properties
Posted by Igor Mammedov 3 years, 10 months ago
On Tue, 29 Mar 2022 00:15:30 +0300
Maxim Davydov <maxim.davydov@openvz.org> wrote:

> We need to be able to check machine type after its definition. It's
> necessary when using complicated inheritance of compatible features. For
> instance, this tool can help to find bugs in the machine type definition
> if the name of the device has been changed. Also, this tool was created
> to help with MTs of other projects such as vz branches.

a comment to all patches where "after initialization" is mentioned.
Pls rewrite commit messages so that it would be clear what that means
and describe in detail why current code needs fixing.

> 
> Maxim Davydov (9):
>   qmp: Add dump machine type compatible properties
>   pci: add null-pointer check
>   mem: appropriate handling getting mem region
>   msmouse: add appropriate unregister handler
>   wctablet: add appropriate unregister handler
>   chardev: add appropriate getting address
>   colo-compare: safe finalization
>   qom: add command to print initial properties
>   scripts: printing machine type compat properties
> 
>  chardev/char-socket.c       |   9 ++
>  chardev/msmouse.c           |   4 +-
>  chardev/wctablet.c          |   4 +-
>  hw/core/machine-qmp-cmds.c  |  25 +++-
>  hw/i386/sgx-epc.c           |   5 +-
>  hw/mem/nvdimm.c             |   6 +
>  hw/mem/pc-dimm.c            |   5 +
>  hw/pci-host/i440fx.c        |  17 ++-
>  hw/pci-host/q35.c           |  17 ++-
>  net/colo-compare.c          |  25 ++--
>  qapi/machine.json           |  58 +++++++-
>  qapi/qom.json               |  69 +++++++++
>  qom/qom-qmp-cmds.c          | 121 ++++++++++++++++
>  scripts/print_MT.py         | 274 ++++++++++++++++++++++++++++++++++++
>  tests/qtest/fuzz/qos_fuzz.c |   2 +-
>  15 files changed, 613 insertions(+), 28 deletions(-)
>  create mode 100755 scripts/print_MT.py
>
Re: [PATCH v1 0/9] Machine type compatible properties
Posted by Vladimir Sementsov-Ogievskiy 3 years, 9 months ago
29.03.2022 00:15, Maxim Davydov wrote:
> We need to be able to check machine type after its definition. It's
> necessary when using complicated inheritance of compatible features. For
> instance, this tool can help to find bugs in the machine type definition
> if the name of the device has been changed. Also, this tool was created
> to help with MTs of other projects such as vz branches.


We discussed verbally two points to change:

1. Instead of workarounds to avoid crashes, which are unsafe (we avoid crash, but is data that we generate this way valid or not?), let's require to call QEMU process with such options so everything that needed is initialized and we avoid crashes and still get valid information

2. We want not "default" values, but "current" ones. I.e., we start QEMU with same options like in production, and we clearly get all real values of machine properties.


> 
> Maxim Davydov (9):
>    qmp: Add dump machine type compatible properties
>    pci: add null-pointer check
>    mem: appropriate handling getting mem region
>    msmouse: add appropriate unregister handler
>    wctablet: add appropriate unregister handler
>    chardev: add appropriate getting address
>    colo-compare: safe finalization
>    qom: add command to print initial properties
>    scripts: printing machine type compat properties
> 
>   chardev/char-socket.c       |   9 ++
>   chardev/msmouse.c           |   4 +-
>   chardev/wctablet.c          |   4 +-
>   hw/core/machine-qmp-cmds.c  |  25 +++-
>   hw/i386/sgx-epc.c           |   5 +-
>   hw/mem/nvdimm.c             |   6 +
>   hw/mem/pc-dimm.c            |   5 +
>   hw/pci-host/i440fx.c        |  17 ++-
>   hw/pci-host/q35.c           |  17 ++-
>   net/colo-compare.c          |  25 ++--
>   qapi/machine.json           |  58 +++++++-
>   qapi/qom.json               |  69 +++++++++
>   qom/qom-qmp-cmds.c          | 121 ++++++++++++++++
>   scripts/print_MT.py         | 274 ++++++++++++++++++++++++++++++++++++
>   tests/qtest/fuzz/qos_fuzz.c |   2 +-
>   15 files changed, 613 insertions(+), 28 deletions(-)
>   create mode 100755 scripts/print_MT.py
> 


-- 
Best regards,
Vladimir