[PATCH v3 01/11] tests/qtest/boot-serial-test: Constify tests[] array

2023-01-20 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- tests/qtest/boot-serial-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index b216519b62..3aef3a97a9 100644 --- a/tests/qtest/boot-s

[PATCH v3 03/11] tests/qtest/boot-serial-test: Build command line using GString API

2023-01-20 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- tests/qtest/boot-serial-test.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index 3a854b0174..92890b409d 100644

[PATCH v3 06/11] tests/qtest/migration-test: Reduce 'cmd_source' string scope

2023-01-20 Thread Philippe Mathieu-Daudé
Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/migration-test.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 5271ddb868..f96c73f552 10064

[PATCH v3 02/11] tests/qtest/boot-serial-test: Simplify test_machine() a bit

2023-01-20 Thread Philippe Mathieu-Daudé
Slighly modify test_machine() to simplify next commit review. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- tests/qtest/boot-serial-test.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/tests/qtest/boot-serial-test.c b/tests

[PATCH v3 09/11] tests/qtest/migration-test: Build command line using GString API (3/4)

2023-01-20 Thread Philippe Mathieu-Daudé
Part 3/4: Convert accelerator options. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/migration-test.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 6700

[PATCH v3 00/11] tests/qtest: Allow running boot-serial / migration with TCG disabled

2023-01-20 Thread Philippe Mathieu-Daudé
Missing review: #7 Two test were failing on Darwin when testing Fabiano's series which allows building ARM targets without TCG accelerator: https://lore.kernel.org/qemu-devel/20230118193518.26433-1-faro...@suse.de/ These patches allow boot-serial / migration tests to run without TCG / KVM. Phili

[PATCH v3 10/11] tests/qtest/migration-test: Build command line using GString API (4/4)

2023-01-20 Thread Philippe Mathieu-Daudé
Part 4/4: Convert rest of options. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/migration-test.c | 53 +--- 1 file changed, 25 insertions(+), 28 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migratio

[PATCH v3 05/11] tests/qtest/migration-test: Inverse #ifdef'ry ladders

2023-01-20 Thread Philippe Mathieu-Daudé
This slighly simplify the logic, and eases the following conversion. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- tests/qtest/migration-test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migrati

[PATCH v3 04/11] tests/qtest/boot-serial-test: Only use available accelerators

2023-01-20 Thread Philippe Mathieu-Daudé
For example, avoid when TCG is disabled: $ make check-qtest-aarch64 ... 18/20 qemu:qtest+qtest-aarch64 / qtest-aarch64/boot-serial-test qemu-system-aarch64: -accel tcg: invalid accelerator tcg Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Fabiano Rosas Reviewed-by: Richard Henderso

[PATCH v3 07/11] tests/qtest/migration-test: Build command line using GString API (1/4)

2023-01-20 Thread Philippe Mathieu-Daudé
Part 1/4: Convert memory & machine options. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/migration-test.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index f96c73f552..9cdef4fa

[PATCH v3 11/11] tests/qtest/migration-test: Only use available accelerators

2023-01-20 Thread Philippe Mathieu-Daudé
For example, avoid when TCG is disabled: $ make check-qtest-aarch64 ... 20/20 qemu:qtest+qtest-aarch64 / qtest-aarch64/migration-test qemu-system-aarch64: -accel tcg: invalid accelerator tcg Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard H

[PATCH v3 08/11] tests/qtest/migration-test: Build command line using GString API (2/4)

2023-01-20 Thread Philippe Mathieu-Daudé
Part 2/4: Convert shmem option. Reviewed-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/migration-test.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 9cdef4fa65..

[PATCH v2] gitlab-ci: Check building KVM-only aarch64 target

2023-01-20 Thread Philippe Mathieu-Daudé
Add a manual new job to cross-build the aarch64 target with only the KVM accelerator enabled (in particular, no TCG). Re-enable running the similar job on the project Aarch64 custom runner. Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <20230118193518.26433-1-faro...@suse.de> tar

Re: [PATCH 17/18] gitlab: wrap up test results for custom runners

2023-01-20 Thread Thomas Huth
On 19/01/2023 19.04, Alex Bennée wrote: Instead of spewing the whole log to stdout lets just define them as build artefacts so we can examine them later. Where we are running check-tcg run it first as those tests are yet to be integrated into meson. Signed-off-by: Alex Bennée --- .gitlab-ci.d

Re: [PATCH v2] gitlab-ci: Check building KVM-only aarch64 target

2023-01-20 Thread Thomas Huth
On 20/01/2023 09.25, Philippe Mathieu-Daudé wrote: Add a manual new job to cross-build the aarch64 target with only the KVM accelerator enabled (in particular, no TCG). Re-enable running the similar job on the project Aarch64 custom runner. Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <

Re: MSYS2 and libfdt

