[PULL v2 00/35] Monitor patches for 2023-02-03

2023-02-03 Thread Markus Armbruster
The following changes since commit deabea6e88f7c4c3c12a36ee30051c6209561165: Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2023-02-02 10:10:07 +) are available in the Git repository at: https://repo.or.cz/qemu/armbru.git

[PULL v2 04/35] monitor: Drop unnecessary includes

2023-02-03 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20230124121946.1139465-2-arm...@redhat.com> Reviewed-by: Stefan Berger --- monitor/hmp-cmds.c | 4 monitor/hmp.c | 2 -- monitor/misc.c | 14 ++ monitor/qmp-cmds-control.c | 1 -

Re: Display update issue on M1 Macs

2023-02-03 Thread Akihiko Odaki
On 2023/02/03 22:45, BALATON Zoltan wrote: On Fri, 3 Feb 2023, Akihiko Odaki wrote: On 2023/02/02 19:51, BALATON Zoltan wrote: On Tue, 31 Jan 2023, BALATON Zoltan wrote: On Tue, 31 Jan 2023, Akihiko Odaki wrote: [...] To summarise previous discussion: - There's a problem on Apple M1 Macs

[PATCH v8 4/8] tests/qtest/e1000e-test: Fabricate ethernet header

2023-02-03 Thread Akihiko Odaki
e1000e understands ethernet header so fabricate something convincing. Signed-off-by: Akihiko Odaki Reviewed-by: Thomas Huth --- tests/qtest/e1000e-test.c | 25 +++-- tests/qtest/libqos/e1000e.h | 2 ++ 2 files changed, 17 insertions(+), 10 deletions(-) diff --git

[PATCH v8 1/8] pcie: Introduce pcie_sriov_num_vfs

2023-02-03 Thread Akihiko Odaki
igb can use this function to change its behavior depending on the number of virtual functions currently enabled. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- hw/pci/pcie_sriov.c | 5 +

[PATCH v8 6/8] igb: Introduce qtest for igb device

2023-02-03 Thread Akihiko Odaki
This change is derived from qtest for e1000e device. Signed-off-by: Akihiko Odaki Acked-by: Thomas Huth --- MAINTAINERS | 2 + tests/qtest/fuzz/generic_fuzz_configs.h | 5 + tests/qtest/igb-test.c | 243

[PATCH v8 8/8] docs/system/devices/igb: Add igb documentation

2023-02-03 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- MAINTAINERS | 1 + docs/system/device-emulation.rst | 1 + docs/system/devices/igb.rst | 71 3 files changed, 73 insertions(+) create mode 100644 docs/system/devices/igb.rst diff --git a/MAINTAINERS

[PATCH v8 7/8] tests/avocado: Add igb test

2023-02-03 Thread Akihiko Odaki
This automates ethtool tests for igb registers, interrupts, etc. Signed-off-by: Akihiko Odaki Reviewed-by: Cédric Le Goater --- MAINTAINERS | 1 + .../org.centos/stream/8/x86_64/test-avocado | 1 + tests/avocado/igb.py | 38

[PATCH v8 2/8] e1000: Split header files

2023-02-03 Thread Akihiko Odaki
Some definitions in the header files are invalid for igb so extract them to new header files to keep igb from referring to them. Signed-off-by: Gal Hammer Signed-off-by: Marcel Apfelbaum Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daudé --- hw/net/e1000.c | 1 +

[PATCH v8 5/8] tests/qtest/libqos/e1000e: Export macreg functions

2023-02-03 Thread Akihiko Odaki
They will be useful for igb testing. Signed-off-by: Akihiko Odaki Reviewed-by: Thomas Huth --- tests/qtest/libqos/e1000e.c | 12 tests/qtest/libqos/e1000e.h | 12 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/qtest/libqos/e1000e.c

[PATCH v8 0/8] Introduce igb

2023-02-03 Thread Akihiko Odaki
Based-on: <20230201033539.30049-1-akihiko.od...@daynix.com> ([PATCH v5 00/29] e1000x cleanups (preliminary for IGB)) igb is a family of Intel's gigabit ethernet controllers. This series implements 82576 emulation in particular. You can see the last patch for the documentation. Note that there is

[PATCH v2] [PING^2] target/i386/gdbstub: Fix a bug about order of FPU stack in 'g' packets.

2023-02-03 Thread TaiseiIto
This is a ping to the patch below. https://patchew.org/QEMU/ty0pr0101mb42855925d8414e4773d6fa36a4...@ty0pr0101mb4285.apcprd01.prod.exchangelabs.com/ Before this commit, when GDB attached an OS working on QEMU, order of FPU stack registers printed by GDB command 'info float' was wrong. There was

