Re: [PATCH v2 3/8] virtio-net: utilize VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Daniil Tatianin
On 9/2/22 8:54 PM, Raphael Norwitz wrote: On Fri, Aug 26, 2022 at 05:32:43PM +0300, Daniil Tatianin wrote: Use the new common helper. As an added bonus this also makes use of config size sanity checking via the 'max_size' field. Signed-off-by: Daniil Tatianin --- hw/net/virtio-net.c | 8 +

Re: [PATCH v2 5/8] virtio-blk: move config size params to virtio-blk-common

2022-09-02 Thread Daniil Tatianin
On 9/2/22 8:57 PM, Raphael Norwitz wrote: The vhost-user-blk bits in meson.build and Maintainers should probably be in patch 8? You're totally right, thanks. Otherwise LGTM. On Fri, Aug 26, 2022 at 05:32:45PM +0300, Daniil Tatianin wrote: This way we can reuse it for other virtio-blk dev

Re: [PATCH v2 1/8] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Daniil Tatianin
On 9/2/22 8:52 PM, Raphael Norwitz wrote: I feel like it would be easier to review if the first 4 patches were squashed together, but that’s not a big deal. Yeah, I think that's fair although I initially thought that maybe that was a bit too big of a change to put in one single commit. I ca

Re: [PATCH v2 8/8] vhost-user-blk: dynamically resize config space based on features

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:48PM +0300, Daniil Tatianin wrote: > Make vhost-user-blk backwards compatible when migrating from older VMs > running with modern features turned off, the same way it was done for > virtio-blk in 20764be0421c ("virtio-blk: set config size depending on the > features e

Re: [PATCH v2 4/8] virtio: remove the virtio_feature_get_config_size helper

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:44PM +0300, Daniil Tatianin wrote: > This has no more users and is superseded by virtio_get_config_size. > > Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz > --- > hw/virtio/virtio.c | 15 --- > include/hw/virtio/virtio.h | 3 ---

Re: [PATCH v2 3/8] virtio-net: utilize VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:43PM +0300, Daniil Tatianin wrote: > Use the new common helper. As an added bonus this also makes use of > config size sanity checking via the 'max_size' field. > > Signed-off-by: Daniil Tatianin > --- > hw/net/virtio-net.c | 8 ++-- > 1 file changed, 6 insertio

Re: [PATCH v2 7/8] vhost-user-blk: make 'config_wce' part of 'host_features'

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:47PM +0300, Daniil Tatianin wrote: > No reason to have this be a separate field. This also makes it more akin > to what the virtio-blk device does. > > Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz > --- > hw/block/vhost-user-blk.c | 6 ++--

Re: [PATCH v2 6/8] vhost-user-blk: make it possible to disable write-zeroes/discard

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:46PM +0300, Daniil Tatianin wrote: > It is useful to have the ability to disable these features for > compatibility with older VMs that don't have these implemented. > > Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz > --- > hw/block/vhost-user-blk.c

Re: [PATCH v2 5/8] virtio-blk: move config size params to virtio-blk-common

2022-09-02 Thread Raphael Norwitz
The vhost-user-blk bits in meson.build and Maintainers should probably be in patch 8? Otherwise LGTM. On Fri, Aug 26, 2022 at 05:32:45PM +0300, Daniil Tatianin wrote: > This way we can reuse it for other virtio-blk devices, e.g > vhost-user-blk, which currently does not control its config space s

Re: [PATCH v2 2/8] virtio-blk: utilize VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Raphael Norwitz
On Fri, Aug 26, 2022 at 05:32:42PM +0300, Daniil Tatianin wrote: > Use the common helper instead of duplicating the same logic. > > Signed-off-by: Daniil Tatianin Reviewed-by: Raphael Norwitz > --- > hw/block/virtio-blk.c | 16 +++- > 1 file changed, 7 insertions(+), 9 deletions(-

Re: [PATCH v2 1/8] virtio: introduce VirtIOConfigSizeParams & virtio_get_config_size

2022-09-02 Thread Raphael Norwitz
I feel like it would be easier to review if the first 4 patches were squashed together, but that’s not a big deal. For this one: Reviewed-by: Raphael Norwitz On Fri, Aug 26, 2022 at 05:32:41PM +0300, Daniil Tatianin wrote: > This is the first step towards moving all device config size calculati

Re: [PATCH 0/8] tests: Make expliction defaults for tests

2022-09-02 Thread Alexander Bulekov
On 220902 1851, Juan Quintela wrote: > Hi > > For a long, long time I have had local hacks on my tree to be able to > run "make tests" when I have a minimal configure guest. This is a > first try to upstream some of it. > > - by default we always setup -display none (it already was the > defau

[PATCH 7/8] meson-build: Enable CONFIG_REPLICATION only when replication is set

2022-09-02 Thread Juan Quintela
Signed-off-by: Juan Quintela --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 20fddbd707..cab0474d0c 100644 --- a/meson.build +++ b/meson.build @@ -1878,7 +1878,7 @@ config_host_data.set('CONFIG_DEBUG_STACK_USAGE', get_option('de

[PATCH 8/8] meson-build: test-crypto-secret depends on CONFIG_SECRET_KEYRING

2022-09-02 Thread Juan Quintela
With this change "make check" works when configured with --disable-keyring. Signed-off-by: Juan Quintela --- tests/unit/meson.build | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unit/meson.build b/tests/unit/meson.build index b497a41378..988aed27cb 100644 --- a/tes

[PATCH 6/8] tests: Fix error strings

2022-09-02 Thread Juan Quintela
They were copy-pasted from e1000e and never changed. Signed-off-by: Juan Quintela --- tests/qtest/e1000-test.c | 2 +- tests/qtest/es1370-test.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qtest/e1000-test.c b/tests/qtest/e1000-test.c index c387984ef6..4e0d7a560

[PATCH 4/8] tests/qtest: Add -vga none by default

2022-09-02 Thread Juan Quintela
Nothing in qtest where using vga by default except for dbus-display-test. We add -device VGA there. The only other test that fails after this change is: 109/659 qemu:qtest+qtest-ppc64 / qtest-ppc64/qos-test ERROR 21.34s killed by signal 6 SIGABRT Bail out! ERROR:../../../../mnt/code/qemu/full/

[PATCH 2/8] qtest: Set "-net none" in qtest_init()

2022-09-02 Thread Juan Quintela
This way, we don't have networking by default. If test needs it, configure it. Signed-off-by: Juan Quintela --- tests/qtest/bios-tables-test.c | 2 +- tests/qtest/libqtest.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest

[PATCH 3/8] tests/acpi: The new default is -vga none

2022-09-02 Thread Juan Quintela
So we lost a device in each table. Signed-off-by: Juan Quintela --- tests/qtest/bios-tables-test-allowed-diff.h | 39 + 1 file changed, 39 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..

[PATCH 1/8] qtest: "-display none" is set in qtest_init()

2022-09-02 Thread Juan Quintela
So we don't need to set anywhere else. Signed-off-by: Juan Quintela --- tests/qtest/bios-tables-test.c | 2 +- tests/qtest/fuzz-lsi53c895a-test.c | 2 +- tests/qtest/fuzz-megasas-test.c | 2 +- tests/qtest/fuzz-sb16-test.c| 6 +++--- tests/qtest/fuzz-sdcard-test.c | 6 +++-

[PATCH 0/8] tests: Make expliction defaults for tests

2022-09-02 Thread Juan Quintela
Hi For a long, long time I have had local hacks on my tree to be able to run "make tests" when I have a minimal configure guest. This is a first try to upstream some of it. - by default we always setup -display none (it already was the default, but some places added it anyways) - by default w

Re: [PATCH 30/51] tests: Skip iotests and qtest when '--without-default-devices'

2022-09-02 Thread Bin Meng
On Thu, Aug 25, 2022 at 8:04 PM Thomas Huth wrote: > > On 24/08/2022 11.40, Bin Meng wrote: > > From: Bin Meng > > > > When QEMU is configured with '--without-default-devices', we should > > not build and run iotests and qtest because devices used by these > > test cases are not built in. > > > >

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-09-02 Thread Marc-André Lureau
Hi On Fri, Sep 2, 2022 at 3:16 PM Markus Armbruster wrote: > Marc-André Lureau writes: > > > Hi > > > > On Thu, Aug 11, 2022 at 5:35 PM Markus Armbruster > wrote: > > > >> Daniel P. Berrangé writes: > >> > >> > On Thu, Aug 11, 2022 at 02:50:01PM +0400, Marc-André Lureau wrote: > >> >> Hi > >>

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

2022-09-02 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Thu, Aug 11, 2022 at 5:35 PM Markus Armbruster wrote: > >> Daniel P. Berrangé writes: >> >> > On Thu, Aug 11, 2022 at 02:50:01PM +0400, Marc-André Lureau wrote: >> >> Hi >> >> >> >> On Thu, Aug 11, 2022 at 2:22 PM Peter Maydell > > >> >> wrote: >> >> [...]

Re: [PATCH 32/51] tests/qtest: Fix ERROR_SHARING_VIOLATION for win32

2022-09-02 Thread Bin Meng
On Thu, Sep 1, 2022 at 4:42 PM Marc-André Lureau wrote: > > Hi > > On Wed, Aug 24, 2022 at 2:03 PM Bin Meng wrote: >> >> From: Bin Meng >> >> On Windows, the MinGW provided mkstemp() API opens the file with >> exclusive access, denying other processes to read/write the file. >> Such behavior pre

Re: [PATCH 32/51] tests/qtest: Fix ERROR_SHARING_VIOLATION for win32

2022-09-02 Thread Bin Meng
On Thu, Aug 25, 2022 at 8:06 PM Thomas Huth wrote: > > On 24/08/2022 11.40, Bin Meng wrote: > > From: Bin Meng > > > > On Windows, the MinGW provided mkstemp() API opens the file with > > exclusive access, denying other processes to read/write the file. > > Such behavior prevents the QEMU executa

Re: [PATCH v2] pci: Assert that capabilities never overlap

2022-09-02 Thread Markus Armbruster
Akihiko Odaki writes: > pci_add_capability appears most PCI devices. Its error handling required > lots of code, and led to inconsistent behaviors such as: > - passing error_abort > - passing error_fatal > - asserting the returned value > - propagating the error to the caller > - skipping the res

[PATCH 4/6] parallels: Use highest_offset() helper in leak check

2022-09-02 Thread Alexander Ivanov
Deduplicate code by using highest_offset() helper. Signed-off-by: Alexander Ivanov --- block/parallels.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 339ce45634..688aa081e2 100644 --- a/block/parallels.c +++ b/block/p

[PATCH 5/6] parallels: Replace fprintf by qemu_log

2022-09-02 Thread Alexander Ivanov
Use a standard QEMU function for logging. Signed-off-by: Alexander Ivanov --- block/parallels.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 688aa081e2..08526196da 100644 --- a/block/parallels.c +++ b/block/parallels.c

[PATCH 2/6] parallels: Create parallels_handle_leak() to truncate excess clusters

2022-09-02 Thread Alexander Ivanov
This helper will be reused in the next patch for duplications check. Signed-off-by: Alexander Ivanov --- block/parallels.c | 65 +++ 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/block/parallels.c b/block/parallels.c index 7b4e997ebd.

[PATCH 3/6] parallels: Add checking and repairing duplicate offsets in BAT

2022-09-02 Thread Alexander Ivanov
Cluster offsets must be unique among all BAT entries. Find duplicate offsets in the BAT. If a duplicated offset is found fix it by copying the content of the relevant cluster to a new allocated cluster and set the new cluster offset to the duplicated entry. Add host_cluster_index() helper to dedu

[PATCH 6/6] parallels: Image repairing in parallels_open()

2022-09-02 Thread Alexander Ivanov
Repair an image at opening if the image is unclean or out-of-image corruption was detected. Signed-off-by: Alexander Ivanov --- block/parallels.c | 95 --- 1 file changed, 65 insertions(+), 30 deletions(-) diff --git a/block/parallels.c b/block/parall

[PATCH 0/6] parallels: Add duplication check, repair at open, fix bugs

2022-09-02 Thread Alexander Ivanov
This patchset is based on git: https://src.openvz.org/~den/qemu.git parallels Fix incorrect data end calculation in parallels_open(). Add parallels_handle_leak() and highest_offset() helpers. Add checking and repairing duplicate offsets in BAT. Deduplicate highest offset calculation. Replace f

[PATCH 1/6] parallels: Incorrect data end calculation in parallels_open()

2022-09-02 Thread Alexander Ivanov
The BDRVParallelsState structure contains data_end field that is measured in sectors. In parallels_open() initially this field is set by data_off field from parallels image header. According to the parallels format documentation, data_off field contains an offset, in sectors, from the start of the

Re: [RFC v4 11/11] virtio-blk: use BDRV_REQ_REGISTERED_BUF optimization hint

2022-09-02 Thread David Hildenbrand
On 30.08.22 22:16, Stefan Hajnoczi wrote: > On Thu, Aug 25, 2022 at 09:43:16AM +0200, David Hildenbrand wrote: >> On 23.08.22 21:22, Stefan Hajnoczi wrote: >>> On Tue, Aug 23, 2022 at 10:01:59AM +0200, David Hildenbrand wrote: On 23.08.22 00:24, Stefan Hajnoczi wrote: > Register guest RAM