2023-01-20 Thread Thomas Huth
On 19/01/2023 09.56, Marc-André Lureau wrote: Hi On Thu, Jan 19, 2023 at 12:31 PM Thomas Huth wrote: Hi all, in some spare minutes, I started playing with a patch to try to remove the dtc submodule from the QEMU git repository - according to https://repology.org/project/dtc/versions our

Re: [PATCH v2] travis.yml: Use the libfdt from the distro instead of the submodule

2023-01-20 Thread Philippe Mathieu-Daudé
On 20/1/23 08:53, Thomas Huth wrote: No need to compile-test third party submodules over and over again if we can simply use the pre-build library from the distribution instead. By also adding --enable-fdt=system to the configure options, we can also avoid to check out the "dtc" submodule here.

Re: [PATCH 15/25] target/arm: Allow users to set the number of VFP registers

2023-01-20 Thread Cédric Le Goater
On 1/19/23 13:34, Cédric Le Goater wrote: Cortex A7 CPUs with an FPU implementing VFPv4 without NEON support have 16 64-bit FPU registers and not 32 registers. Let users set the number of VFP registers with a CPU property. The primary use case of this property is for the Cortex A7 of the Aspeed

Re: [PATCH] mac_nvram: Add block backend to persist NVRAM contents

2023-01-20 Thread Cédric Le Goater
On 1/19/23 23:28, BALATON Zoltan wrote: Add a way to set a backing store for the mac_nvram similar to what spapr_nvram or mac_via PRAM already does to allow to save its contents between runs. Use -drive file=nvram.img,format=raw,if=mtd to specify backing file where nvram.img must be MACIO_NVRAM_S

Re: [PATCH 0/2] read kvmclock from guest memory if !correct_tsc_shift

2023-01-20 Thread Paolo Bonzini
On 1/20/23 02:11, Marcelo Tosatti wrote: Before kernel commit 78db6a5037965429c04d708281f35a6e5562d31b, kvm_guest_time_update() would use vcpu->virtual_tsc_khz to calculate tsc_shift value in the vcpus pvclock structure written to guest memory. To clarify, the problem is that kvm_guest_time_upd

Re: [PATCH v2 02/11] tests/qtest/boot-serial-test: Simplify test_machine() a bit

2023-01-20 Thread Thomas Huth
On 19/01/2023 15.58, Philippe Mathieu-Daudé wrote: Slighly modify test_machine() to simplify next commit review. Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/boot-serial-test.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/tests/qtest/boo

[RFC PATCH 0/3] migration: support query migration thread information

2023-01-20 Thread Jiang Jiacheng via
We need get more migration thread information to support migration pin, especially thread name and its pid. Add an qmp interface to query migration thread information by its name and report thread name when migration thread is started. Jiang Jiacheng (3): migration: report migration thread name

[PATCH 2/3] migration: implement query migration threadinfo by name

2023-01-20 Thread Jiang Jiacheng via
Introduce interface query-migrationthreads. The interface is use with the migration thread name reported by qemu and returns with migration thread name and its pid. Introduce threadinfo.c to manage threads with migration. Signed-off-by: Jiang Jiacheng --- migration/meson.build | 1 + migration

[PATCH 1/3] migration: report migration thread name to libvirt

2023-01-20 Thread Jiang Jiacheng via
Report migration thread name to libvirt in order to support query migration thread infomation by its name. Signed-off-by: Jiang Jiacheng --- migration/migration.c | 3 +++ migration/multifd.c | 5 - qapi/migration.json | 12 3 files changed, 19 insertions(+), 1 deletion(-)

[PATCH 3/3] migration: save/delete migration thread info

2023-01-20 Thread Jiang Jiacheng via
To support query migration thread infomation, save and delete thread information at thread creation and end. Signed-off-by: Jiang Jiacheng --- migration/migration.c | 4 migration/multifd.c | 4 2 files changed, 8 insertions(+) diff --git a/migration/migration.c b/migration/migratio

Re: [PATCH v2 03/11] tests/qtest/boot-serial-test: Build command line using GString API

2023-01-20 Thread Thomas Huth
On 19/01/2023 15.58, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/boot-serial-test.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/tests/qtest/boot-serial-test.c b/tests/qtest/boot-serial-test.c index 3a854b

Re: [PATCH v2 06/11] tests/qtest/migration-test: Reduce 'cmd_source' string scope

2023-01-20 Thread Thomas Huth
On 19/01/2023 15.58, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- tests/qtest/migration-test.c | 29 +++-- 1 file changed, 15 insertions(+), 14 deletions(-) Missing explanation in the commit description. What's the benefit of doing this?

Re: [RFC PATCH 3/3] tests/qtest/vnc-display-test: Disable on Darwin

2023-01-20 Thread Daniel P . Berrangé
On Thu, Jan 19, 2023 at 01:05:14PM +0100, Philippe Mathieu-Daudé wrote: > This test is failing in gtk-vnc on Darwin: > > $ make check-qtest-aarch64 > ... > 19/20 qemu:qtest+qtest-aarch64 / qtest-aarch64/vnc-display-test > ERROR **: 10:42:35.488: vnc-error: Unsupported auth type 17973672 >