Re: [RFC v2 11/13] vdpa: add vdpa net migration state notifier

2023-02-03 Thread Si-Wei Liu
On 2/2/2023 7:28 AM, Eugenio Perez Martin wrote: On Thu, Feb 2, 2023 at 2:53 AM Si-Wei Liu wrote: On 1/12/2023 9:24 AM, Eugenio Pérez wrote: This allows net to restart the device backend to configure SVQ on it. Ideally, these changes should not be net specific. However, the vdpa net

[PATCH qemu v3 0/2] ARM: Add support for V8M special registers in GDB stub

2023-02-03 Thread ~dreiss-meta
Rebased and updated to use NULL as a sentinel. David Reiss (2): target/arm/gdbstub: Support reading M system registers from GDB target/arm/gdbstub: Support reading M security extension registers from GDB target/arm/cpu.h | 25 +++- target/arm/gdbstub.c | 241

[PATCH qemu v3 1/2] target/arm/gdbstub: Support reading M system registers from GDB

2023-02-03 Thread ~dreiss-meta
From: David Reiss Follows a fairly similar pattern to the existing special register debug support. Only reading is implemented, but it should be possible to implement writes. `v7m_mrs_control` was renamed `arm_v7m_mrs_control` and made non-static so this logic could be shared between the MRS

[PATCH qemu v3 2/2] target/arm/gdbstub: Support reading M security extension registers from GDB

2023-02-03 Thread ~dreiss-meta
From: David Reiss Follows a fairly similar pattern to the existing special register debug support. Only reading is implemented, but it should be possible to implement writes. Signed-off-by: David Reiss --- target/arm/cpu.h | 15 +- target/arm/gdbstub.c | 116

Re: [PATCH v2 11/23] vfio-user: get region info

