Re: [PATCH v1 8/9] qom: add command to print initial properties

2022-04-04 Thread Maxim Davydov
On 3/31/22 14:55, Igor Mammedov wrote: On Tue, 29 Mar 2022 00:15:38 +0300 Maxim Davydov wrote: The command "query-init-properties" is needed to get values of properties after initialization (not only default value). It makes sense, for example, when working with x86_64-cpu. A

Re: [PATCH v1 8/9] qom: add command to print initial properties

2022-04-04 Thread Maxim Davydov
On 3/30/22 18:17, Vladimir Sementsov-Ogievskiy wrote: 29.03.2022 00:15, Maxim Davydov wrote: The command "query-init-properties" is needed to get values of properties after initialization (not only default value). It makes sense, for example, when working with x86_64-cpu. All mac

Re: [PATCH v1 7/9] colo-compare: safe finalization

2022-04-04 Thread Maxim Davydov
:15, Maxim Davydov wrote: Fixes some possible issues with finalization. For example, finalization immediately after instance_init fails on the assert. Signed-off-by: Maxim Davydov ---   net/colo-compare.c | 25 -   1 file changed, 16 insertions(+), 9 deletions(-) diff --git

Re: [PATCH v1 6/9] chardev: add appropriate getting address

2022-04-04 Thread Maxim Davydov
On 3/30/22 14:32, Vladimir Sementsov-Ogievskiy wrote: 29.03.2022 00:15, Maxim Davydov wrote: Attempt to get address after initialization shouldn't fail on assert in the qapi automatically generated code. As a possible solution, it can return null type. But at some point this address appears

Re: [PATCH v1 3/9] mem: appropriate handling getting mem region

2022-04-04 Thread Maxim Davydov
On 3/30/22 14:27, Vladimir Sementsov-Ogievskiy wrote: 29.03.2022 00:15, Maxim Davydov wrote: Attempt to get memory region if the device doesn't have hostmem may not be an error. This can be happen immediately after initialization (getting value without default one). Signed-off-by: Maxim

Re: [PATCH v1 2/9] pci: add null-pointer check

2022-04-04 Thread Maxim Davydov
On 3/30/22 14:07, Vladimir Sementsov-Ogievskiy wrote: 29.03.2022 00:15, Maxim Davydov wrote: Call pci_bus_get_w64_range can fail with the segmentation fault. For example, this can happen during attempt to get pci-hole64-end immediately after initialization. So, immediately after

Re: [PATCH v1 1/9] qmp: Add dump machine type compatible properties