Re: [PATCH v3 00/11] tests/qtest: Allow running boot-serial / migration with TCG disabled

2023-01-20 Thread Thomas Huth
On 20/01/2023 09.23, Philippe Mathieu-Daudé wrote: Missing review: #7 Two test were failing on Darwin when testing Fabiano's series which allows building ARM targets without TCG accelerator: https://lore.kernel.org/qemu-devel/20230118193518.26433-1-faro...@suse.de/ These patches allow boot-seri

Re: [PULL 0/5] tcg patch queue

2023-01-20 Thread Thomas Huth
On 16/01/2023 23.36, Richard Henderson wrote: The following changes since commit fb7e7990342e59cf67dbd895c1a1e3fb1741df7a: tests/qtest/qom-test: Do not print tested properties by default (2023-01-16 15:00:57 +) are available in the Git repository at: https://gitlab.com/rth7680/qemu.

Re: [PATCH v5 2/2] riscv: Allow user to set the satp mode

2023-01-20 Thread Andrew Jones
On Fri, Jan 20, 2023 at 09:46:05AM +1000, Alistair Francis wrote: > On Thu, Jan 19, 2023 at 11:00 PM Alexandre Ghiti > wrote: > > > > Hi Alistair, Andrew, > > > > On Thu, Jan 19, 2023 at 1:25 AM Alistair Francis > > wrote: > > > > > > On Wed, Jan 18, 2023 at 10:19 PM Andrew Jones > > > wrote:

Re: [PATCH v2 0/4] bulk: Replace TARGET_FMT_plx by HWADDR_PRIx

2023-01-20 Thread BALATON Zoltan
On Fri, 20 Jan 2023, Thomas Huth wrote: On 11/01/2023 09.39, Philippe Mathieu-Daudé wrote: Since v1: - Fix checkpatch style violations - Use HWADDR_PRIx instead of HWADDR_FMT_plx (Zoltan) Supersedes: <20230110212947.34557-1-phi...@linaro.org> "bulk: Rename TARGET_FMT_plx -> HWADDR_

Re: [PATCH 14/18] tests/docker: drop debian-tricore-cross's partial status

2023-01-20 Thread Alex Bennée
Richard Henderson writes: > On 1/19/23 08:04, Alex Bennée wrote: >> This image is perfectly capable of building QEMU, and indeed we do >> that on gitlab. Drop the DOCKER_PARTIAL_IMAGES setting so we can also >> test the gitlab build locally. >> Signed-off-by: Alex Bennée >> --- >> tests/docke

Re: [PATCH 10/18] Update lcitool and fedora to 37

2023-01-20 Thread Alex Bennée
Paolo Bonzini writes: > On 1/19/23 20:35, Philippe Mathieu-Daudé wrote: >> On 19/1/23 19:04, Alex Bennée wrote: >>> From: Marc-André Lureau >>> >>> Fedora 35 is EOL. >>> >>> Update to upstream lcitool, that dropped f35 and added f37. > > If you also have time to update to commit > 40589eed1c56

Re: [RFC PATCH v4 04/15] tests/qtest: arm-cpu-features: Match tests to required accelerators

2023-01-20 Thread Thomas Huth
On 19/01/2023 14.54, Fabiano Rosas wrote: Signed-off-by: Fabiano Rosas --- tests/qtest/arm-cpu-features.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/tests/qtest/arm-cpu-features.c b/tests/qtest/arm-cpu-features.c index 4ff2014bea..1555b0bab8 10

Re: [RFC PATCH v4 05/15] tests/qtest: Restrict tpm-tis-devices-{swtpm}-test to CONFIG_TCG

2023-01-20 Thread Thomas Huth
On 19/01/2023 14.54, Fabiano Rosas wrote: These tests set -accel tcg, so restrict them to when TCG is present. Signed-off-by: Fabiano Rosas --- tests/qtest/meson.build | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson

Re: [PATCH 17/18] gitlab: wrap up test results for custom runners

2023-01-20 Thread Alex Bennée
Thomas Huth writes: > On 19/01/2023 19.04, Alex Bennée wrote: >> Instead of spewing the whole log to stdout lets just define them as >> build artefacts so we can examine them later. Where we are running >> check-tcg run it first as those tests are yet to be integrated into >> meson. >> Signed-o

Re: [RFC PATCH v4 05/15] tests/qtest: Restrict tpm-tis-devices-{swtpm}-test to CONFIG_TCG

2023-01-20 Thread Thomas Huth
On 19/01/2023 14.54, Fabiano Rosas wrote: These tests set -accel tcg, so restrict them to when TCG is present. Signed-off-by: Fabiano Rosas --- tests/qtest/meson.build | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/qtest/meson.build b/tests/qtest/meson

Re: [RFC PATCH 6/8] tests/qtest/libqtest: Allow checking for HVF accelerator