2023-02-03 Thread Alex Williamson
On Wed, 1 Feb 2023 21:55:47 -0800 John Johnson wrote: > diff --git a/hw/vfio/common.c b/hw/vfio/common.c > index 792e247..d26b325 100644 > --- a/hw/vfio/common.c > +++ b/hw/vfio/common.c > @@ -1584,6 +1584,11 @@ int vfio_region_setup(Object *obj, VFIODevice > *vbasedev, VFIORegion *region, >

Re: [PATCH 5/5] docs: add throttle filter description

2023-02-03 Thread Eric Blake
On Wed, Feb 01, 2023 at 04:12:34PM -0500, Stefan Hajnoczi wrote: > Signed-off-by: Stefan Hajnoczi > --- > docs/system/qemu-block-drivers.rst.inc | 110 + > 1 file changed, 110 insertions(+) Reviewed-by: Eric Blake > > diff --git

[PATCH] tcg: Init temp_subindex in liveness_pass_2

2023-02-03 Thread Richard Henderson
Correctly handle large types while lowering. Fixes: fac87bd2a49b ("tcg: Add temp_subindex to TCGTemp") Signed-off-by: Richard Henderson --- tcg/tcg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tcg/tcg.c b/tcg/tcg.c index fd557d55d3..bc60fd0fe8 100644 --- a/tcg/tcg.c +++ b/tcg/tcg.c @@

Re: [PATCH 4/5] docs: flesh out qcow2 format driver description

2023-02-03 Thread Eric Blake
On Wed, Feb 01, 2023 at 04:12:33PM -0500, Stefan Hajnoczi wrote: > Put the create options in alphabetical order, add compression_type and > extended_l2, and also mention the common runtime options. I did not add > rarely-used runtime options because I think it's too much information. > >

Re: [PATCH 2/5] docs: differentiate between block driver create and runtime opts

2023-02-03 Thread Eric Blake
On Wed, Feb 01, 2023 at 04:12:31PM -0500, Stefan Hajnoczi wrote: > Options available with qemu-img create -o ... are called create options. > They affect how the image file is created on disk. > > Options available with --blockdev ... are called runtime options. They > affect how the open

Re: [PATCH 1/5] docs: expand introduction to disk images

2023-02-03 Thread Eric Blake
On Wed, Feb 01, 2023 at 04:12:30PM -0500, Stefan Hajnoczi wrote: > Explain --blockdev, the graph, protocols, formats, and filters. Also > mention the relationship between --blockdev and --drive, since new users > are likely to hit both syntaxes. > > Signed-off-by: Stefan Hajnoczi > --- >

Re: [PATCH v2 03/23] vfio-user: add container IO ops vector

2023-02-03 Thread Alex Williamson
On Fri, 3 Feb 2023 15:21:09 -0700 Alex Williamson wrote: > On Wed, 1 Feb 2023 21:55:39 -0800 > John Johnson wrote: > > > Used for communication with VFIO driver > > (prep work for vfio-user, which will communicate over a socket) > > > > Signed-off-by: John G Johnson > > --- > >

Re: [PATCH v2] linux-user: fix getgroups/setgroups allocations

2023-02-03 Thread Laurent Vivier
Le 03/02/2023 à 22:57, Richard Henderson a écrit : On 2/3/23 11:49, Laurent Vivier wrote: On 1/25/23 14:18, Laurent Vivier wrote: Le 17/12/2022 à 10:31, Michael Tokarev a écrit : linux-user getgroups(), setgroups(), getgroups32() and setgroups32() used alloca() to allocate grouplist arrays,

Re: [PATCH v2 03/23] vfio-user: add container IO ops vector

2023-02-03 Thread Alex Williamson
On Wed, 1 Feb 2023 21:55:39 -0800 John Johnson wrote: > Used for communication with VFIO driver > (prep work for vfio-user, which will communicate over a socket) > > Signed-off-by: John G Johnson > --- > include/hw/vfio/vfio-common.h | 24 > hw/vfio/common.c | 128 >

Re: [PATCH v2] linux-user: fix getgroups/setgroups allocations

2023-02-03 Thread Richard Henderson
On 2/3/23 11:49, Laurent Vivier wrote: On 1/25/23 14:18, Laurent Vivier wrote: Le 17/12/2022 à 10:31, Michael Tokarev a écrit : linux-user getgroups(), setgroups(), getgroups32() and setgroups32() used alloca() to allocate grouplist arrays, with unchecked gidsetsize coming from the "guest". 

Re: [PATCH v2] linux-user: fix getgroups/setgroups allocations

2023-02-03 Thread Laurent Vivier
On 1/25/23 14:18, Laurent Vivier wrote: Le 17/12/2022 à 10:31, Michael Tokarev a écrit : linux-user getgroups(), setgroups(), getgroups32() and setgroups32() used alloca() to allocate grouplist arrays, with unchecked gidsetsize coming from the "guest".  With NGROUPS_MAX being 65536 (linux, and

Re: [PATCH] accel/tcg: test CPUJumpCache in tb_jmp_cache_clear_page()

2023-02-03 Thread Richard Henderson
On 2/3/23 07:15, Eric Auger wrote: After commit 4e4fa6c12d ("accel/tcg: Complete cpu initialization before registration"), it looks the CPUJumpCache handle can be NULL. This causes a SIGSEV when running debug-wp-migration kvm unit test. At the first place it should be clarified why this TCG

Re: [PATCH 3/5] hw/ppc/ppc4xx: Set QDev properties using QDev API

2023-02-03 Thread BALATON Zoltan
On Fri, 3 Feb 2023, Philippe Mathieu-Daudé wrote: No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. All calls use either errp=_abort or _fatal, so converting to the QDev API is almost a no-op (QDev API always uses _abort).

Re: [PATCH v2 17/23] vfio-user: dma map/unmap operations

2023-02-03 Thread Alex Williamson
On Wed, 1 Feb 2023 21:55:53 -0800 John Johnson wrote: > Add ability to do async operations during memory transactions > > Signed-off-by: Jagannathan Raman > Signed-off-by: Elena Ufimtseva > Signed-off-by: John G Johnson > --- > hw/vfio/user-protocol.h | 32 ++ >

Re: ASan reports use-after-free when running munmap-pthread

2023-02-03 Thread Richard Henderson
On 2/2/23 09:06, Anton Johansson wrote: Hi, I was running check-tcg with ASan enabled on master, and ran into the following use-after-free. There appears to be a race between jump cache invalidation and thread destruction (?) I thought I'd post here since I noticed some previous discussion on

[PATCH 5/5] hw/ppc/pnv: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. One call in pnv_psi_power8_realize() propagate the Error* argument: if (!object_property_set_int(OBJECT(ics), "nr-irqs", PSI_NUM_INTERRUPTS,

[PATCH 0/5] hw/ppc: Set QDev properties using QDev API (part 2/3)

2023-02-03 Thread Philippe Mathieu-Daudé
part 1 [*] cover: -- QEMU provides the QOM API for core objects. Devices are modelled on top of QOM as QDev objects. There is no point in using the lower level QOM API with QDev; it makes the code more complex and harder to review. I first converted all the calls using errp=_abort or =NULL, then

[PATCH 4/5] hw/ppc/spapr: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. All calls use either errp=_abort or _fatal, so converting to the QDev API is almost a no-op (QDev API always uses _abort). Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH 3/5] hw/ppc/ppc4xx: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. All calls use either errp=_abort or _fatal, so converting to the QDev API is almost a no-op (QDev API always uses _abort). Signed-off-by: Philippe Mathieu-Daudé ---

[PATCH 1/5] hw/misc/macio: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. All calls use errp=_abort, so converting to the QDev API is a no-op (QDev API always uses _abort). Signed-off-by: Philippe Mathieu-Daudé --- hw/misc/macio/macio.c | 6 ++

[PATCH 2/5] hw/pci-host/raven: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. All calls use either errp=_fatal or NULL, so converting to the QDev API is almost a no-op (QDev API always uses _abort). Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH 6/6] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job

2023-02-03 Thread Juan Quintela
Peter Maydell wrote: > On Fri, 3 Feb 2023 at 15:44, Thomas Huth wrote: >> >> On 03/02/2023 13.08, Kevin Wolf wrote: >> > Am 03.02.2023 um 12:23 hat Thomas Huth geschrieben: >> >> On 30/01/2023 11.58, Daniel P. Berrangé wrote: >> >>> On Mon, Jan 30, 2023 at 11:44:46AM +0100, Thomas Huth wrote: >>

Re: [PATCH 6/6] gitlab-ci.d/buildtest: Disintegrate the build-coroutine-sigaltstack job

2023-02-03 Thread Juan Quintela
Kevin Wolf wrote: > Am 03.02.2023 um 12:23 hat Thomas Huth geschrieben: >> On 30/01/2023 11.58, Daniel P. Berrangé wrote: >> > On Mon, Jan 30, 2023 at 11:44:46AM +0100, Thomas Huth wrote: >> > > We can get rid of the build-coroutine-sigaltstack job by moving >> > > the configure flags that should

Re: [PATCH v2 3/3] util/userfaultfd: Support /dev/userfaultfd

2023-02-03 Thread Juan Quintela
Peter Xu wrote: > On Thu, Feb 02, 2023 at 11:52:21AM +0100, Juan Quintela wrote: >> Peter Xu wrote: >> > Teach QEMU to use /dev/userfaultfd when it existed and fallback to the >> > system call if either it's not there or doesn't have enough permission. >> > >> > Firstly, as long as the app has

Re: [PATCH v10 1/3] hw/riscv: handle 32 bit CPUs kernel_addr in riscv_load_kernel()

2023-02-03 Thread Daniel Henrique Barboza
Hey, On 2/3/23 07:45, Bin Meng wrote: Hi Daniel, On Fri, Feb 3, 2023 at 6:31 PM Daniel Henrique Barboza wrote: On 2/3/23 02:39, Bin Meng wrote: On Thu, Feb 2, 2023 at 9:58 PM Daniel Henrique Barboza wrote: load_elf_ram_sym() will sign-extend 32 bit addresses. If a 32 bit QEMU guest

Re: [PATCH] hw/ppc/pegasos2: Fix a typo in a comment

2023-02-03 Thread Philippe Mathieu-Daudé
On 3/2/23 20:43, BALATON Zoltan wrote: Reported-by: Stefan Weil Signed-off-by: BALATON Zoltan --- hw/ppc/pegasos2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [RFC PATCH] tests/avocado: retire the Aarch64 TCG tests from boot_linux.py

2023-02-03 Thread Richard Henderson
On 2/3/23 08:16, Alex Bennée wrote: The two TCG tests for GICv2 and GICv3 are very heavy weight distros that take a long time to boot up, especially for an --enable-debug build. The total code coverage they give is: Overall coverage rate: lines..: 11.2% (59584 of 530123 lines)

Re: [PATCH v5 2/3] arm/kvm: add support for MTE

2023-02-03 Thread Richard Henderson
On 2/3/23 03:44, Cornelia Huck wrote: +static void aarch64_cpu_get_mte(Object *obj, Visitor *v, const char *name, +void *opaque, Error **errp) +{ +ARMCPU *cpu = ARM_CPU(obj); +OnOffAuto mte = cpu->prop_mte; + +visit_type_OnOffAuto(v, name, , errp); +}

Re: [RFC PATCH] tests/avocado: retire the Aarch64 TCG tests from boot_linux.py

2023-02-03 Thread Fabiano Rosas
Alex Bennée writes: > The two TCG tests for GICv2 and GICv3 are very heavy weight distros > that take a long time to boot up, especially for an --enable-debug > build. The total code coverage they give is: > > Overall coverage rate: > lines..: 11.2% (59584 of 530123 lines) >

Re: [PATCH V2 2/2] migration: save/delete migration thread info

2023-02-03 Thread Juan Quintela
Jiang Jiacheng wrote: > To support query migration thread infomation, save and delete > thread(live_migration and multifdsend) information at thread > creation and finish. > > Signed-off-by: Jiang Jiacheng Reviewed-by: Juan Quintela

Re: [PATCH V2 1/2] migration: Introduce interface query-migrationthreads

2023-02-03 Thread Juan Quintela
Jiang Jiacheng wrote: > Introduce interface query-migrationthreads. The interface is used > to query information about migration threads and returns with > migration thread's name and its id. > Introduce threadinfo.c to manage threads with migration. > > Signed-off-by: Jiang Jiacheng

[PATCH] hw/ppc/pegasos2: Fix a typo in a comment

2023-02-03 Thread BALATON Zoltan
Reported-by: Stefan Weil Signed-off-by: BALATON Zoltan --- hw/ppc/pegasos2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/pegasos2.c b/hw/ppc/pegasos2.c index 1a13632ba6..a9563f4fb2 100644 --- a/hw/ppc/pegasos2.c +++ b/hw/ppc/pegasos2.c @@ -564,7 +564,7 @@ static

Re: [PATCH v5 1/3] arm/virt: don't try to spell out the accelerator

2023-02-03 Thread Richard Henderson
On 2/3/23 03:44, Cornelia Huck wrote: Just use current_accel_name() directly. Signed-off-by: Cornelia Huck --- hw/arm/virt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Richard Henderson r~

[PATCH 08/13] vdpa: disable RAM block discard only for the first device

2023-02-03 Thread Eugenio Pérez
Although it does not make a big difference, its more correct and simplifies the cleanup path in subsequent patches. Move ram_block_discard_disable(false) call to the top of vhost_vdpa_cleanup because: * We cannot use vhost_vdpa_first_dev after dev->opaque = NULL assignment. * Improve the stack

[PATCH 12/13] vdpa: block migration if SVQ does not admit a feature

2023-02-03 Thread Eugenio Pérez
Next patches enable devices to be migrated even if vdpa netdev has not been started with x-svq. However, not all devices are migratable, so we need to block migration if we detect that. Block migration if we detect the device expose a feature SVQ does not know how to work with. Signed-off-by:

[PATCH 05/13] vdpa: rewind at get_base, not set_base

2023-02-03 Thread Eugenio Pérez
At this moment it is only possible to migrate to a vdpa device running with x-svq=on. As a protective measure, the rewind of the inflight descriptors was done at the destination. That way if the source sent a virtqueue with inuse descriptors they are always discarded. Since this series allows to

[PATCH 10/13] vdpa: block migration if device has unsupported features

2023-02-03 Thread Eugenio Pérez
A vdpa net device must initialize with SVQ in order to be migratable at this moment, and initialization code verifies some conditions. If the device is not initialized with the x-svq parameter, it will not expose _F_LOG so the vhost subsystem will block VM migration from its initialization. Next

[PATCH 04/13] vdpa: move vhost reset after get vring base

2023-02-03 Thread Eugenio Pérez
The function vhost.c:vhost_dev_stop calls vhost operation vhost_dev_start(false). In the case of vdpa it totally reset and wipes the device, making the fetching of the vring base (virtqueue state) totally useless. The kernel backend does not use vhost_dev_start vhost op callback, but vhost-user

[PATCH 09/13] vdpa net: block migration if the device has CVQ

2023-02-03 Thread Eugenio Pérez
Devices with CVQ needs to migrate state beyond vq state. Leaving this to future series. Signed-off-by: Eugenio Pérez --- net/vhost-vdpa.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/net/vhost-vdpa.c b/net/vhost-vdpa.c index bca13f97fd..309861e56c 100644 --- a/net/vhost-vdpa.c +++

[PATCH 01/13] vdpa net: move iova tree creation from init to start

2023-02-03 Thread Eugenio Pérez
Only create iova_tree if and when it is needed. The cleanup keeps being responsible of last VQ but this change allows it to merge both cleanup functions. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- net/vhost-vdpa.c | 99 ++-- 1 file

[PATCH 07/13] vdpa: add vdpa net migration state notifier

2023-02-03 Thread Eugenio Pérez
This allows net to restart the device backend to configure SVQ on it. Ideally, these changes should not be net specific. However, the vdpa net backend is the one with enough knowledge to configure everything because of some reasons: * Queues might need to be shadowed or not depending on its kind

[PATCH 13/13] vdpa: return VHOST_F_LOG_ALL in vhost-vdpa devices

2023-02-03 Thread Eugenio Pérez
vhost-vdpa devices can return this features now that blockers have been set in case some features are not met. Expose VHOST_F_LOG_ALL only in that case. Signed-off-by: Eugenio Pérez --- hw/virtio/vhost-vdpa.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH 03/13] vdpa: add vhost_vdpa_suspend

2023-02-03 Thread Eugenio Pérez
The function vhost.c:vhost_dev_stop fetches the vring base so the vq state can be migrated to other devices. However, this is unreliable in vdpa, since we didn't signal the device to suspend the queues, making the value fetched useless. Suspend the device if possible before fetching first and

[PATCH 02/13] vdpa: Negotiate _F_SUSPEND feature

2023-02-03 Thread Eugenio Pérez
This is needed for qemu to know it can suspend the device to retrieve its status and enable SVQ with it, so all the process is transparent to the guest. Signed-off-by: Eugenio Pérez Acked-by: Jason Wang --- hw/virtio/vhost-vdpa.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH 11/13] vdpa: block migration if dev does not have _F_SUSPEND

