Re: [PATCH] migration: Add co-maintainers for migration

2023-10-03 Thread Juan Quintela
Peter Xu wrote: > Per the qemu upstream call a few hours ago, proposing Fabiano and myself as > the co-maintainer for migration subsystem to help Juan. > > Cc: Fabiano Rosas > Cc: Juan Quintela > Signed-off-by: Peter Xu > --- > > Fabiano, would you please ack here publically to acknowledge that

Re: [PATCH v3 04/15] vfio/common: Propagate KVM_SET_DEVICE_ATTR error if any

2023-10-03 Thread Cédric Le Goater
On 10/3/23 12:14, Eric Auger wrote: In the VFIO_SPAPR_TCE_v2_IOMMU container case, when KVM_SET_DEVICE_ATTR fails, we currently don't propagate the error as we do on the vfio_spapr_create_window() failure case. Let's align the code. Take the opportunity to reword the error message and make it mor

Re: [PATCH] migration: Add co-maintainers for migration

2023-10-03 Thread Philippe Mathieu-Daudé
On 3/10/23 16:38, Peter Xu wrote: Per the qemu upstream call a few hours ago, proposing Fabiano and myself as the co-maintainer for migration subsystem to help Juan. Cc: Fabiano Rosas Cc: Juan Quintela Signed-off-by: Peter Xu --- Fabiano, would you please ack here publically to acknowledge t

Re: [PATCH] migration: Unify and trace vmstate field_exists() checks

2023-10-03 Thread Peter Xu
On Thu, Sep 07, 2023 at 08:55:52AM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > For both save/load we actually share the logic on deciding whether a field > > should exist. Merge the checks into a helper and use it for both save and > > load. When doing so, add documentations and reform

Re: [PATCH v3 07/15] vfio/pci: Introduce vfio_[attach/detach]_device

2023-10-03 Thread Cédric Le Goater
On 10/3/23 12:14, Eric Auger wrote: We want the VFIO devices to be able to use two different IOMMU backends, the legacy VFIO one and the new iommufd one. Introduce vfio_[attach/detach]_device which aim at hiding the underlying IOMMU backend (IOCTLs, datatypes, ...). Once vfio_attach_device comp

Re: [PATCH v3 08/15] vfio/platform: Use vfio_[attach/detach]_device

2023-10-03 Thread Cédric Le Goater
On 10/3/23 12:14, Eric Auger wrote: Let the vfio-platform device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. Drop the trace event for vfio-platform as we have similar one in vfio_attach_device. Signed-off-by: Eric Auger Signed-off-by:

Re: [RFC PATCH 1/1] qtest/migration: Support more than one QEMU binary

2023-10-03 Thread Philippe Mathieu-Daudé
Hi Fabiano, [+Alex & Daniel] On 3/10/23 16:19, Fabiano Rosas wrote: We have strict rules around migration compatibility between different QEMU versions but not a single test that validates the migration state between different binaries. Add some infrastructure to allow running the migration te

Re: [PATCH v3 09/15] vfio/ap: Use vfio_[attach/detach]_device