2023-01-20 Thread Thomas Huth
On 19/01/2023 13.05, Thomas Huth wrote: On 19/01/2023 12.30, Philippe Mathieu-Daudé wrote: On 19/1/23 12:24, Thomas Huth wrote: On 19/01/2023 11.05, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- RFC: CONFIG_HVF is poisoned. We could pass host config definitions to q

Re: [PATCH v8 07/11] parallels: Move check of cluster outside image to a separate function

2023-01-20 Thread Alexander Ivanov
On 18.01.2023 15:45, Hanna Czenczek wrote: On 15.01.23 16:58, Alexander Ivanov wrote: 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: Deni

Re: [PATCH v8 11/11] parallels: Incorrect condition in out-of-image check

2023-01-20 Thread Alexander Ivanov
On 18.01.2023 15:46, Hanna Czenczek wrote: On 15.01.23 16:58, Alexander Ivanov wrote: 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

Re: cxl nvdimm Potential probe ordering issues.

2023-01-20 Thread Jonathan Cameron via
On Thu, 19 Jan 2023 23:53:53 -0500 Gregory Price wrote: > On Thu, Jan 19, 2023 at 03:04:49PM +, Jonathan Cameron wrote: > > Gregory, would you mind checking if > > cxl_nvb is NULL here... > > https://elixir.bootlin.com/linux/v6.2-rc4/source/drivers/cxl/pmem.c#L67 > > (printk before it is used

Re: [PULL 0/5] tcg patch queue

2023-01-20 Thread Alex Bennée
Thomas Huth writes: > On 16/01/2023 23.36, Richard Henderson wrote: >> The following changes since commit fb7e7990342e59cf67dbd895c1a1e3fb1741df7a: >>tests/qtest/qom-test: Do not print tested properties by default >> (2023-01-16 15:00:57 +) >> are available in the Git repository at: >>

Re: [PULL 0/5] tcg patch queue

2023-01-20 Thread Ilya Leoshkevich
On Fri, 2023-01-20 at 10:41 +0100, Thomas Huth wrote: > On 16/01/2023 23.36, Richard Henderson wrote: > > The following changes since commit > > fb7e7990342e59cf67dbd895c1a1e3fb1741df7a: > > > >    tests/qtest/qom-test: Do not print tested properties by default > > (2023-01-16 15:00:57 +) > >

Re: [PATCH v2 06/11] tests/qtest/migration-test: Reduce 'cmd_source' string scope

2023-01-20 Thread Philippe Mathieu-Daudé
On 20/1/23 10:02, Thomas Huth wrote: On 19/01/2023 15.58, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé ---   tests/qtest/migration-test.c | 29 +++--   1 file changed, 15 insertions(+), 14 deletions(-) Missing explanation in the commit description

Re: [RFC v4 3/3] hw/cxl: Multi-Region CXL Type-3 Devices (Volatile and Persistent)

2023-01-20 Thread Jonathan Cameron via
On Thu, 19 Jan 2023 17:13:40 -0500 Gregory Price wrote: > On Thu, Jan 19, 2023 at 05:31:12PM +, Jonathan Cameron wrote: > > On Thu, 19 Jan 2023 12:15:45 -0500 > > Gregory Price wrote: > > > > > Found a bug, not sure how we missed this, probably happed with rebasing > > > and some fixups.

Re: [PATCH v2 03/11] tests/qtest/boot-serial-test: Build command line using GString API

2023-01-20 Thread Philippe Mathieu-Daudé
On 20/1/23 09:59, Thomas Huth wrote: On 19/01/2023 15.58, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé ---   tests/qtest/boot-serial-test.c | 23 +++   1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/tests/qtest/boot-serial-test.c b/test

Re: [PATCH v3 00/11] tests/qtest: Allow running boot-serial / migration with TCG disabled

2023-01-20 Thread Philippe Mathieu-Daudé
On 20/1/23 10:18, Thomas Huth wrote: On 20/01/2023 09.23, Philippe Mathieu-Daudé wrote: Missing review: #7 Two test were failing on Darwin when testing Fabiano's series which allows building ARM targets without TCG accelerator: https://lore.kernel.org/qemu-devel/20230118193518.26433-1-faro...@s

Re: [RFC PATCH 6/8] tests/qtest/libqtest: Allow checking for HVF accelerator

2023-01-20 Thread Philippe Mathieu-Daudé
On 20/1/23 11:26, Thomas Huth wrote: On 19/01/2023 13.05, Thomas Huth wrote: On 19/01/2023 12.30, Philippe Mathieu-Daudé wrote: On 19/1/23 12:24, Thomas Huth wrote: On 19/01/2023 11.05, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe Mathieu-Daudé --- RFC: CONFIG_HVF is poisoned. We c

Re: [PATCH] virtio-scsi: reset SCSI devices from main loop thread

2023-01-20 Thread Michael S. Tsirkin
On Thu, Jan 19, 2023 at 04:43:26PM -0500, Stefan Hajnoczi wrote: > When an IOThread is configured, the ctrl virtqueue is processed in the > IOThread. TMFs that reset SCSI devices are currently called directly > from the IOThread and trigger an assertion failure in blk_drain(): > > ../block/block