2023-02-03 Thread Eugenio Pérez
Next patches enable devices to be migrated even if vdpa netdev has not been started with x-svq. However, not all devices are migratable, so we need to block migration if we detect that. Block vhost-vdpa device migration if it does not offer _F_SUSPEND and it has not been started with x-svq.

[PATCH 00/13] Dynamycally switch to vhost shadow virtqueues at vdpa net migration

2023-02-03 Thread Eugenio Pérez
It's possible to migrate vdpa net devices if they are shadowed from the start. But to always shadow the dataplane is to effectively break its host passthrough, so its not convenient in vDPA scenarios. This series enables dynamically switching to shadow mode only at migration time. This allows

[PATCH 06/13] vdpa net: allow VHOST_F_LOG_ALL

2023-02-03 Thread Eugenio Pérez
Since some actions move to the start function instead of init, the device features may not be the parent vdpa device's, but the one returned by vhost backend. If transition to SVQ is supported, the vhost backend will return _F_LOG_ALL to signal the device is migratable. Add VHOST_F_LOG_ALL. HW

Re: [PATCH 00/19] hw: Set QDev properties using QDev API (part 1/3)

2023-02-03 Thread BALATON Zoltan
On Fri, 3 Feb 2023, Philippe Mathieu-Daudé wrote: On 3/2/23 19:08, Philippe Mathieu-Daudé wrote: QEMU provides the QOM API for core objects. Devices are modelled on top of QOM as QDev objects. There is no point in using the lower level QOM API with QDev; it makes the code more complex and