2023-10-03 Thread Cédric Le Goater
On 10/3/23 12:14, Eric Auger wrote: Let the vfio-ap device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. We take the opportunity to use g_path_get_basename() which is prefered, as suggested by 3e015d815b ("use g_path_get_basename instead o

Re: [PATCH v10 01/11] Add virtio-sound device stub

2023-10-03 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Tue, Oct 03, 2023 at 03:34:44PM +0100, Alex Bennée wrote: >> >> "Michael S. Tsirkin" writes: >> >> > On Fri, Sep 29, 2023 at 05:08:21PM +0300, Emmanouil Pitsidianakis wrote: >> >> Add a new VIRTIO device for the virtio sound device id. Functionality >> >> wi

Re: [PULL 00/24] Audio, build system, misc fixes for 2023-10-03

2023-10-03 Thread Michael Tokarev
03.10.2023 11:30, Paolo Bonzini: * fix from optionrom build * fix for KVM on Apple M2 * introduce machine property "audiodev" * ui/vnc: Require audiodev= to enable audio * audio: remove QEMU_AUDIO_* and -audio-help support * audio:

Re: [PATCH v3 10/15] vfio/ccw: Use vfio_[attach/detach]_device

2023-10-03 Thread Cédric Le Goater
On 10/3/23 12:14, Eric Auger wrote: Let the vfio-ccw device use vfio_attach_device() and vfio_detach_device(), hence hiding the details of the used IOMMU backend. Note that the migration reduces the following trace "vfio: subchannel %s has already been attached" (featuring cssid.ssid.devid) into

Re: [PATCH 7/7] vhost-user: call VHOST_USER_SET_VRING_ENABLE synchronously

2023-10-03 Thread Stefan Hajnoczi
On Tue, 3 Oct 2023 at 10:40, Michael S. Tsirkin wrote: > > On Tue, Oct 03, 2023 at 09:08:15AM -0400, Stefan Hajnoczi wrote: > > On Tue, 3 Oct 2023 at 08:27, Michael S. Tsirkin wrote: > > > > > > On Mon, Oct 02, 2023 at 05:13:26PM -0400, Stefan Hajnoczi wrote: > > > > One more question: > > > > >

Re: [PATCH v3 11/15] vfio/common: Move VFIO reset handler registration to a group agnostic function

2023-10-03 Thread Cédric Le Goater
On 10/3/23 12:14, Eric Auger wrote: From: Zhenzhong Duan Move the reset handler registration/unregistration to a place that is not group specific. vfio_[get/put]_address_space are the best places for that purpose. Signed-off-by: Eric Auger Signed-off-by: Yi Liu Signed-off-by: Zhenzhong Duan

Re: [PATCH v2 05/12] virtio-iommu: Introduce per IOMMUDevice reserved regions

2023-10-03 Thread Eric Auger
Hi Jean, On 9/29/23 17:52, Jean-Philippe Brucker wrote: > Hi Eric, > > On Wed, Sep 13, 2023 at 10:01:40AM +0200, Eric Auger wrote: >> For the time being the per device reserved regions are >> just a duplicate of IOMMU wide reserved regions. Subsequent >> patches will combine those with host reserv

Re: [PATCH v3 12/15] vfio/common: Introduce a per container device list

2023-10-03 Thread Cédric Le Goater
On 10/3/23 12:14, Eric Auger wrote: From: Zhenzhong Duan Several functions need to iterate over the VFIO devices attached to a given container. This is currently achieved by iterating over the groups attached to the container and then over the devices in the group. Let's introduce a per contai

Re: [PATCH 1/1] tcg/loongarch64: Fix buid error

2023-10-03 Thread Richard Henderson
On 9/26/23 00:58, Song Gao wrote: From: gaosong Fix: In file included from ../tcg/tcg.c:735: /home1/gaosong/bugfix/qemu/tcg/loongarch64/tcg-target.c.inc: In function ‘tcg_out_vec_op’: /home1/gaosong/bugfix/qemu/tcg/loongarch64/tcg-target.c.inc:1855:9: error: a label can only be part

Re: [RFC PATCH 1/1] qtest/migration: Support more than one QEMU binary

2023-10-03 Thread Daniel P . Berrangé
On Tue, Oct 03, 2023 at 05:24:50PM +0200, Philippe Mathieu-Daudé wrote: > Hi Fabiano, > > [+Alex & Daniel] > > On 3/10/23 16:19, Fabiano Rosas wrote: > > We have strict rules around migration compatibility between different > > QEMU versions but not a single test that validates the migration stat

Re: [PATCH 7/7] vhost-user: call VHOST_USER_SET_VRING_ENABLE synchronously

2023-10-03 Thread Stefan Hajnoczi
On Tue, 3 Oct 2023 at 10:41, Michael S. Tsirkin wrote: > > On Sun, Aug 27, 2023 at 08:29:37PM +0200, Laszlo Ersek wrote: > > (1) The virtio-1.0 specification > > writes: > > > > > 3 General Initialization And Device Operation > >

Re: [PATCH v3 14/15] vfio/common: Introduce a global VFIODevice list

2023-10-03 Thread Cédric Le Goater
On 10/3/23 12:14, Eric Auger wrote: From: Zhenzhong Duan Some functions iterate over all the VFIODevices. This is currently achieved by iterating over all groups/devices. Let's introduce a global list of VFIODevices simplifying that scan. Maybe we should move the qemu_register_reset() when th

Re: [PATCH] xlnx-bbram: hw/nvram: Remove deprecated device reset

2023-10-03 Thread Ho, Tong
Hi Philippe, Thanks for the review. The rest is in the pipeline. Regards, Tong Ho From: Philippe Mathieu-Daudé Sent: Monday, October 2, 2023 11:23 PM To: Ho, Tong ; qemu-...@nongnu.org Cc: qemu-devel@nongnu.org ; alist...@alistair23.me ; edgar.igles...@gmail.

Re: [PATCH v3 13/15] vfio/common: Store the parent container in VFIODevice

2023-10-03 Thread Cédric Le Goater
On 10/3/23 12:14, Eric Auger wrote: From: Zhenzhong Duan let's store the parent contaienr within the VFIODevice. This simplifies the logic in vfio_viommu_preset() and brings the benefice to hide the group specificity which is useful for IOMMUFD migration. Signed-off-by: Eric Auger Signed-off-

Re: [PATCH v2 0/7] accel: Restrict tcg_exec_[un]realizefn() to TCG

2023-10-03 Thread Richard Henderson
On 10/3/23 05:30, Philippe Mathieu-Daudé wrote: Since v1: - Use 'target'/'common' in function names (Claudio) - Added Claudio R-b tags From v1: - Add missing accel_cpu_common_unrealize() - Add AccelClass::cpu_common_[un]realize handlers - Use tcg_exec_[un]realizefn as AccelClass handlers Than

Re: [RFC] Proposal of QEMU PCI Endpoint test environment

2023-10-03 Thread Jiri Kastner
hi shunsuke, all, what about vfio-user + qemu? qemu already has libvfio-user as submodule. there is ongoing work to add qemu vfio-user client functionality. adding people involved to loop, not sure if i forgot somebody. regards jiri On Tue, Oct 03, 2023 at 01:56:03PM +0900, Shunsuke Mie wrote:

Re: [PATCH v3 15/15] vfio/common: Move legacy VFIO backend code into separate container.c

2023-10-03 Thread Cédric Le Goater
On 10/3/23 12:14, Eric Auger wrote: From: Yi Liu Move all the code really dependent on the legacy VFIO container/group into a separate file: container.c. What does remain in common.c is the code related to VFIOAddressSpace, MemoryListeners, migration and all other general operations. Signed-of

Re: [PATCH v10 00/11] Add VIRTIO sound card

2023-10-03 Thread Manos Pitsidianakis
On Tue, 03 Oct 2023 17:10, "Michael S. Tsirkin" wrote: I hope you are also fixing the linux driver to fix this in a robust way, yes? Hello Michael, You can find pertinent discussion on the virtio-comment list here: https://lists.oasis-open.org/archives/virtio-comment/202309/threads.html#0017

Re: [RFC PATCH 1/1] qtest/migration: Support more than one QEMU binary

2023-10-03 Thread Fabiano Rosas
Daniel P. Berrangé writes: > On Tue, Oct 03, 2023 at 05:24:50PM +0200, Philippe Mathieu-Daudé wrote: >> Hi Fabiano, >> >> [+Alex & Daniel] >> >> On 3/10/23 16:19, Fabiano Rosas wrote: >> > We have strict rules around migration compatibility between different >> > QEMU versions but not a single

Re: [PATCH for-8.1] vfio/display: Fix missing update to set backing fields

2023-10-03 Thread Michael Tokarev
22.09.2023 12:38, Cédric Le Goater: On 9/13/23 21:18, Alex Williamson wrote: Hi Gerd, Some consultation would be appreciated on this thread to get this patch out of limbo.  Is there a better solution that what I've proposed? This does fix a regression reproducible on systems with an Intel Ge

Re: [PATCH 1/1] hw/ide/core: terminate in-flight DMA on IDE bus reset

2023-10-03 Thread John Snow
On Tue, Oct 3, 2023, 10:07 AM Niklas Cassel wrote: > On Mon, Sep 25, 2023 at 03:53:23PM -0400, John Snow wrote: > > Niklas, I'm sorry to lean on you here a little bit - You've been > > working on the SATA side of this a bit more often, can you let me know > > if you think this patch is safe? > >

Re: FreeBSD 13.2 installer does not see AHCI devices on aarch64/sbsa-ref and x86-64/q35

2023-10-03 Thread John Snow
While I'm poking at IDE today ... any news here? On Tue, Sep 26, 2023, 12:35 PM John Snow wrote: > > > On Tue, Sep 26, 2023, 8:06 AM Niklas Cassel wrote: > >> Hello Marcin, >> >> I will have a look at this. >> >> >> Kind regards, >> Niklas >> > > Thanks. You have my blessing in advance to get

Re: [PATCH v10 00/11] Add VIRTIO sound card

2023-10-03 Thread Michael S. Tsirkin
On Tue, Oct 03, 2023 at 07:09:14PM +0300, Manos Pitsidianakis wrote: > On Tue, 03 Oct 2023 17:10, "Michael S. Tsirkin" wrote: > > I hope you are also fixing the linux driver to fix this in a robust > > way, yes? > > Hello Michael, > > You can find pertinent discussion on the virtio-comment list

Re: FreeBSD 13.2 installer does not see AHCI devices on aarch64/sbsa-ref and x86-64/q35

2023-10-03 Thread Michael Tokarev
26.09.2023 15:05, Niklas Cassel: Hello Marcin, I will have a look at this. Hi Marcin, Hi Niklas! Niklas, I remember asking you if the whole thing is okay for the -stable, and you was a bit unsure about it :) Regardless, I picked the changes up for -stable. I don't think it was anyone's fault