[SeaBIOS PATCH] xen: require Xen info structure at 0x1000 to detect Xen

2023-01-20 Thread David Woodhouse
From: David Woodhouse When running under Xen, hvmloader places a table at 0x1000 with the e820 information and BIOS tables. If this isn't present, SeaBIOS will currently panic. We now have support for running Xen guests natively in QEMU/KVM, which boots SeaBIOS directly instead of via hvmloader

Re: [RFC PATCH 6/8] tests/qtest/libqtest: Allow checking for HVF accelerator

2023-01-20 Thread Thomas Huth
On 20/01/2023 12.18, Philippe Mathieu-Daudé wrote: On 20/1/23 11:26, Thomas Huth wrote: On 19/01/2023 13.05, Thomas Huth wrote: On 19/01/2023 12.30, Philippe Mathieu-Daudé wrote: On 19/1/23 12:24, Thomas Huth wrote: On 19/01/2023 11.05, Philippe Mathieu-Daudé wrote: Signed-off-by: Philippe M

Re: [PATCH v2 2/4] hw/char/pl011: implement a reset method

2023-01-20 Thread Peter Maydell
On Thu, 19 Jan 2023 at 21:57, Evgeny Iakovlev wrote: > > > On 1/19/2023 14:27, Peter Maydell wrote: > > On Tue, 17 Jan 2023 at 22:05, Evgeny Iakovlev > > wrote: > >> PL011 currently lacks a reset method. Implement it. > >> > >> Signed-off-by: Evgeny Iakovlev > >> --- > >> hw/char/pl011.c | 31

Re: [RFC PATCH v4 06/15] tests/qtest: Add qtest_get_machine_args

2023-01-20 Thread Thomas Huth
On 19/01/2023 14.54, Fabiano Rosas wrote: QEMU machines might not have a default value defined for the -cpu option. Which machines for example? ... I thought we'd have a default CPU everywhere? Thomas

Re: [PATCH v14 10/11] qapi/s390/cpu topology: POLARITY_CHANGE qapi event

2023-01-20 Thread Thomas Huth
On 18/01/2023 18.09, Pierre Morel wrote: On 1/12/23 12:52, Thomas Huth wrote: On 05/01/2023 15.53, Pierre Morel wrote: ...>>> +# +# Emitted when the guest asks to change the polarity. +# +# @polarity: polarity specified by the guest Please elaborate: Where does the value come from (the PTF

Re: [RFC PATCH v4 06/15] tests/qtest: Add qtest_get_machine_args

2023-01-20 Thread Cornelia Huck
On Fri, Jan 20 2023, Thomas Huth wrote: > On 19/01/2023 14.54, Fabiano Rosas wrote: >> QEMU machines might not have a default value defined for the -cpu >> option. > > Which machines for example? ... I thought we'd have a default CPU everywhere? There's a patch further above that removes it for

[RFC PATCH 2/2] hw/sd: skip double power-up in sd_vmstate_pre_load()

2023-01-20 Thread Daniel Henrique Barboza
At this moment any migration with the RISC-V sifive_u machine fails with the following error: qemu-system-riscv64: ../hw/sd/sd.c:297: sd_ocr_powerup: Assertion `!FIELD_EX32(sd->ocr, OCR, CARD_POWER_UP)' failed. The assert was introduced by dd26eb43337a ("hw/sd: model a power-up delay, as a workar

[RFC PATCH 0/2] fix SD card migration

2023-01-20 Thread Daniel Henrique Barboza
Hi, I found this bug by accident when doing avocado tests with the RISC-V machines. Trying to migrate the sifive_u machine, which always has a SD card, fails every time: qemu-system-riscv64: ../hw/sd/sd.c:297: sd_ocr_powerup: Assertion `!FIELD_EX32(sd->ocr, OCR, CARD_POWER_UP)' failed. I'm send

[RFC PATCH 1/2] hw/sd/sd.c: add sd_card_powered_up()

2023-01-20 Thread Daniel Henrique Barboza
We're going to add another verification with CARD_POWER_UP. Do a helper to make the code easier to follow. Signed-off-by: Daniel Henrique Barboza --- hw/sd/sd.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index da5bdd134a..bd88c1a8f0 10

Re: [RFC PATCH v4 06/15] tests/qtest: Add qtest_get_machine_args

2023-01-20 Thread Thomas Huth
On 20/01/2023 13.00, Cornelia Huck wrote: On Fri, Jan 20 2023, Thomas Huth wrote: On 19/01/2023 14.54, Fabiano Rosas wrote: QEMU machines might not have a default value defined for the -cpu option. Which machines for example? ... I thought we'd have a default CPU everywhere? There's a pat

Re: [SeaBIOS] [PATCH 1/4] better kvm detection