2022-04-04 Thread Maxim Davydov
On 3/30/22 14:03, Vladimir Sementsov-Ogievskiy wrote: 29.03.2022 00:15, Maxim Davydov wrote: This patch adds the ability to get all the compat_props of the corresponding supported machines for their comparison. Example: { "execute" : "query-machines", "argume

[PATCH v1 8/9] qom: add command to print initial properties

2022-03-28 Thread Maxim Davydov
be skipped, because only the one instance can be correctly initialized. Signed-off-by: Maxim Davydov --- qapi/qom.json | 69 ++ qom/qom-qmp-cmds.c | 121 + 2 files changed, 190 insertions(+) diff --git a/qapi/qom.json b/qapi/qom.

[PATCH v1 9/9] scripts: printing machine type compat properties

2022-03-28 Thread Maxim Davydov
───┼──┤ │ x86_64-cpu-hv-version-id-minor │ 0 │0x0001│ ╘═══════╧══╧══╛ Signed-off-by: Maxim Davydov --- scripts/print_MT.py | 274 1 file changed, 274 insertions(+) create mode 10075

[PATCH v1 7/9] colo-compare: safe finalization

2022-03-28 Thread Maxim Davydov
Fixes some possible issues with finalization. For example, finalization immediately after instance_init fails on the assert. Signed-off-by: Maxim Davydov --- net/colo-compare.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/net/colo-compare.c b

[PATCH v1 4/9] msmouse: add appropriate unregister handler

2022-03-28 Thread Maxim Davydov
Attempt to finalize msmouse after initalization brings to segmentation fault in QTAILQ_REMOVE. Signed-off-by: Maxim Davydov --- chardev/msmouse.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chardev/msmouse.c b/chardev/msmouse.c index eb9231dcdb..2cc1b16561 100644

[PATCH v1 5/9] wctablet: add appropriate unregister handler

2022-03-28 Thread Maxim Davydov
Attempt to finalize msmouse after initalization brings to segmentation fault in QTAILQ_REMOVE. Signed-off-by: Maxim Davydov --- chardev/wctablet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chardev/wctablet.c b/chardev/wctablet.c index e8b292c43c..43bdf6b608 100644

[PATCH v1 6/9] chardev: add appropriate getting address

2022-03-28 Thread Maxim Davydov
Attempt to get address after initialization shouldn't fail on assert in the qapi automatically generated code. As a possible solution, it can return null type. Signed-off-by: Maxim Davydov --- chardev/char-socket.c | 9 + 1 file changed, 9 insertions(+) diff --git a/chardev/char

[PATCH v1 1/9] qmp: Add dump machine type compatible properties

2022-03-28 Thread Maxim Davydov
This patch adds the ability to get all the compat_props of the corresponding supported machines for their comparison. Example: { "execute" : "query-machines", "arguments" : { "is-full" : true } } Signed-off-by: Maxim Davydov --- hw/core/machine

[PATCH v1 2/9] pci: add null-pointer check

2022-03-28 Thread Maxim Davydov
Call pci_bus_get_w64_range can fail with the segmentation fault. For example, this can happen during attempt to get pci-hole64-end immediately after initialization. Signed-off-by: Maxim Davydov --- hw/pci-host/i440fx.c | 17 +++-- hw/pci-host/q35.c| 17 +++-- 2 files

[PATCH v1 3/9] mem: appropriate handling getting mem region

2022-03-28 Thread Maxim Davydov
Attempt to get memory region if the device doesn't have hostmem may not be an error. This can be happen immediately after initialization (getting value without default one). Signed-off-by: Maxim Davydov --- hw/i386/sgx-epc.c | 5 - hw/mem/nvdimm.c | 6 ++ hw/mem/pc-dimm.c | 5

[PATCH v1 0/9] Machine type compatible properties

2022-03-28 Thread Maxim Davydov
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

[PATCH v1 7/8] virtio-blk: Add tracking of the virtio guest feature bits

2021-09-01 Thread Maxim Davydov
Add tracking of the bits acknowledged by the guests Signed-off-by: Maxim Davydov --- hw/block/virtio-blk.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index f139cd7..552b86c 100644 --- a/hw/block/virtio

[PATCH v1 5/8] virtio-net: Add tracking of the virtio guest feature bits

2021-09-01 Thread Maxim Davydov
Add tracking of the bits acknowledged by the guest Signed-off-by: Maxim Davydov --- hw/net/virtio-net.c | 118 1 file changed, 72 insertions(+), 46 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 16d20cd..2fd9171

[PATCH v1 6/8] scsi: Add tracking of the acknowledged feature bits

2021-09-01 Thread Maxim Davydov
Add tracking of the VIRTIO_SCSI_F_HOTPLUG, VIRTIO_SCSI_F_CHANGE and VIRTIO_SCSI_F_T10_PI bits acknowledged by the guest Signed-off-by: Maxim Davydov --- hw/scsi/vhost-scsi.c | 6 +++--- hw/scsi/vhost-user-scsi.c | 18 +- hw/scsi/virtio-scsi.c | 10 ++ 3 files

[PATCH v1 2/8] virtio: Add tracking of the common virtio guest features

2021-09-01 Thread Maxim Davydov
It implements common virtio features via macros that, by defining the virtio guest feature bit and the virtio host feature bit, allow you to checks acknowledged virtio features by the guest. Signed-off-by: Maxim Davydov --- hw/virtio/virtio.c | 2 +- include/hw/virtio/virtio.h | 39

[PATCH v1 1/8] qdev-properties: Add read-only 64 bit property

2021-09-01 Thread Maxim Davydov
In some situations, we need a property that tracks the bit but can't change it (for instance, guest features of virtio device). Signed-off-by: Maxim Davydov --- hw/core/qdev-properties.c| 32 include/hw/qdev-properties.h | 5 + 2 files changed, 37

[PATCH v1 3/8] virtio-gpu: Add tracking of the virtio guest feature bits

2021-09-01 Thread Maxim Davydov
Add tracking of the bits acknowledged by the guest Signed-off-by: Maxim Davydov --- hw/display/vhost-user-gpu.c| 3 ++- hw/display/virtio-gpu.c| 8 +--- include/hw/virtio/virtio-gpu.h | 10 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/hw/display

[PATCH v1 4/8] virtio-serial: Add tracking of the virtio guest feature bits

2021-09-01 Thread Maxim Davydov
Add tracking of the VIRTIO_CONSOLE_F_EMERG_WRITE acknowledged by the guest. Signed-off-by: Maxim Davydov --- hw/char/virtio-serial-bus.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/char/virtio-serial-bus.c b/hw/char/virtio-serial-bus.c index dd6bc27..b5f9f42

[PATCH v1 0/8] Virtio features acknowledged by guest

2021-09-01 Thread Maxim Davydov
In some situations (for instance, debug), we want to be able to see the features that were confirmed by the guest. At the same time, we would like to do this safely, without the possibility of setting bits of guest features from the outside. Maxim Davydov (8): qdev-properties: Add read-only 64

[PATCH v1 8/8] virtio-balloon: Add tracking of the virtio guest feature bits

2021-09-01 Thread Maxim Davydov
Add tracking of the bits acknowledged by the guest Signed-off-by: Maxim Davydov --- hw/virtio/virtio-balloon.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c index 4b5d9e5..61575b7 100644 --- a/hw