Re: [PULL 00/33] target-arm queue

2023-02-03 Thread Peter Maydell
in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-target-arm-20230203 > > for you to fetch changes up to bb18151d8bd9bedc497ee9d4e8d81b39a4e5bbf6: > > target/arm: Enable FEAT_FG

[PATCH v4 0/4] [DO-NOT-MERGE] qapi: static typing conversion, "pt0"

2023-02-03 Thread John Snow
This is a manual testing pre-requisite for other QAPI cleanup patches. It isn't meant for inclusion, it's included here as an informative basis for ongoing work only. (Except for the last two patches, which you should totally merge.) sphinx-autodoc is enabled for the scripts/qapi package so that

[PATCH v4 2/4] [DO-NOT-MERGE]: Add some ad-hoc linting helpers.

2023-02-03 Thread John Snow
These aren't ready for upstream inclusion, because they do not properly manage version dependencies, execution environment and so on. These are just the tools I use in my Own Special Environment :tm: for testing and debugging. They've been tested only on Fedora 37 for right now, which means:

[PATCH v4 1/4] [DO-NOT-MERGE] docs: enable sphinx-autodoc for scripts/qapi

2023-02-03 Thread John Snow
This is just POC to prove that the docstrings, where they are written, are correct to some minimum standard. It is included here for reviewing/testing convenience. Signed-off-by: John Snow --- docs/conf.py | 3 ++- docs/devel/index.rst | 1 +