2023-01-20 Thread David Woodhouse
On Mon, 2022-11-21 at 11:32 +0100, Gerd Hoffmann wrote: > In case kvm emulates features of another hypervisor (for example hyperv) > two VMM CPUID blocks will be present, one for the emulated hypervisor > and one for kvm itself. That isn't the case for emulating Xen on KVM, FWIW. Only for Hyper-V

Re: [PATCH v6 00/33] Consolidate PIIX south bridges

2023-01-20 Thread Bernhard Beschow
Am 13. Januar 2023 17:39:45 UTC schrieb Bernhard Beschow : > > >Am 13. Januar 2023 08:46:53 UTC schrieb "Philippe Mathieu-Daudé" >: >>Hi Bernhard, >> >>On 9/1/23 18:23, Bernhard Beschow wrote: >>> This series consolidates the implementations of the PIIX3 and PIIX4 south >>> bridges and is an ex

Re: [RFC PATCH v4 03/15] target/arm: Remove default cpu for KVM-only builds

2023-01-20 Thread Daniel P . Berrangé
On Thu, Jan 19, 2023 at 10:54:12AM -0300, Fabiano Rosas wrote: > We'd prefer if the user always had to specify the machine and cpu > options in the command line instead of relying on defaults. > > Since the KVM build already doesn't work with the current default of > cortex-a15, remove the default

[PULL 16/38] block: Rename refresh_total_sectors to bdrv_refresh_total_sectors

2023-01-20 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito The name is not good, not the least because we are going to convert this to a generated co_wrapper, which adds a _co infix after the first part of the name. No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf Mess

[PULL 24/38] block: Convert bdrv_debug_event() to co_wrapper_mixed

2023-01-20 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito bdrv_debug_event() is categorized as an I/O function, and it currently doesn't run in a coroutine. We should let it take a graph rdlock since it traverses the block nodes graph, which however is only possible in a coroutine. Therefore turn it into a co_wrapper_mi

[PULL 04/38] coroutine: annotate coroutine_fn for libclang

2023-01-20 Thread Kevin Wolf
From: Alberto Faria Clang has a generic __annotate__ attribute that can be used by static analyzers to understand properties of functions and analyze the control flow. Furthermore, unlike TSA annotations, the __annotate__ attribute applies to function pointers as well. As a first step towards s

[PULL 01/38] tests/qemu-iotests/312: Mark "quorum" as required driver

2023-01-20 Thread Kevin Wolf
From: Thomas Huth "quorum" is required by iotest 312 - if it is not compiled into the QEMU binary, the test fails. Thus list "quorum" as required driver so that the test gets skipped in case it is not available. Signed-off-by: Thomas Huth Message-Id: <20230104114601.269351-1-th...@redhat.com> R

[PULL 10/38] qemu-img bitmap: Report errors while closing the image

2023-01-20 Thread Kevin Wolf
blk_unref() can't report any errors that happen while closing the image. For example, if qcow2 hits an -ENOSPC error while writing out dirty bitmaps when it's closed, it prints error messages to stderr, but 'qemu-img bitmap' won't see any error return value and will therefore look successful with e

[PULL 25/38] block: Rename bdrv_load/save_vmstate() to bdrv_co_load/save_vmstate()

2023-01-20 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Since these functions always run in coroutine context, adjust their name to include "_co_", just like all other BlockDriver callbacks. No functional change intended. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf Message-Id: <2023011320421

[PULL 34/38] block/qapi: Add indentation to bdrv_node_info_dump()

2023-01-20 Thread Kevin Wolf
From: Hanna Reitz In order to let qemu-img info present a block graph, add a parameter to bdrv_node_info_dump() and bdrv_image_info_specific_dump() so that the information of nodes below the root level can be given an indentation. Signed-off-by: Hanna Reitz Message-Id: <20220620162704.80987-9-h

[PULL 17/38] block: Convert bdrv_refresh_total_sectors() to co_wrapper_mixed

2023-01-20 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito BlockDriver->bdrv_getlength is categorized as IO callback, and it currently doesn't run in a coroutine. We should let it take a graph rdlock since the callback traverses the block nodes graph, which however is only possible in a coroutine. Therefore turn it into

[PULL 37/38] qemu-img: Let info print block graph

2023-01-20 Thread Kevin Wolf
From: Hanna Reitz For every node in the backing chain, collect its BlockGraphInfo struct using bdrv_query_block_graph_info(). Print all nodes' information, indenting child nodes and labelling them with a path constructed from the child names leading to the node from the root (e.g. /file/file).

[PULL 15/38] block: Convert bdrv_is_inserted() to co_wrapper

2023-01-20 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito bdrv_is_inserted() is categorized as an I/O function, and it currently doesn't run in a coroutine. We should let it take a graph rdlock since it traverses the block nodes graph, which however is only possible in a coroutine. Therefore turn it into a co_wrapper to

[PULL 30/38] block: Split BlockNodeInfo off of ImageInfo