Re: [PATCH] hw/cxl: Fix local variable shadowing of cap_hdrs

2023-10-03 Thread Fan Ni
On Fri, Sep 29, 2023 at 09:50:16AM +0200, Markus Armbruster wrote: > Jonathan Cameron writes: > > > On Wed, 27 Sep 2023 19:13:35 + > > Fan Ni wrote: > > > >> On Mon, Sep 25, 2023 at 04:22:58PM +0100, Jonathan Cameron wrote: > >> > >> > Rename the version not burried in the macro to cap_h.

Re: [PATCH] hw/cxl: Fix local variable shadowing of cap_hdrs

2023-10-03 Thread Fan Ni
On Mon, Sep 25, 2023 at 04:22:58PM +0100, Jonathan Cameron wrote: > Rename the version not burried in the macro to cap_h. > > Signed-off-by: Jonathan Cameron > --- > > I had another instance of this in a series I'll post later today. > Cleaned that up the same way. > > hw/cxl/cxl-device-utils

[PATCH qemu 1/1] Switch memory management calls to new coding conventions

2023-10-03 Thread ~h0lyalg0rithm
From: Suraj Shirvankar Signed-off-by: Suraj Shirvankar --- contrib/elf2dmp/addrspace.c | 4 ++-- contrib/elf2dmp/main.c | 4 ++-- contrib/elf2dmp/pdb.c | 4 ++-- contrib/elf2dmp/qemu_elf.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/contrib/elf2dmp/addrs