[PATCH v4 3/4] qapi: Update flake8 config

2023-02-03 Thread John Snow
New versions of flake8 don't like same-line comments. (It's a version newer than what fc37 ships, but it still makes my life easier to fix it now.) Signed-off-by: John Snow --- scripts/qapi/.flake8 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/.flake8

[PATCH v4 4/4] qapi: update pylint configuration

2023-02-03 Thread John Snow
Newer versions of pylint disable the "no-self-use" message by default. Older versions don't, though. If we leave the suppressions in, pylint yelps about useless options. Just tell pylint to shush. Signed-off-by: John Snow --- scripts/qapi/pylintrc | 1 + 1 file changed, 1 insertion(+) diff

[RFC PATCH] tests/avocado: retire the Aarch64 TCG tests from boot_linux.py

2023-02-03 Thread Alex Bennée
The two TCG tests for GICv2 and GICv3 are very heavy weight distros that take a long time to boot up, especially for an --enable-debug build. The total code coverage they give is: Overall coverage rate: lines..: 11.2% (59584 of 530123 lines) functions..: 15.0% (7436 of 49443

[RFC PATCH 07/19] hw/scsi: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/scsi/scsi-bus.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c

[PATCH 08/19] hw/usb: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/hcd-xhci-pci.c| 2 +- hw/usb/hcd-xhci-sysbus.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 18/19] hw/rx: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/rx/rx-gdbsim.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/hw/rx/rx-gdbsim.c