2023-01-20 Thread Kevin Wolf
From: Hanna Reitz ImageInfo sometimes contains flat information, and sometimes it does not. Split off a BlockNodeInfo struct, which only contains information about a single node and has no link to the backing image. We do this so we can extend BlockNodeInfo to a BlockGraphInfo struct, which has

[PULL 14/38] block: Convert bdrv_io_unplug() to co_wrapper

2023-01-20 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito BlockDriver->bdrv_io_unplug is categorized as IO callback, and it currently doesn't run in a coroutine. We should let it take a graph rdlock since the callback traverses the block nodes graph, which however is only possible in a coroutine. The only caller of this

[PULL 19/38] block: use bdrv_co_refresh_total_sectors when possible

2023-01-20 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito In some places we are sure we are always running in a coroutine, therefore it's useless to call the generated_co_wrapper, instead call directly the _co_ function. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf Message-Id: <20230113204212.35

[PULL 28/38] block/file: Add file-specific image info

2023-01-20 Thread Kevin Wolf
From: Hanna Reitz Add some (optional) information that the file driver can provide for image files, namely the extent size hint. Signed-off-by: Hanna Reitz Message-Id: <20220620162704.80987-3-hre...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- qapi/block-core.json | 26 +

[PULL 20/38] block: Convert bdrv_get_allocated_file_size() to co_wrapper

2023-01-20 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito bdrv_get_allocated_file_size() is categorized as an I/O function, and it currently doesn't run in a coroutine. We should let it take a graph rdlock since it traverses the block nodes graph, which however is only possible in a coroutine. Therefore turn it into a c

[PATCH 2/2] tests/avocado: Truncate M2S-FG484 SOM SPI flash to 16MiB

2023-01-20 Thread Philippe Mathieu-Daudé
The M2S-FG484 SOM uses a 16 MiB SPI flash (Spansion S25FL128SDPBHICO). Since the test asset is bigger, truncate it to the correct size to avoid when running the test_arm_emcraft_sf2 test: qemu-system-arm: device requires 16777216 bytes, block backend provides 67108864 bytes Add comment regard

[PULL 31/38] qemu-img: Use BlockNodeInfo

2023-01-20 Thread Kevin Wolf
From: Hanna Reitz qemu-img info never uses ImageInfo's backing-image field, because it opens the backing chain one by one with BDRV_O_NO_BACKING, and prints all backing chain nodes' information consecutively. Use BlockNodeInfo to make it clear that we only print information about a single node,

[PULL 11/38] qemu-iotests: Test qemu-img bitmap/commit exit code on error

2023-01-20 Thread Kevin Wolf
This tests that when an error happens while writing back bitmaps to the image file in qcow2_inactivate(), 'qemu-img bitmap/commit' actually return an error value in their exit code instead of making the operation look successful to scripts. Signed-off-by: Kevin Wolf Message-Id: <20230112191454.16

[PULL 03/38] pflash: Only read non-zero parts of backend image

2023-01-20 Thread Kevin Wolf
From: Xiang Zheng Currently we fill the VIRT_FLASH memory space with two 64MB NOR images when using persistent UEFI variables on virt board. Actually we only use a very small(non-zero) part of the memory while the rest significant large(zero) part of memory is wasted. So this patch checks the bl

[PULL 09/38] qemu-img commit: Report errors while closing the image

2023-01-20 Thread Kevin Wolf
blk_unref() can't report any errors that happen while closing the image. For example, if qcow2 hits an -ENOSPC error while writing out dirty bitmaps when it's closed, it prints error messages to stderr, but 'qemu-img commit' won't see any error return value and will therefore look successful with e

[PULL 29/38] block/vmdk: Change extent info type

2023-01-20 Thread Kevin Wolf
From: Hanna Reitz VMDK's implementation of .bdrv_get_specific_info() returns information about its extent files, ostensibly in the form of ImageInfo objects. However, it does not get this information through bdrv_query_image_info(), but fills only a select few fields with custom information that

[PULL 38/38] qemu-img: Change info key names for protocol nodes

2023-01-20 Thread Kevin Wolf
From: Hanna Reitz Currently, when querying a qcow2 image, qemu-img info reports something like this: image: test.qcow2 file format: qcow2 virtual size: 64 MiB (67108864 bytes) disk size: 196 KiB cluster_size: 65536 Format specific information: compat: 1.1 compression type: zlib lazy

[PATCH 0/2] tests/avocado: Truncate M2S-FG484 SOM SPI flash to 16MiB

2023-01-20 Thread Philippe Mathieu-Daudé
The M2S-FG484 SOM SPI flash is 16MiB. Truncate the file provided with the Avocado test to avoid: qemu-system-arm: device requires 16777216 bytes, block backend provides 67108864 bytes before merging the "m25p80: Improve error when the backend file size does not match the device" patch: https://

[PULL 13/38] block: Convert bdrv_io_plug() to co_wrapper

2023-01-20 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito BlockDriver->bdrv_io_plug is categorized as IO callback, and it currently doesn't run in a coroutine. We should let it take a graph rdlock since the callback traverses the block nodes graph, which however is only possible in a coroutine. The only caller of this f

