Re: [RFC PATCH v1 0/2] vhost-vdpa: cache Virtio states

2023-04-24 Thread Eugenio Perez Martin
On Sat, Apr 22, 2023 at 8:39 AM Shao-Chien Chiang wrote: > > Hi, > > I found a problem about cache. > > If there are several devices operating the same backend device, the > cache might be inconsistent. > Hi Shao-Chien, What do you mean by "several devices operating the same backend device". The

Re: [RFC PATCH v3 13/44] target/loongarch: Implement vmax/vmin

2023-04-24 Thread Richard Henderson
On 4/20/23 09:06, Song Gao wrote: This patch includes: - VMAX[I].{B/H/W/D}[U]; - VMIN[I].{B/H/W/D}[U]. Signed-off-by: Song Gao --- target/loongarch/disas.c| 33 target/loongarch/helper.h | 18 ++ target/loongarch/insn_trans/trans_lsx.c.inc | 200 +

Re: [RFC PATCH v3 14/44] target/loongarch: Implement vmul/vmuh/vmulw{ev/od}

2023-04-24 Thread Richard Henderson
On 4/20/23 09:06, Song Gao wrote: @@ -972,6 +972,33 @@ void tcg_gen_mulsu2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv_i32 arg1, TCGv_i32 arg2) } } +void tcg_gen_mulus2_i32(TCGv_i32 rl, TCGv_i32 rh, TCGv_i32 arg1, TCGv_i32 arg2) +{ +if (TCG_TARGET_REG_BITS == 32) { +TCGv_i32 t0 =

RE: [PATCH v2 6/6] tests/migration: Only run auto_converge in slow mode

2023-04-24 Thread Zhang, Chen
> -Original Message- > From: Daniel P. Berrangé > Sent: Saturday, April 22, 2023 1:14 AM > To: qemu-devel@nongnu.org > Cc: qemu-bl...@nongnu.org; Paolo Bonzini ; > Thomas Huth ; John Snow ; Li > Zhijian ; Juan Quintela ; > Stefan Hajnoczi ; Zhang, Chen > ; Laurent Vivier > Subject: [PA

RE: [PATCH v2 6/6] tests/migration: Only run auto_converge in slow mode

2023-04-24 Thread Zhang, Chen
> -Original Message- > From: Thomas Huth > Sent: Monday, April 24, 2023 2:56 PM > To: quint...@redhat.com; Zhang, Chen > Cc: Daniel P. Berrangé ; qemu-devel@nongnu.org; > qemu-bl...@nongnu.org; Paolo Bonzini ; John > Snow ; Li Zhijian ; Stefan > Hajnoczi ; Laurent Vivier > Subject: Re:

Re: [PATCH] block/monitor/block-hmp-cmds.c: Fix crash when execute hmp_commit

2023-04-24 Thread Emanuele Giuseppe Esposito
Am 23/04/2023 um 13:02 schrieb wanglian...@126.com: > From: Wang Liang > > We need to get the aio_context before calling the blk_is_available. > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1615 > Signed-off-by: Wang Liang > Reviewed-by: Emanuele Giuseppe Esposito

Re: [PATCH 07/13] hw/ide: Extract pci_ide_{cmd,data}_le_ops initialization into base class constructor

2023-04-24 Thread Bernhard Beschow
Am 23. April 2023 17:46:18 UTC schrieb "Philippe Mathieu-Daudé" : >On 22/4/23 17:07, Bernhard Beschow wrote: >> There is redundant code in cmd646 and via which can be extracted into the >> base >> class. In case of piix and sii3112 this is currently unneccessary but >> shouldn't >> interfere

Re: [PATCH 02/13] hw/ide/via: Implement ISA IRQ routing

2023-04-24 Thread Bernhard Beschow
Am 22. April 2023 19:21:12 UTC schrieb BALATON Zoltan : >On Sat, 22 Apr 2023, Bernhard Beschow wrote: >> Am 22. April 2023 17:23:56 UTC schrieb BALATON Zoltan : >>> On Sat, 22 Apr 2023, Bernhard Beschow wrote: The VIA south bridge allows the legacy IDE interrupts to be routed to four d

Re: [PATCH v4 01/11] Signed-off-by: Karim Taha

2023-04-24 Thread Daniel P . Berrangé
You've not fully addressed the feedback on v3. The first line of the commit message needs to be a short sumary, not the Signed-off-by, which should be at the end of the commit message On Fri, Apr 21, 2023 at 06:53:41PM +0200, Karim Taha wrote: > From: Warner Losh > > Intialize guest_base in bsd

Re: [PATCH] block/monitor/block-hmp-cmds.c: Fix crash when execute hmp_commit

2023-04-24 Thread Emanuele Giuseppe Esposito
Am 24/04/2023 um 10:15 schrieb Emanuele Giuseppe Esposito: > > > Am 23/04/2023 um 13:02 schrieb wanglian...@126.com: >> From: Wang Liang >> >> We need to get the aio_context before calling the blk_is_available. >> >> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1615 >> Signed-off-b

Re: [PATCH v5] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64

2023-04-24 Thread Alex Bennée
Kautuk Consul writes: > Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the > boot_linux.py test-case due to which the code coverage for ppc > decreased by around 2%. As per the discussion on > https://lore.kernel.org/qemu-devel/87sfdpqcy4@linaro.org/ it > was mentioned that the ba

Re: [PATCH] hw/riscv/virt: Add a second UART for secure world

2023-04-24 Thread Peter Maydell
On Mon, 24 Apr 2023 at 07:24, Yong Li wrote: > > The virt machine can have two UARTs and the second UART > can be used when host secure-mode support is enabled. Do you mean "host" here, or "guest" ? > Signed-off-by: Yong Li > --- > hw/riscv/virt.c | 4 > include/hw/riscv/virt.h |

Re: [PATCH] Don't require libcap-ng for virtfs support

2023-04-24 Thread Christian Schoenebeck
On Friday, April 21, 2023 3:53:27 PM CEST Peter Foley wrote: > It's only required for the proxy helper. > > Signed-off-by: Peter Foley > --- > meson.build | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/meson.build b/meson.build > index c44d05a13f..1d4888b1c0 1006

Re: [PATCH v5] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64

2023-04-24 Thread Kautuk Consul
On 2023-04-24 09:53:23, Alex Bennée wrote: > > Kautuk Consul writes: > > > Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the > > boot_linux.py test-case due to which the code coverage for ppc > > decreased by around 2%. As per the discussion on > > https://lore.kernel.org/qemu-devel/8

[PATCH 0/6] Add RISC-V KVM AIA Support

2023-04-24 Thread Yong-Xuan Wang
This series introduces support for KVM AIA in the RISC-V architecture. The implementation is refered to Anup's KVM AIA implementation in kvmtool (https://github.com/avpatel/kvmtool.git). To test these patches, a Linux kernel with KVM AIA support is required, which can be found in the qemu_kvm_aia b

[PATCH 5/6] target/riscv: update APLIC and IMSIC to support KVM AIA

2023-04-24 Thread Yong-Xuan Wang
- Do not set the mmio operations of APLIC and IMSIC when using KVM AIA - Send interrupt signal to KVM AIA via KVM_IRQ_LINE API Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- hw/intc/riscv_aplic.c | 19 +++ hw/intc/riscv_imsic.c | 16 +++- 2 files changed, 26

[PATCH 4/6] target/riscv: Create an KVM AIA irqchip

2023-04-24 Thread Yong-Xuan Wang
implement a function to create an KVM AIA chip Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- target/riscv/kvm.c | 83 target/riscv/kvm_riscv.h | 3 ++ 2 files changed, 86 insertions(+) diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c

[PATCH 6/6] target/riscv: select KVM AIA in riscv virt machine

2023-04-24 Thread Yong-Xuan Wang
Select KVM AIA when the host kernel has in-kernel AIA chip support. Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- hw/riscv/virt.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 18aede7b23..908b304991 100644 --- a/hw/riscv/virt.c

[PATCH 1/6] update-linux-headers: sync-up header with Linux for KVM AIA support

2023-04-24 Thread Yong-Xuan Wang
Sync-up Linux header to get latest KVM RISC-V headers having AIA support. Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- linux-headers/linux/kvm.h | 2 ++ target/riscv/kvm_riscv.h | 33 + 2 files changed, 35 insertions(+) diff --git a/linux-headers/lin

Re: [PATCH 9/9] docs/style: call out the use of GUARD macros

2023-04-24 Thread Alex Bennée
Vladimir Sementsov-Ogievskiy writes: > On 20.04.23 18:57, Alex Bennée wrote: >> There use makes our code safer so we should mention them. >> Signed-off-by: Alex Bennée > > Reviewed-by: Vladimir Sementsov-Ogievskiy > > >> --- >> docs/devel/style.rst | 36

[PATCH 3/6] target/riscv: check the in-kernel irqchip support

2023-04-24 Thread Yong-Xuan Wang
We check the in-kernel irqchip support when using KVM acceleration. Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- target/riscv/kvm.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/target/riscv/kvm.c b/target/riscv/kvm.c index 30f21453d6..6aad25bbc3 10

[PATCH 2/6] target/riscv: support the AIA device emulateion with KVM enabled

2023-04-24 Thread Yong-Xuan Wang
Remove M mode AIA devices when using KVM acceleration Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- hw/riscv/virt.c | 204 +--- 1 file changed, 108 insertions(+), 96 deletions(-) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index a5bc7353b

[PATCH v11 08/12] parallels: Fix statistics calculation

2023-04-24 Thread Alexander Ivanov
Exclude out-of-image clusters from allocated and fragmented clusters calculation. Signed-off-by: Alexander Ivanov --- block/parallels.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index 8588c3d775..f389a74466 100644 --- a/block/p

[PATCH v11 02/12] parallels: Fix high_off calculation in parallels_co_check()

2023-04-24 Thread Alexander Ivanov
Don't let high_off be more than the file size even if we don't fix the image. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/parallels.c b/

[PATCH v11 00/12] parallels: Refactor the code of images checks and fix a bug

2023-04-24 Thread Alexander Ivanov
Fix image inflation when offset in BAT is out of image. Replace whole BAT syncing by flushing only dirty blocks. Move all the checks outside the main check function in separate functions Use WITH_QEMU_LOCK_GUARD for simplier code. Fix incorrect condition in out-of-image check. v11: 1: Use bdrv

[PATCH v11 04/12] parallels: create parallels_set_bat_entry_helper() to assign BAT value

2023-04-24 Thread Alexander Ivanov
This helper will be reused in next patches during parallels_co_check rework to simplify its code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff

[PATCH v11 09/12] parallels: Move check of leaks to a separate function

2023-04-24 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov --- block/parallels.c | 90 --- 1 file changed, 53 insertions(+)

[PATCH v11 05/12] parallels: Use generic infrastructure for BAT writing in parallels_co_check()

2023-04-24 Thread Alexander Ivanov
BAT is written in the context of conventional operations over the image inside bdrv_co_flush() when it calls parallels_co_flush_to_os() callback. Thus we should not modify BAT array directly, but call parallels_set_bat_entry() helper and bdrv_co_flush() further on. After that there is no need to ma

Re: [PATCH 01/11] Signed-off-by: Karim Taha

2023-04-24 Thread Alex Bennée
Karim Taha writes: > I made a fork on gitlab and pushed a branch at > https://gitlab.com/Kariiem/qemu/-/tree/gsoc23-task3/ . OK so I can see the original commits are not following the correct form so this wasn't introduced by the tool send the emails. As Daniel mentioned previously the format

[PATCH v11 12/12] parallels: Incorrect condition in out-of-image check

2023-04-24 Thread Alexander Ivanov
All the offsets in the BAT must be lower than the file size. Fix the check condition for correct check. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c ind

[PATCH v11 06/12] parallels: Move check of unclean image to a separate function

2023-04-24 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 31 +

[PATCH v11 03/12] parallels: Fix image_end_offset and data_end after out-of-image check

2023-04-24 Thread Alexander Ivanov
Set data_end to the end of the last cluster inside the image. In such a way we can be sure that corrupted offsets in the BAT can't affect on the image size. If there are no allocated clusters set image_end_offset by data_end. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block

[PATCH v11 10/12] parallels: Move statistic collection to a separate function

2023-04-24 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 52 +

[PATCH v11 11/12] parallels: Replace qemu_co_mutex_lock by WITH_QEMU_LOCK_GUARD

2023-04-24 Thread Alexander Ivanov
Replace the way we use mutex in parallels_co_check() for simplier and less error prone code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/block/parallels.

[PATCH v11 07/12] parallels: Move check of cluster outside image to a separate function

2023-04-24 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 79 ++- 1 f

[PATCH v11 01/12] parallels: Out of image offset in BAT leads to image inflation

2023-04-24 Thread Alexander Ivanov
data_end field in BDRVParallelsState is set to the biggest offset present in BAT. If this offset is outside of the image, any further write will create the cluster at this offset and/or the image will be truncated to this offset on close. This is definitely not correct. Raise an error in parallels

[PATCH 01/18] tests/requirements.txt: bump up avocado-framework version to 101.0

2023-04-24 Thread Alex Bennée
From: Kautuk Consul Avocado version 101.0 has a fix to re-compute the checksum of an asset file if the algorithm used in the *-CHECKSUM file isn't the same as the one being passed to it by the avocado user (i.e. the avocado_qemu python module). In the earlier avocado versions this fix wasn't ther

[PATCH 03/18] tests/avocado: Add set of boot tests on SBSA-ref

2023-04-24 Thread Alex Bennée
From: Philippe Mathieu-Daudé This change adds set of boot tests on SBSA-ref machine: 1. boot firmware up to the EDK2 banner 2. boot Alpine Linux Prebuilt flash volumes are included, built using upstream documentation. To unify tests for AArch64/virt and AArch64/sbsa-ref we boot the same Alpine

[PATCH 17/18] docs/devel: mention the spacing requirement for QOM

2023-04-24 Thread Alex Bennée
We have a more complete document on QOM but we should at least mention the style requirements in the style guide. Signed-off-by: Alex Bennée Cc: Mark Cave-Ayland Reviewed-by: Juan Quintela Message-Id: <20230420155723.1711048-9-alex.ben...@linaro.org> --- vppr: - use Mark's formulation, brief

[PATCH 09/18] tests/avocado/machine_aspeed: Fix the broken ast2[56]00_evb_sdk tests

2023-04-24 Thread Alex Bennée
From: Thomas Huth test_arm_ast2500_evb_sdk and test_arm_ast2600_evb_sdk are currently failing. The problem is that they are trying to look for the login prompt that does not have a newline at the end - but the logic in _console_interaction() only handles full lines. It used to work by accident in

[PATCH 00/18] testing/next: avocado, docs (pre-PR)

2023-04-24 Thread Alex Bennée
This is my pre-PR tree for the current state of testing/next and the various documentation patches that haven't been picked up by others. I'll look to send the PR later in the week. The following patches still need review: tests/tcg: limit the scope of the plugin tests (1 acks, 1 sobs, 0 tbs)

[PATCH 07/18] .gitlab-ci.d/cirrus: Drop the CI job for compiling with FreeBSD 12

2023-04-24 Thread Alex Bennée
From: Thomas Huth FreeBSD 13.0 has been released in April 2021: https://www.freebsd.org/releases/13.0R/announce/ According to QEMU's support policy, we stop supporting the previous major release two years after the the new major release has been published. So we can stop testing FreeBSD 12 in

[PATCH 05/18] scripts/device-crash-test: Add a parameter to run with TCG only

2023-04-24 Thread Alex Bennée
From: Thomas Huth We're currently facing the problem that the device-crash-test script runs twice as long in the CI when a runner supports KVM - which sometimes results in a timeout of the CI job. To get a more deterministic runtime here, add an option to the script that allows to run it with TCG

[PATCH 14/18] qemu-options.hx: Update descriptions of memory options for NUMA node

2023-04-24 Thread Alex Bennée
From: Yohei Kojima This commit adds the following description: 1. `memdev` option is recommended over `mem` option (see [1,2]) 2. users must specify memory for all NUMA nodes (see [2]) This commit also separates descriptions for `mem` and `memdev` into two paragraphs. The old doc describes legac

[PATCH 12/18] tests/avocado/tuxrun_baselines.py: improve code coverage for ppc64

2023-04-24 Thread Alex Bennée
From: Kautuk Consul Commit c0c8687ef0fd990db8db1655a8a6c5a5e35dd4bb disabled the boot_linux.py test-case due to which the code coverage for ppc decreased by around 2%. As per the discussion on https://lore.kernel.org/qemu-devel/87sfdpqcy4@linaro.org/ it was mentioned that the baseline test fo

[PATCH 11/18] avocado_qemu/__init__.py: factor out the qemu-img finding

2023-04-24 Thread Alex Bennée
From: Kautuk Consul Factor out the code that finds the qemu-img binary in the QemuSystemTest class and create a new get_qemu_img() function with it. This function will get called also from the new code in tuxrun_baselines.py avocado test-case. Signed-off-by: Kautuk Consul Reviewed-by: Harsh Pra

[PATCH 06/18] qemu-options: finesse the recommendations around -blockdev

2023-04-24 Thread Alex Bennée
We are a bit premature in recommending -blockdev/-device as the best way to configure block devices. It seems there are times the more human friendly -drive still makes sense especially when -snapshot is involved. Improve the language to hopefully make things clearer. Suggested-by: Michael Tokare

[PATCH 04/18] gitlab-ci: Avoid to re-run "configure" in the device-crash-test jobs

2023-04-24 Thread Alex Bennée
From: Thomas Huth After "make check-venv" had been added to these jobs, they started to re-run "configure" each time since our logic in the makefile thinks that some files are out of date here. Avoid it with the same trick that we are using in buildtest-template.yml already by disabling the up-to

[PATCH 15/18] docs/system: remove excessive punctuation from guest-loader docs

2023-04-24 Thread Alex Bennée
A possessive its needs no ' whereas the contraction of it is does. Signed-off-by: Alex Bennée Reviewed-by: Juan Quintela Reviewed-by: Thomas Huth Message-Id: <20230420155723.1711048-7-alex.ben...@linaro.org> --- docs/system/guest-loader.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deleti

[PATCH 02/18] tests/avocado: use the new snapshots for testing

2023-04-24 Thread Alex Bennée
The tuxboot images now have a stable snapshot URL so we can enable the checksums and remove the avocado warnings. We will have to update as old snapshots retire but that won't be too frequent. Signed-off-by: Alex Bennée --- tests/avocado/tuxrun_baselines.py | 170 +-

[PATCH 10/18] MAINTAINERS: Cover tests/avocado/machine_aspeed.py

2023-04-24 Thread Alex Bennée
From: Thomas Huth tests/avocado/machine_aspeed.py should belong to the ASPEED section in the maintainers file. Improve the wildcards here a little bit, so that it is covered, too. Signed-off-by: Thomas Huth Reviewed-by: Cédric Le Goater Message-Id: <20230421110345.1294131-4-th...@redhat.com> S

[PATCH 08/18] tests/avocado: Make ssh_command_output_contains() globally available

2023-04-24 Thread Alex Bennée
From: Thomas Huth This function will be useful in other tests, too, so move it to the core LinuxSSHMixIn class. Signed-off-by: Thomas Huth Reviewed-by: Cédric Le Goater Message-Id: <20230421110345.1294131-2-th...@redhat.com> Signed-off-by: Alex Bennée --- tests/avocado/avocado_qemu/__init__.

Re: [PATCH] block/monitor/block-hmp-cmds.c: Fix crash when execute hmp_commit

2023-04-24 Thread Wang Liang
On Mon, 2023-04-24 at 10:36 +0200, Emanuele Giuseppe Esposito wrote: > > Am 24/04/2023 um 10:15 schrieb Emanuele Giuseppe Esposito: > > > > Am 23/04/2023 um 13:02 schrieb wanglian...@126.com: > > > From: Wang Liang > > > > > > We need to get the aio_context before calling the > > > blk_is_avail

Re: [PATCH 02/18] tests/avocado: use the new snapshots for testing

2023-04-24 Thread Thomas Huth
On 24/04/2023 11.22, Alex Bennée wrote: The tuxboot images now have a stable snapshot URL so we can enable the checksums and remove the avocado warnings. We will have to update as old snapshots retire but that won't be too frequent. Signed-off-by: Alex Bennée --- tests/avocado/tuxrun_baseline

Re: [RFC] hw/arm/virt: Provide DT binding generation for PCI eXpander Bridges

2023-04-24 Thread Peter Maydell
On Fri, 21 Apr 2023 at 17:50, Jonathan Cameron wrote: > > This patch and the problem it is trying to resolve will form part of a talk > I will be giving next week at Linaro Connect. https://sched.co/1K85p > > So in the spirit of giving people almost no warning... Plus being able to > say the discu

[PATCH 18/18] docs/style: call out the use of GUARD macros

2023-04-24 Thread Alex Bennée
There use makes our code safer so we should mention them. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Reviewed-by: Vladimir Sementsov-Ogievskiy Message-Id: <20230420155723.1711048-10-alex.ben...@linaro.org> --- vppr: - show example of what QEMU_

Re: [PATCH v11 00/12] parallels: Refactor the code of images checks and fix a bug

2023-04-24 Thread Alexander Ivanov
Sorry, this patchset has incorrect//recipients. On 4/24/23 11:16, Alexander Ivanov wrote: Fix image inflation when offset in BAT is out of image. Replace whole BAT syncing by flushing only dirty blocks. Move all the checks outside the main check function in separate functions Use WITH_QEMU_LO

[PATCH 13/18] tests/tcg: limit the scope of the plugin tests

2023-04-24 Thread Alex Bennée
Running every plugin with every test is getting excessive as well as not really improving coverage that much. Restrict the plugin tests to just the MULTIARCH_TESTS which are shared between most architecture for both system and user-mode. For those that aren't we need to squash MULTIARCH_TESTS so we

[PATCH 16/18] docs/devel: make a statement about includes

2023-04-24 Thread Alex Bennée
While not explicitly disallowing header macro abuse (because that would make us hypocrites) lets at least address some things to think about. Signed-off-by: Alex Bennée Reviewed-by: Juan Quintela Message-Id: <20230420155723.1711048-8-alex.ben...@linaro.org> --- docs/devel/style.rst | 14 +++

[PATCH v11 03/12] parallels: Fix image_end_offset and data_end after out-of-image check

2023-04-24 Thread Alexander Ivanov
Set data_end to the end of the last cluster inside the image. In such a way we can be sure that corrupted offsets in the BAT can't affect on the image size. If there are no allocated clusters set image_end_offset by data_end. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block

[PATCH v11 01/12] parallels: Out of image offset in BAT leads to image inflation

2023-04-24 Thread Alexander Ivanov
data_end field in BDRVParallelsState is set to the biggest offset present in BAT. If this offset is outside of the image, any further write will create the cluster at this offset and/or the image will be truncated to this offset on close. This is definitely not correct. Raise an error in parallels

[PATCH v11 02/12] parallels: Fix high_off calculation in parallels_co_check()

2023-04-24 Thread Alexander Ivanov
Don't let high_off be more than the file size even if we don't fix the image. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/parallels.c b/

[PATCH v11 05/12] parallels: Use generic infrastructure for BAT writing in parallels_co_check()

2023-04-24 Thread Alexander Ivanov
BAT is written in the context of conventional operations over the image inside bdrv_co_flush() when it calls parallels_co_flush_to_os() callback. Thus we should not modify BAT array directly, but call parallels_set_bat_entry() helper and bdrv_co_flush() further on. After that there is no need to ma

[PATCH v11 07/12] parallels: Move check of cluster outside image to a separate function

2023-04-24 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 79 ++- 1 f

[PATCH v11 04/12] parallels: create parallels_set_bat_entry_helper() to assign BAT value

2023-04-24 Thread Alexander Ivanov
This helper will be reused in next patches during parallels_co_check rework to simplify its code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff

[PATCH v11 06/12] parallels: Move check of unclean image to a separate function

2023-04-24 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 31 +

[PATCH v11 00/12] parallels: Refactor the code of images checks and fix a bug

2023-04-24 Thread Alexander Ivanov
Fix image inflation when offset in BAT is out of image. Replace whole BAT syncing by flushing only dirty blocks. Move all the checks outside the main check function in separate functions Use WITH_QEMU_LOCK_GUARD for simplier code. Fix incorrect condition in out-of-image check. v11: 1: Use bdrv

[PATCH v11 10/12] parallels: Move statistic collection to a separate function

2023-04-24 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev Reviewed-by: Vladimir Sementsov-Ogievskiy --- block/parallels.c | 52 +

[PATCH v11 08/12] parallels: Fix statistics calculation

2023-04-24 Thread Alexander Ivanov
Exclude out-of-image clusters from allocated and fragmented clusters calculation. Signed-off-by: Alexander Ivanov --- block/parallels.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c index 8588c3d775..f389a74466 100644 --- a/block/p

[PATCH v11 12/12] parallels: Incorrect condition in out-of-image check

2023-04-24 Thread Alexander Ivanov
All the offsets in the BAT must be lower than the file size. Fix the check condition for correct check. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/parallels.c b/block/parallels.c ind

[PATCH v11 09/12] parallels: Move check of leaks to a separate function

2023-04-24 Thread Alexander Ivanov
We will add more and more checks so we need a better code structure in parallels_co_check. Let each check performs in a separate loop in a separate helper. Signed-off-by: Alexander Ivanov --- block/parallels.c | 90 --- 1 file changed, 53 insertions(+)

[PATCH v11 11/12] parallels: Replace qemu_co_mutex_lock by WITH_QEMU_LOCK_GUARD

2023-04-24 Thread Alexander Ivanov
Replace the way we use mutex in parallels_co_check() for simplier and less error prone code. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 33 ++--- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/block/parallels.

RE: [PATCH v3 29/47] igb: Rename a variable in igb_receive_internal()

2023-04-24 Thread Sriram Yagnaraman
> -Original Message- > From: Akihiko Odaki > Sent: Sunday, 23 April 2023 06:18 > Cc: Sriram Yagnaraman ; Jason Wang > ; Dmitry Fleytman ; > Michael S . Tsirkin ; Alex Bennée > ; Philippe Mathieu-Daudé ; > Thomas Huth ; Wainer dos Santos Moschetta > ; Beraldo Leal ; Cleber Rosa > ; Laurent

RE: [PATCH v3 36/47] igb: Implement Rx SCTP CSO

2023-04-24 Thread Sriram Yagnaraman
> -Original Message- > From: Akihiko Odaki > Sent: Sunday, 23 April 2023 06:18 > Cc: Sriram Yagnaraman ; Jason Wang > ; Dmitry Fleytman ; > Michael S . Tsirkin ; Alex Bennée > ; Philippe Mathieu-Daudé ; > Thomas Huth ; Wainer dos Santos Moschetta > ; Beraldo Leal ; Cleber Rosa > ; Lauren

RE: [PATCH v3 37/47] igb: Implement Tx SCTP CSO

2023-04-24 Thread Sriram Yagnaraman
> -Original Message- > From: Akihiko Odaki > Sent: Sunday, 23 April 2023 06:18 > Cc: Sriram Yagnaraman ; Jason Wang > ; Dmitry Fleytman ; > Michael S . Tsirkin ; Alex Bennée > ; Philippe Mathieu-Daudé ; > Thomas Huth ; Wainer dos Santos Moschetta > ; Beraldo Leal ; Cleber Rosa > ; Lauren

RE: [PATCH v3 06/47] igb: Clear IMS bits when committing ICR access

2023-04-24 Thread Sriram Yagnaraman
> -Original Message- > From: Akihiko Odaki > Sent: Sunday, 23 April 2023 06:18 > Cc: Sriram Yagnaraman ; Jason Wang > ; Dmitry Fleytman ; > Michael S . Tsirkin ; Alex Bennée > ; Philippe Mathieu-Daudé ; > Thomas Huth ; Wainer dos Santos Moschetta > ; Beraldo Leal ; Cleber Rosa > ; Laurent

RE: [PATCH v3 40/47] igb: Implement igb-specific oversize check

2023-04-24 Thread Sriram Yagnaraman
> -Original Message- > From: Akihiko Odaki > Sent: Sunday, 23 April 2023 06:18 > Cc: Sriram Yagnaraman ; Jason Wang > ; Dmitry Fleytman ; > Michael S . Tsirkin ; Alex Bennée > ; Philippe Mathieu-Daudé ; > Thomas Huth ; Wainer dos Santos Moschetta > ; Beraldo Leal ; Cleber Rosa > ; Laurent

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

2023-04-24 Thread Alexander Ivanov
This patchset should be applied on the top of [PATCH v10 00/12] parallels: Refactor the code of images checks and fix a bug. Fix incorrect data end calculation in parallels_open(). Split image leak handling to separate check and fix helpers. Add checking and repairing duplicate offsets in BAT R

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

2023-04-24 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 | 65 +-- 1 file changed, 35 insertions(+), 30 deletions(-) diff --git a/block/parallels.c b/block/parall

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

2023-04-24 Thread Alexander Ivanov
Cluster offsets must be unique among all the BAT entries. Find duplicate offsets in the BAT and fix it by copying the content of the relevant cluster to a newly allocated cluster and set the new cluster offset to the duplicated entry. Add host_cluster_index() helper to deduplicate the code. Move

[PATCH v4 4/5] parallels: Replace fprintf by qemu_log in check

2023-04-24 Thread Alexander Ivanov
If the check is called during normal work, tracking of the check must be present in VM logs to have some clues if something going wrong with user's data. Signed-off-by: Alexander Ivanov Reviewed-by: Denis V. Lunev --- block/parallels.c | 18 +- 1 file changed, 9 insertions(+), 9

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

2023-04-24 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

[PATCH v4 2/5] parallels: Split image leak handling to separate check and fix helpers

2023-04-24 Thread Alexander Ivanov
We need to fix leak after deduplication in the next patch. Move leak fixing to a separate helper parallels_fix_leak() and add parallels_get_leak_size() helper wich used in parallels_fix_leak() and parallels_check_leak(). Signed-off-by: Alexander Ivanov --- block/parallels.c | 86

Re: [PATCH v2 3/6] tests/qtest: capture RESUME events during migration

2023-04-24 Thread Daniel P . Berrangé
On Fri, Apr 21, 2023 at 11:59:25PM +0200, Juan Quintela wrote: > Daniel P. Berrangé wrote: > > When running migration tests we monitor for a STOP event so we can skip > > redundant waits. This will be needed for the RESUME event too shortly. > > > > Signed-off-by: Daniel P. Berrangé > > Reviewed

Re: [PULL 00/20] Migration 20230420 patches

2023-04-24 Thread Juan Quintela
Juan Quintela wrote: > Richard Henderson wrote: >> On 4/22/23 10:21, Juan Quintela wrote: >>> Richard Henderson wrote: On 4/20/23 14:17, Juan Quintela wrote: >> I'll note that mips32 and armv6 (that is, *not* debian's armv7 based >> armhf distro) are the only hosts we have that don't have

Re: [PATCH v3 10/10] hmp: Deprecate 'singlestep' member of StatusInfo

2023-04-24 Thread Peter Maydell
Markus -- could I trouble you for a quick review of this patch? It's the only one in the series that touches QMP. Everything else has been reviewed so otherwise this series is ready to go in. thanks -- PMM On Mon, 17 Apr 2023 at 17:40, Peter Maydell wrote: > > The 'singlestep' member of StatusIn

Re: [PATCH 02/13] hw/ide/via: Implement ISA IRQ routing

2023-04-24 Thread BALATON Zoltan
On Mon, 24 Apr 2023, Bernhard Beschow wrote: Am 22. April 2023 19:21:12 UTC schrieb BALATON Zoltan : On Sat, 22 Apr 2023, Bernhard Beschow wrote: Am 22. April 2023 17:23:56 UTC schrieb BALATON Zoltan : On Sat, 22 Apr 2023, Bernhard Beschow wrote: The VIA south bridge allows the legacy IDE int

Re: [PATCH v2 RESEND] xen: Fix SEGV on domain disconnect

2023-04-24 Thread Paul Durrant
On 20/04/2023 12:02, mark.s...@citrix.com wrote: From: Mark Syms Ensure the PV ring is drained on disconnect. Also ensure all pending AIO is complete, otherwise AIO tries to complete into a mapping of the ring which has been torn down. Signed-off-by: Mark Syms --- CC: Stefano Stabellini CC:

Re: [PATCH] hw/riscv/virt: Add a second UART for secure world

2023-04-24 Thread Li, Yong
On 2023/4/24 16:59, Peter Maydell wrote: On Mon, 24 Apr 2023 at 07:24, Yong Li wrote: The virt machine can have two UARTs and the second UART can be used when host secure-mode support is enabled. Do you mean "host" here, or "guest" ? Currently, it is an UEFI secure firmware residing in a se

Re: [PATCH 07/18] .gitlab-ci.d/cirrus: Drop the CI job for compiling with FreeBSD 12

2023-04-24 Thread Richard Henderson
On 4/24/23 10:22, Alex Bennée wrote: From: Thomas Huth FreeBSD 13.0 has been released in April 2021: https://www.freebsd.org/releases/13.0R/announce/ According to QEMU's support policy, we stop supporting the previous major release two years after the the new major release has been published

[PATCH] hw/riscv/virt: Add a second UART for secure world

2023-04-24 Thread Yong Li
The virt machine can have two UARTs and the second UART can be used when host secure-mode support is enabled. Signed-off-by: Yong Li --- hw/riscv/virt.c | 4 include/hw/riscv/virt.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index b38b41

Re: [PATCH v3 06/47] igb: Clear IMS bits when committing ICR access

2023-04-24 Thread Akihiko Odaki
On 2023/04/24 18:29, Sriram Yagnaraman wrote: -Original Message- From: Akihiko Odaki Sent: Sunday, 23 April 2023 06:18 Cc: Sriram Yagnaraman ; Jason Wang ; Dmitry Fleytman ; Michael S . Tsirkin ; Alex Bennée ; Philippe Mathieu-Daudé ; Thomas Huth ; Wainer dos Santos Moschetta ; Beraldo L

Re: [PATCH v2] block/monitor/block-hmp-cmds.c: Fix crash when execute hmp_commit

2023-04-24 Thread Emanuele Giuseppe Esposito
Am 24/04/2023 um 12:39 schrieb wanglian...@126.com: > From: Wang Liang > > hmp_commit() calls blk_is_available() from a non-coroutine context (and in > the main loop). blk_is_available() is a co_wrapper_mixed_bdrv_rdlock > function, and in the non-coroutine context it calls AIO_WAIT_WHILE(), >

[PATCH v2] hw/riscv/virt: Add a second UART for secure world

2023-04-24 Thread Yong Li
The virt machine can have two UARTs and the second UART can be used by the secure payload, firmware or OS residing in secure world. Signed-off-by: Yong Li --- hw/riscv/virt.c | 4 include/hw/riscv/virt.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/hw/riscv/virt.c b/hw/ris

[PATCH v2] block/monitor/block-hmp-cmds.c: Fix crash when execute hmp_commit

2023-04-24 Thread wangliangzz
From: Wang Liang hmp_commit() calls blk_is_available() from a non-coroutine context (and in the main loop). blk_is_available() is a co_wrapper_mixed_bdrv_rdlock function, and in the non-coroutine context it calls AIO_WAIT_WHILE(), which crashes if the aio_context lock is not taken before. Resolv

Re: [PATCH] accel/kvm: Specify default IPA size for arm64

2023-04-24 Thread Akihiko Odaki
On 2023/01/16 20:18, Peter Maydell wrote: On Sat, 14 Jan 2023 at 06:49, Akihiko Odaki wrote: On 2023/01/14 14:23, Richard Henderson wrote: On 1/8/23 22:22, Akihiko Odaki wrote: libvirt uses "none" machine type to test KVM availability. Before this change, QEMU used to pass 0 as machine type

[PULL 11/17] migration: Rename normal to normal_pages

2023-04-24 Thread Juan Quintela
Rest of counters that refer to pages has a _pages suffix. And historically, this showed the number of full pages transferred. The name "normal" refered to the fact that they were sent without any optimization (compression, xbzrle, zero_page, ...). Signed-off-by: Juan Quintela Reviewed-by: Peter X

[PULL 05/17] migration: Make dirty_sync_missed_zero_copy atomic

2023-04-24 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Peter Xu --- migration/migration.c | 2 +- migration/multifd.c | 2 +- migration/ram.c | 5 - migration/ram.h | 4 +--- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/migration/migration.c b/migration/migration.c index

[PULL 15/17] migration/postcopy: Detect file system on dest host

2023-04-24 Thread Juan Quintela
From: Peter Xu Postcopy requires the memory support userfaultfd to work. Right now we check it but it's a bit too late (when switching to postcopy migration). Do that early right at enabling of postcopy. Note that this is still only a best effort because ramblocks can be dynamically created.

[PULL 02/17] migration: Merge ram_counters and ram_atomic_counters

2023-04-24 Thread Juan Quintela
Using MgrationStats as type for ram_counters mean that we didn't have to re-declare each value in another struct. The need of atomic counters have make us to create MigrationAtomicStats for this atomic counters. Create RAMStats type which is a merge of MigrationStats and MigrationAtomicStats remov

  1   2   3   4   >