Re: [PATCH 00/19] hw: Set QDev properties using QDev API (part 1/3)

2023-02-03 Thread Philippe Mathieu-Daudé
On 3/2/23 19:08, Philippe Mathieu-Daudé wrote: QEMU provides the QOM API for core objects. Devices are modelled on top of QOM as QDev objects. There is no point in using the lower level QOM API with QDev; it makes the code more complex and harder to review. I first converted all the calls

[PATCH 13/19] hw/m68k: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/m68k/next-cube.c | 2 +- hw/m68k/q800.c | 7 +++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git

[PATCH 16/19] hw/nios2: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/nios2/10m50_devboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/nios2/10m50_devboard.c

[PATCH 01/19] NOTFORMERGE scripts/coccinelle: Add qom-qdev-prop.cocci

2023-02-03 Thread Philippe Mathieu-Daudé
Script I used to generate the following patches. This is not an automatic conversion as object_property_set_[u]int() does not specify the type size. Each integer property must then be converted manually. Therefore this script doesn't seem relevant to be committed in the repository. Signed-off-by:

[RFC PATCH 12/19] hw/i386: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc.c | 8 +++- hw/i386/pc_q35.c | 25 +++-- hw/i386/sgx.c | 3 +--

[PATCH 19/19] hw/sparc: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/dma/sparc32_dma.c | 6 +++--- hw/sparc/sun4m.c | 10 -- hw/sparc64/sun4u.c | 3 +-- 3 files changed, 8

[RFC PATCH 15/19] hw/mips: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/boston.c | 6 ++ hw/mips/cps.c| 42 ++ hw/mips/jazz.c | 3 +--

[PATCH 09/19] hw/virtio: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/display/virtio-gpu-pci.c | 4 ++-- hw/display/virtio-vga.c | 4 ++-- hw/virtio/virtio-iommu-pci.c | 3 +--

[RFC PATCH 05/19] hw/core/numa: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/numa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/core/numa.c b/hw/core/numa.c index

[PATCH 11/19] hw/hppa: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/hppa/machine.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hw/hppa/machine.c b/hw/hppa/machine.c index

[RFC PATCH 17/19] hw/riscv: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/riscv/microchip_pfsoc.c | 8 hw/riscv/opentitan.c | 9 +++-- hw/riscv/shakti_c.c| 7 +++

[PATCH 14/19] hw/microblaze: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/microblaze/petalogix_ml605_mmu.c | 40 +++- hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 +-

[PATCH 06/19] hw/core/gpio: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/gpio.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/core/gpio.c b/hw/core/gpio.c index

[PATCH 10/19] hw/avr: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/avr/arduino.c | 4 ++-- hw/avr/atmega.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 02/19] hw/qdev: Introduce qdev_prop_set_link()

2023-02-03 Thread Philippe Mathieu-Daudé
Introduce qdev_prop_set_link(), equivalent of object_property_set_link() for QDev objects. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-properties.c| 5 + include/hw/qdev-properties.h | 1 + 2 files changed, 6 insertions(+) diff --git a/hw/core/qdev-properties.c

[PATCH 04/19] hw/audio: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/audio/pcspk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hw/audio/pcspk.h

[PATCH 03/19] hw/acpi: Set QDev properties using QDev API