[PULL 18/38] block-backend: use bdrv_getlength instead of blk_getlength

2023-01-20 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito The only difference is that blk_ checks if the block is available, but this check is already performed above in blk_check_byte_request(). This is in preparation for the graph rdlock, which will be taken by both the callers of blk_check_byte_request() and blk_getl

[PULL 02/38] tests/qemu-iotests/262: Check for availability of "blkverify" first

2023-01-20 Thread Kevin Wolf
From: Thomas Huth In downstream RHEL builds, we do not have "blkverify" enabled, so iotest 262 is currently failing there. Thus let's list "blkverify" as required item so that the test properly gets skipped instead if "blkverify" is missing. Signed-off-by: Thomas Huth Message-Id: <2023010411285

[PULL 00/38] Block layer patches

2023-01-20 Thread Kevin Wolf
The following changes since commit 239b8b0699a222fd21da1c5fdeba0a2456085a47: Merge tag 'trivial-branch-for-8.0-pull-request' of https://gitlab.com/laurent_vivier/qemu into staging (2023-01-19 15:05:29 +) are available in the Git repository at: https://repo.or.cz/qemu/kevin.git tags/for-

[PULL 26/38] block/nbd: Add missing include

2023-01-20 Thread Kevin Wolf
From: Philippe Mathieu-Daudé The inlined nbd_readXX() functions call beXX_to_cpu(), themselves declared in . This fixes when refactoring: In file included from ../../block/nbd.c:44: include/block/nbd.h: In function 'nbd_read16': include/block/nbd.h:383:12: error: implicit declaration of fu

[PULL 06/38] qemu-io: do not reinvent the blk_pwrite_zeroes wheel

2023-01-20 Thread Kevin Wolf
From: Paolo Bonzini qemu-io's do_co_pwrite_zeroes is reinventing the coroutine wrapper blk_pwrite_zeroes. Just use the real thing directly. Signed-off-by: Paolo Bonzini Message-Id: <20221215130225.476477-1-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- qemu-io-cm

[PULL 21/38] block: Convert bdrv_get_info() to co_wrapper_mixed

2023-01-20 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito bdrv_get_info() is categorized as an I/O function, and it currently doesn't run in a coroutine. We should let it take a graph rdlock since it traverses the block nodes graph, which however is only possible in a coroutine. Therefore turn it into a co_wrapper to mo

[PULL 35/38] iotests: Filter child node information

2023-01-20 Thread Kevin Wolf
From: Hanna Reitz Before we let qemu-img info print child node information, have common.filter, common.rc, and iotests.py filter it from the test output so we get as few reference output changes as possible. Signed-off-by: Hanna Reitz Message-Id: <20220620162704.80987-10-hre...@redhat.com> Test

[PATCH 1/2] tests/avocado: Factor file_truncate() helper out

2023-01-20 Thread Philippe Mathieu-Daudé
Factor file_truncate() helper out of image_pow2ceil_expand() for reuse. Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/boot_linux_console.py | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux

[PULL 32/38] block/qapi: Let bdrv_query_image_info() recurse

2023-01-20 Thread Kevin Wolf
From: Hanna Reitz There is no real reason why bdrv_query_image_info() should generally not recurse. The ImageInfo struct has a pointer to the backing image, so it should generally be filled, unless the caller explicitly opts out. This moves the recursing code from bdrv_block_device_info() into

[PULL 12/38] block-coroutine-wrapper: support void functions

2023-01-20 Thread Kevin Wolf
From: Emanuele Giuseppe Esposito Just omit the various 'return' when the return type is void. Signed-off-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf Message-Id: <20230113204212.359076-2-kw...@redhat.com> Reviewed-by: Emanuele Giuseppe Esposito Signed-off-by: Kevin Wolf --- scri

[PULL 07/38] block: remove bdrv_coroutine_enter

2023-01-20 Thread Kevin Wolf
From: Paolo Bonzini It has only one caller---inline it and remove the function. Signed-off-by: Paolo Bonzini Message-Id: <20221215130225.476477-2-pbonz...@redhat.com> Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- include/block/block-io.h | 5 - block.c | 6 --

[PULL 05/38] block: Add no_coroutine_fn and coroutine_mixed_fn marker

2023-01-20 Thread Kevin Wolf
From: Alberto Faria Add more annotations to functions, describing valid and invalid calls from coroutine to non-coroutine context. When applied to a function, no_coroutine_fn advertises that it should not be called from coroutine_fn functions. This can be because the function blocks or, in the

[PULL 27/38] block: Improve empty format-specific info dump

2023-01-20 Thread Kevin Wolf
From: Hanna Reitz When a block driver supports obtaining format-specific information, but that object only contains optional fields, it is possible that none of them are present, so that dump_qobject() (called by bdrv_image_info_specific_dump()) will not print anything. The callers of bdrv_image

  1   2   3   >