[PATCH qemu 0/1] contrib/elf2dmp: Conversion of conversions of malloc/calloc/free to g_malloc/g_new/g_free

2023-10-03 Thread ~h0lyalg0rithm
Switch malloc and free calls to new coding standard. g_new is used where structs are defined and g_malloc is used for simpler structures Suraj Shirvankar (1): Switch memory management calls to new coding conventions contrib/elf2dmp/addrspace.c | 4 ++-- contrib/elf2dmp/main.c | 4 ++-- co

[PULL 00/47] tcg patch queue

2023-10-03 Thread Richard Henderson
The following changes since commit da1034094d375afe9e3d8ec8980550ea0f06f7e0: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2023-10-03 07:43:44 -0400) are available in the Git repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20231003

[PULL 25/47] accel/tcg: Modify memory access functions to use CPUState

2023-10-03 Thread Richard Henderson
From: Anton Johansson do_[ld|st]*() and mmu_lookup*() are changed to use CPUState over CPUArchState, moving the target-dependence to the target-facing facing cpu_[ld|st] functions. Signed-off-by: Anton Johansson Message-Id: <20230912153428.17816-6-a...@rev.ng> Reviewed-by: Richard Henderson Re

[PULL 34/47] accel: Make accel-blocker.o target agnostic

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé accel-blocker.c is not target specific, move it to system_ss[]. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Message-Id: <20230914185718.76241-5-phi...@linaro.org> Signed-off-by: Richard Henderson --- accel/meson.build | 4 ++-- 1 file chang

[PULL 20/47] accel/tcg: Remove cpu_set_cpustate_pointers

2023-10-03 Thread Richard Henderson
This function is now empty, so remove it. In the case of m68k and tricore, this empties the class instance initfn, so remove those as well. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 10 -- target/alpha/cpu.c | 2 -- target/

[PULL 23/47] accel/tcg: Modify tlb_*() to use CPUState

2023-10-03 Thread Richard Henderson
From: Anton Johansson Changes tlb_*() functions to take CPUState instead of CPUArchState, as they don't require the full CPUArchState. This makes it easier to decouple target-(in)dependent code. Signed-off-by: Anton Johansson Message-Id: <20230912153428.17816-4-a...@rev.ng> Reviewed-by: Richard

[PULL 32/47] exec: Move cpu_loop_foo() target agnostic functions to 'cpu-common.h'

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé While these functions are not TCG specific, they are not target specific. Move them to "exec/cpu-common.h" so their callers don't have to be tainted as target specific. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Message-Id: <20230914185718.7

[PULL 36/47] exec: Rename cpu.c -> cpu-target.c

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé We have exec/cpu code split in 2 files for target agnostic ("common") and specific. Rename 'cpu.c' which is target specific using the '-target' suffix. Update MAINTAINERS. Remove the 's from 'cpus-common.c' to match the API cpu_foo() functions. Signed-off-by: Philipp

[PULL 29/47] accel/tcg: Unify user and softmmu do_[st|ld]*_mmu()

2023-10-03 Thread Richard Henderson
From: Anton Johansson The prototype of do_[st|ld]*_mmu() is unified between system- and user-mode allowing a large chunk of helper_[st|ld]*() and cpu_[st|ld]*() functions to be expressed in same manner between both modes. These functions will be moved to ldst_common.c.inc in a following commit.