2023-02-03 Thread Philippe Mathieu-Daudé
No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. Signed-off-by: Philippe Mathieu-Daudé --- hw/acpi/cpu_hotplug.c | 7 +++ hw/acpi/ich9.c| 4 ++-- hw/acpi/piix4.c | 4 ++-- 3 files changed, 7 insertions(+),

[PATCH 00/19] hw: Set QDev properties using QDev API (part 1/3)

2023-02-03 Thread Philippe Mathieu-Daudé
QEMU provides the QOM API for core objects. Devices are modelled on top of QOM as QDev objects. There is no point in using the lower level QOM API with QDev; it makes the code more complex and harder to review. I first converted all the calls using errp=_abort or =NULL, then noticed the other

Re: ASan reports use-after-free when running munmap-pthread

2023-02-03 Thread Richard Henderson
On 2/3/23 07:34, Richard Henderson wrote: On 2/3/23 01:23, Alex Bennée wrote: Anton Johansson writes: Hi, I was running check-tcg with ASan enabled on master, and ran into the following use-after-free. There appears to be a race between jump cache invalidation and thread destruction (?) I

Re: [PATCH] target/arm: Add raw_writes ops for register whose write induce TLB maintenance

2023-02-03 Thread Eric Auger
Hi Peter, On 2/3/23 19:04, Peter Maydell wrote: > On Fri, 3 Feb 2023 at 17:17, Eric Auger wrote: >> Many registers whose 'cooked' writefns induce TLB maintenance do >> not have raw_writefn ops defined. If only the writefn ops is set >> (ie. no raw_writefn is provided), it is assumed the cooked

Re: [RFC v3 00/18] vfio: Adopt iommufd

2023-02-03 Thread Eric Auger
On 2/3/23 13:57, Jason Gunthorpe wrote: > On Tue, Jan 31, 2023 at 09:52:47PM +0100, Eric Auger wrote: >> Given some iommufd kernel limitations, the iommufd backend is >> not yuet fully on par with the legacy backend w.r.t. features like: >> - p2p mappings (you will see related error traces) >>

Re: [PATCH] target/arm: Add raw_writes ops for register whose write induce TLB maintenance

2023-02-03 Thread Peter Maydell
On Fri, 3 Feb 2023 at 17:17, Eric Auger wrote: > > Many registers whose 'cooked' writefns induce TLB maintenance do > not have raw_writefn ops defined. If only the writefn ops is set > (ie. no raw_writefn is provided), it is assumed the cooked also > work as the raw one. For those registers it is

Re: [RFC v3 18/18] vfio/as: Allow the selection of a given iommu backend

2023-02-03 Thread Jason Gunthorpe
On Fri, Feb 03, 2023 at 06:57:02PM +0100, Eric Auger wrote: > Hi Jason, > > On 2/3/23 13:51, Jason Gunthorpe wrote: > > On Tue, Jan 31, 2023 at 09:53:05PM +0100, Eric Auger wrote: > >> Now we support two types of iommu backends, let's add the capability > >> to select one of them. This depends on

Re: [RFC v3 18/18] vfio/as: Allow the selection of a given iommu backend

2023-02-03 Thread Eric Auger
Hi Jason, On 2/3/23 13:51, Jason Gunthorpe wrote: > On Tue, Jan 31, 2023 at 09:53:05PM +0100, Eric Auger wrote: >> Now we support two types of iommu backends, let's add the capability >> to select one of them. This depends on whether an iommufd object has >> been linked with the vfio-pci device:

Re: [PATCH v4 04/16] hw/9pfs: Implement Windows specific xxxdir() APIs

2023-02-03 Thread Christian Schoenebeck
On Friday, February 3, 2023 5:30:35 PM CET Shi, Guohuai wrote: > > > -Original Message- > > From: Christian Schoenebeck > > Sent: Friday, February 3, 2023 22:41 > > To: Greg Kurz ; qemu-devel@nongnu.org > > Cc: Meng, Bin ; Marc-André Lureau > > ; Daniel P. Berrangé ; > > Shi, > >

Re: [PULL v2 00/36] Testing, docs, semihosting and plugin updates

2023-02-03 Thread Philippe Mathieu-Daudé
On 2/2/23 17:01, Alex Bennée wrote: The following changes since commit 026817fb69414c9d3909d8b1a209f90180d777d6: Merge tag 'python-pull-request' of https://gitlab.com/jsnow/qemu into staging (2023-02-01 16:15:56 +) are available in the Git repository at:

  1   2   3   4   >