[PULL 12/47] target/*: Add instance_align to all cpu base classes

2023-10-03 Thread Richard Henderson
The omission of alignment has technically been wrong since 269bd5d8f61, where QEMU_ALIGNED was added to CPUTLBDescFast. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/alpha/cpu.c | 1 + target/avr/cpu.c| 1 + target/cris/cpu.c | 1 + target/he

[PULL 26/47] accel/tcg: Modify atomic_mmu_lookup() to use CPUState

2023-10-03 Thread Richard Henderson
From: Anton Johansson The goal is to (in the future) allow for per-target compilation of functions in atomic_template.h whilst atomic_mmu_lookup() and cputlb.c are compiled once-per user- or system mode. Signed-off-by: Anton Johansson Message-Id: <20230912153428.17816-7-a...@rev.ng> Reviewed-by

[PULL 19/47] accel/tcg: Replace CPUState.env_ptr with cpu_env()

2023-10-03 Thread Richard Henderson
Reviewed-by: Anton Johansson Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 1 - include/hw/core/cpu.h| 9 ++--- target/arm/common-semi-target.h | 2 +- accel/tcg/cpu-exec.c | 8 accel/tcg/cputlb.c

[PULL 17/47] accel/tcg: Remove cpu_neg()

2023-10-03 Thread Richard Henderson
Now that CPUNegativeOffsetState is part of CPUState, we can reference it directly. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 11 --- include/exec/exec-all.h | 2 +- accel/tcg/cpu-exec.c | 14 +++-

[PULL 01/47] accel: Rename accel_cpu_realizefn() -> accel_cpu_realize()

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé We use the '*fn' suffix for handlers, this is a public method. Drop the suffix. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Claudio Fontana Message-Id: <20231003123026.99229-2-phi...@linaro.org> Signed-off-by: Richard Henderson --- include/qemu/accel.h

[PULL 31/47] exec: Make EXCP_FOO definitions target agnostic

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé The EXCP_* definitions don't need to be target specific, move them to "exec/cpu-common.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Message-Id: <20230914185718.76241-2-phi...@linaro.org> Signed-off-by: Richard Henderson --- include/exec/

[PULL 10/47] qom: Propagate alignment through type system

2023-10-03 Thread Richard Henderson
Propagate alignment just like size. This is required in order to get the correct alignment on most cpu subclasses where the size and alignment is only specified for the base cpu type. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- qom/object.c | 14 ++ 1 f

[PULL 33/47] accel/tcg: Restrict dump_exec_info() declaration

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé In commit 00c9a5c2c3 ("accel/tcg: Restrict 'qapi-commands-machine.h' to system emulation") we moved the definition to accel/tcg/ which is where this function is called. No need to expose it outside. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson

[PULL 02/47] accel: Rename AccelCPUClass::cpu_realizefn() -> cpu_target_realize()

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé The AccelCPUClass::cpu_realizefn handler is meant for target specific code, rename it using '_target_' to emphasis it. Suggested-by: Claudio Fontana Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20231003123026.99229-3-phi...@linaro.org> Signed-off-by: Richard

[PULL 35/47] accel: Rename accel-common.c -> accel-target.c

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé We use the '-common.c' suffix for target agnostic units. This file is target specific, rename it using the '-target' suffix. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Message-Id: <20230914185718.76241-6-phi...@linaro.org> Signed-off-by: Ric

[PULL 07/47] accel/tcg: Restrict tcg_exec_[un]realizefn() to TCG

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé We don't need to expose these TCG-specific methods to the whole code base. Register them as AccelClass handlers, they will be called by the generic accel_cpu_[un]realize() methods. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Claudio Fontana Message-Id: <2023

[PULL 15/47] accel/tcg: Remove CPUState.icount_decr_ptr

2023-10-03 Thread Richard Henderson
We can now access icount_decr directly. Reviewed-by: Anton Johansson Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 1 - include/hw/core/cpu.h | 2 -- hw/core/cpu-common.c | 4 ++-- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/include/exec/cpu-all.h b/include

[PULL 42/47] tcg: Remove argument to tcg_prologue_init

2023-10-03 Thread Richard Henderson
We can load tcg_ctx just as easily within the callee. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 2 +- accel/tcg/tcg-all.c | 2 +- bsd-user/main.c | 2 +- linux-user/main.c | 2 +- tcg/tcg.c | 3 ++- 5 files changed, 6 insertio

[PULL 47/47] tcg/loongarch64: Fix buid error

2023-10-03 Thread Richard Henderson
From: gaosong Fix: In file included from ../tcg/tcg.c:735: /home1/gaosong/bugfix/qemu/tcg/loongarch64/tcg-target.c.inc: In function ‘tcg_out_vec_op’: /home1/gaosong/bugfix/qemu/tcg/loongarch64/tcg-target.c.inc:1855:9: error: a label can only be part of a statement and a declaration is no

[PULL 06/47] accel/tcg: Have tcg_exec_realizefn() return a boolean

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have tcg_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Claudio Fontana Message-Id:

[PULL 28/47] accel/tcg: Remove env_tlb()

2023-10-03 Thread Richard Henderson
From: Anton Johansson The function is no longer used to access the TLB, and has been replaced by cpu->neg.tlb. Signed-off-by: Anton Johansson Message-Id: <20230912153428.17816-9-a...@rev.ng> Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé [rth: Merge comment update patch] S

[PULL 08/47] target/arm: Replace TARGET_PAGE_ENTRY_EXTRA

2023-10-03 Thread Richard Henderson
From: Anton Johansson TARGET_PAGE_ENTRY_EXTRA is a macro that allows guests to specify additional fields for caching with the full TLB entry. This macro is replaced with a union in CPUTLBEntryFull, thus making CPUTLB target-agnostic at the cost of slightly inflated CPUTLBEntryFull for non-arm gu

[PULL 21/47] accel/tcg: Remove env_neg()

2023-10-03 Thread Richard Henderson
Replace the single use within env_tlb() and remove. Reviewed-by: Anton Johansson Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/include/exec/cpu-all.h b/include/ex

Re: [PATCH RESEND] osdep: set _FORTIFY_SOURCE=2 when optimization is enabled

2023-10-03 Thread Stefan Hajnoczi
On Tue, Oct 03, 2023 at 10:15:49AM +0100, Daniel P. Berrangé wrote: > Currently we set _FORTIFY_SOURCE=2 as a compiler argument when the > meson 'optimization' setting is non-zero, the compiler is GCC and > the target is Linux. > > While the default QEMU optimization level is 2, user could overrid

[PULL 14/47] accel/tcg: Move CPUNegativeOffsetState into CPUState

2023-10-03 Thread Richard Henderson
Retain the separate structure to emphasize its importance. Enforce CPUArchState always follows CPUState without padding. Reviewed-by: Anton Johansson Signed-off-by: Richard Henderson --- include/exec/cpu-all.h| 22 +- include/hw/core/cpu.h | 17 +++-- tar

[PULL 27/47] accel/tcg: Use CPUState in atomicity helpers

2023-10-03 Thread Richard Henderson
From: Anton Johansson Makes ldst_atomicity.c.inc almost target-independent, with the exception of TARGET_PAGE_MASK, which will be addressed in a future patch. Signed-off-by: Anton Johansson Message-Id: <20230912153428.17816-8-a...@rev.ng> Reviewed-by: Richard Henderson Reviewed-by: Philippe Ma

[PULL 09/47] accel/tcg: Move CPUTLB definitions from cpu-defs.h

2023-10-03 Thread Richard Henderson
Accept that we will consume space in CPUState for CONFIG_USER_ONLY, since we cannot test CONFIG_SOFTMMU within hw/core/cpu.h. Reviewed-by: Anton Johansson Signed-off-by: Richard Henderson --- include/exec/cpu-defs.h | 150 include/hw/core/cpu.h | 141 +

[PULL 22/47] tcg: Remove TCGContext.tlb_fast_offset

2023-10-03 Thread Richard Henderson
Now that there is no padding between CPUNegativeOffsetState and CPUArchState, this value is constant across all targets. Reviewed-by: Anton Johansson Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 1 - accel/tcg/translate-all.c | 2 -- tcg/tcg.c | 15

[PULL 11/47] target/arm: Remove size and alignment for cpu subclasses

2023-10-03 Thread Richard Henderson
Inherit the size and alignment from TYPE_ARM_CPU. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/arm/cpu.c | 3 --- target/arm/cpu64.c | 4 2 files changed, 7 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index b9e09a702d..d48a70c039 1006

[PULL 16/47] accel/tcg: Move can_do_io to CPUNegativeOffsetState

2023-10-03 Thread Richard Henderson
Minimize the displacement to can_do_io, since it may be touched at the start of each TranslationBlock. It fits into other padding within the substructure. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/hw/core/cpu.h| 6 ++ accel/dummy-cpus.c

[PULL 44/47] linux-user/hppa: Fix struct target_sigcontext layout

2023-10-03 Thread Richard Henderson
Use abi_ullong not uint64_t so that the alignment of the field and therefore the layout of the struct is correct. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- linux-user/hppa/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux-user/hppa

[PULL 41/47] accel/tcg: Make cpu-exec-common.c a target agnostic unit

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé cpu_in_serial_context() is not target specific, move it declaration to "internal-common.h" (which we include in the 4 source files modified). Remove the unused "exec/exec-all.h" header from cpu-exec-common.c. There is no more target specific code in this file: make

[PULL 45/47] build: Remove --enable-gprof

2023-10-03 Thread Richard Henderson
This build option has been deprecated since 8.0. Remove all CONFIG_GPROF code that depends on that, including one errant check using TARGET_GPROF. Acked-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Acked-by: Paolo Bonzini Signed-off-by: Richard Henderson --- docs/about/deprecated.rst

[PULL 13/47] accel/tcg: Validate placement of CPUNegativeOffsetState

2023-10-03 Thread Richard Henderson
Verify that the distance between CPUNegativeOffsetState and CPUArchState is no greater than any alignment requirements. Reviewed-by: Anton Johansson Signed-off-by: Richard Henderson --- include/exec/cpu-all.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/include/exec/cpu-all.h b/inc

[PULL 04/47] accel: Introduce accel_cpu_common_unrealize() stub

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé Prepare the stub for parity with accel_cpu_common_realize(). Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20231003123026.99229-5-phi...@linaro.org> Signed-off-by: Richard Henderson --- include/qemu/accel.h | 6 ++ accel/accel-common.c | 4 cpu.c

[PULL 03/47] accel: Rename accel_cpu_realize() -> accel_cpu_common_realize()

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé accel_cpu_realize() is a generic function working with CPUs from any target. Rename it using '_common_' to emphasis it is not target specific. Suggested-by: Claudio Fontana Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20231003123026.99229-4-phi...@linaro.org

[PULL 46/47] tests/avocado: Re-enable MIPS Malta tests (GitLab issue #1884 fixed)

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé Commit 18a536f1f8 ("accel/tcg: Always require can_do_io") fixed the GitLab issue #1884: we can now re-enable those tests. This reverts commit f959c3d87ccfa585b105de6964a6261e368cc1da. Signed-off-by: Philippe Mathieu-Daudé Acked-by: Alex Bennée Message-Id: <2023100

[PULL 38/47] accel/tcg: Rename target-specific 'internal.h' -> 'internal-target.h'

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé accel/tcg/internal.h contains target specific declarations. Unit files including it become "target tainted": they can not be compiled as target agnostic. Rename using the '-target' suffix to make this explicit. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anto

[PULL 05/47] accel: Declare AccelClass::cpu_common_[un]realize() handlers

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé Currently accel_cpu_realize() only performs target-specific realization. Introduce the cpu_common_[un]realize fields in the base AccelClass to be able to perform target-agnostic [un]realization of vCPUs. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20231003123

[PULL 40/47] accel/tcg: Make icount.o a target agnostic unit

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé Remove the unused "exec/exec-all.h" header. There is no more target specific code in it: make it target agnostic (rename using the '-common' suffix). Since it is TCG specific, move it to accel/tcg, updating MAINTAINERS. Signed-off-by: Philippe Mathieu-Daudé Reviewed

[PULL 43/47] tcg: Split out tcg init functions to tcg/startup.h

2023-10-03 Thread Richard Henderson
The tcg/tcg.h header is a big bucket, containing stuff related to the translators and the JIT backend. The places that initialize tcg or create new threads do not need all of that, so split out these three functions to a new header. Suggested-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v4 2/8] vdpa: Use iovec for vhost_vdpa_net_cvq_add()

2023-10-03 Thread Eugenio Perez Martin
On Tue, Aug 29, 2023 at 7:55 AM Hawkins Jiawei wrote: > > Next patches in this series will no longer perform an > immediate poll and check of the device's used buffers > for each CVQ state load command. Consequently, there > will be multiple pending buffers in the shadow VirtQueue, > making it a m

[PULL 37/47] exec: Rename target specific page-vary.c -> page-vary-target.c

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé This matches the target agnostic 'page-vary-common.c' counterpart. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Message-Id: <20230914185718.76241-8-phi...@linaro.org> Signed-off-by: Richard Henderson --- MAINTAINERS | 2

[PULL 30/47] accel/tcg: move ld/st helpers to ldst_common.c.inc

2023-10-03 Thread Richard Henderson
From: Anton Johansson A large chunk of ld/st functions are moved from cputlb.c and user-exec.c to ldst_common.c.inc as their implementation is the same between both modes. Eventually, ldst_common.c.inc could be compiled into a separate target-specific compilation unit, and be linked in with the

[PULL 39/47] accel/tcg: Make monitor.c a target-agnostic unit

2023-10-03 Thread Richard Henderson
From: Philippe Mathieu-Daudé Move target-agnostic declarations from "internal-target.h" to a new "internal-common.h" header. monitor.c now don't include target specific headers and can be compiled once in system_ss[]. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Anton Johansson Message-I

[PULL 24/47] accel/tcg: Modify probe_access_internal() to use CPUState

2023-10-03 Thread Richard Henderson
From: Anton Johansson probe_access_internal() is changed to instead take the generic CPUState over CPUArchState, in order to lessen the target-specific coupling of cputlb.c. Note: probe_access*() also don't need the full CPUArchState, but aren't touched in this patch as they are target-facing. S

[PATCH 02/10] tcg: Provide guest_base fallback for system mode

2023-10-03 Thread Richard Henderson
Provide a define to allow !tcg_use_softmmu code paths to compile in system mode, but require elimination. Signed-off-by: Richard Henderson --- tcg/tcg.c | 4 1 file changed, 4 insertions(+) diff --git a/tcg/tcg.c b/tcg/tcg.c index e753387690..a841844eba 100644 --- a/tcg/tcg.c +++ b/tcg/tcg

[PATCH 00/10] tcg: Allow softmmu for user-only

2023-10-03 Thread Richard Henderson
Based-on: <20231003173052.1601813-1-richard.hender...@linaro.org> ("[PULL 00/47] tcg patch queue") Introduce a global variable that can be set at startup to select between softmmu and flat mapping. So far the accel/tcg side is not yet updated, so the new functionality is unused. r~ Richard He

[PATCH 09/10] tcg/riscv: Use tcg_use_softmmu

2023-10-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/riscv/tcg-target.c.inc | 189 +++-- 1 file changed, 97 insertions(+), 92 deletions(-) diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc index c2bcdea33f..12e3e50297 100644 --- a/tcg/riscv/tcg-target.c.inc

[PATCH 05/10] tcg/i386: Use tcg_use_softmmu

2023-10-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c.inc | 184 ++ 1 file changed, 89 insertions(+), 95 deletions(-) diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc index 4e47151241..139f657225 100644 --- a/tcg/i386/tcg-target.c.inc ++

[PATCH 07/10] tcg/mips: Use tcg_use_softmmu

2023-10-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/mips/tcg-target.c.inc | 231 +++--- 1 file changed, 113 insertions(+), 118 deletions(-) diff --git a/tcg/mips/tcg-target.c.inc b/tcg/mips/tcg-target.c.inc index f52bda4828..efbad150d0 100644 --- a/tcg/mips/tcg-target.c.inc

[PATCH 06/10] tcg/loongarch64: Use tcg_use_softmmu

2023-10-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/loongarch64/tcg-target.c.inc | 126 +++ 1 file changed, 61 insertions(+), 65 deletions(-) diff --git a/tcg/loongarch64/tcg-target.c.inc b/tcg/loongarch64/tcg-target.c.inc index 8f7091002b..dd3cab545b 100644 --- a/tcg/loongarch6

[PATCH 04/10] tcg/aarch64: Use tcg_use_softmmu

2023-10-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 177 +-- 1 file changed, 88 insertions(+), 89 deletions(-) diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc index 69f2daf2c2..6745f51476 100644 --- a/tcg/aarch64/tcg-target

[PATCH 08/10] tcg/ppc: Use tcg_use_softmmu

2023-10-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/ppc/tcg-target.c.inc | 284 --- 1 file changed, 143 insertions(+), 141 deletions(-) diff --git a/tcg/ppc/tcg-target.c.inc b/tcg/ppc/tcg-target.c.inc index 90d76c2c2c..e378233568 100644 --- a/tcg/ppc/tcg-target.c.inc +++

[PATCH 03/10] tcg/arm: Use tcg_use_softmmu

2023-10-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/arm/tcg-target.c.inc | 203 +++ 1 file changed, 97 insertions(+), 106 deletions(-) diff --git a/tcg/arm/tcg-target.c.inc b/tcg/arm/tcg-target.c.inc index a2f60106af..550a06a1b9 100644 --- a/tcg/arm/tcg-target.c.inc +++

[PATCH 10/10] tcg/s390x: Use tcg_use_softmmu

2023-10-03 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/s390x/tcg-target.c.inc | 161 ++--- 1 file changed, 79 insertions(+), 82 deletions(-) diff --git a/tcg/s390x/tcg-target.c.inc b/tcg/s390x/tcg-target.c.inc index 7552f63a05..c29bc52b3b 100644 --- a/tcg/s390x/tcg-target.c.inc

[PATCH 01/10] tcg: Introduce tcg_use_softmmu

2023-10-03 Thread Richard Henderson
Begin disconnecting CONFIG_SOFTMMU from !CONFIG_USER_ONLY. Introduce a variable which can be set at startup to select one method or another for user-only. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 8 ++-- tcg/tcg-op-ldst.c | 14 +++--- tcg/tcg.c | 9 ++---

Re: [PATCH v4 3/8] vhost: Expose vhost_svq_available_slots()

2023-10-03 Thread Eugenio Perez Martin
On Tue, Aug 29, 2023 at 7:55 AM Hawkins Jiawei wrote: > > Next patches in this series will delay the polling > and checking of buffers until either the SVQ is > full or control commands shadow buffers are full, > no longer perform an immediate poll and check of > the device's used buffers for each

Re: [PATCH v4 4/8] vdpa: Avoid using vhost_vdpa_net_load_*() outside vhost_vdpa_net_load()

2023-10-03 Thread Eugenio Perez Martin
On Tue, Aug 29, 2023 at 7:55 AM Hawkins Jiawei wrote: > > Next patches in this series will refactor vhost_vdpa_net_load_cmd() > to iterate through the control commands shadow buffers, allowing QEMU > to send CVQ state load commands in parallel at device startup. > > Considering that QEMU always fo

Re: [PATCH v4 0/8] vdpa: Send all CVQ state load commands in parallel

2023-10-03 Thread Eugenio Perez Martin
On Sun, Oct 1, 2023 at 9:56 PM Michael S. Tsirkin wrote: > > On Tue, Aug 29, 2023 at 01:54:42PM +0800, Hawkins Jiawei wrote: > > This patchset allows QEMU to delay polling and checking the device > > used buffer until either the SVQ is full or control commands shadow > > buffers are full, instead

[PATCH v17 06/16] accel/tcg: Collect TB execution statistics

2023-10-03 Thread Richard Henderson
From: "Vanderson M. do Rosario" Collect atomic and normal execution counts for TBs which have allocated a stats structure. Signed-off-by: Vanderson M. do Rosario Signed-off-by: Alex Bennée Signed-off-by: Fei Wu Signed-off-by: Richard Henderson --- accel/tcg/cpu-exec.c | 6 ++ accel/t

[PATCH v17 03/16] tcg: Record nb_deleted_ops in TCGContext

2023-10-03 Thread Richard Henderson
Record the number of ops that are removed during optimization. To be copied into TBStatistics when desired. Signed-off-by: Richard Henderson --- include/tcg/tcg.h | 1 + tcg/tcg.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/tcg/tcg.h b/include/tcg/tcg.h index e49574b7c

<    1   2   3   4   5   >