Re: [PATCH v2] block/snapshot: Fix compiler warning with -Wshadow=local

2023-11-06 Thread Cédric Le Goater
On 10/24/23 13:51, Thomas Huth wrote: On 24/10/2023 12.37, Markus Armbruster wrote: Markus Armbruster writes: Thomas Huth writes: No need to declare a new variable in the the inner code block here, we can re-use the "ret" variable that has been declared at the beginning of the function. Wi

Re: [PATCH v6 1/6] virtio: split into vhost-user-base and vhost-user-device

2023-11-06 Thread Michael S. Tsirkin
On Mon, Nov 06, 2023 at 07:15:10PM +, Alex Bennée wrote: > Lets keep a cleaner split between the base class and the derived > vhost-user-device which we can use for generic vhost-user stubs. This > includes an update to introduce the vq_size property so the number of > entries in a virtq can be

Re: [PATCH v6 1/6] virtio: split into vhost-user-base and vhost-user-device

2023-11-06 Thread Michael S. Tsirkin
On Mon, Nov 06, 2023 at 07:15:10PM +, Alex Bennée wrote: > Lets keep a cleaner split between the base class and the derived > vhost-user-device which we can use for generic vhost-user stubs. This > includes an update to introduce the vq_size property so the number of > entries in a virtq can be

Re: [PATCH v2 0/2] virtio-blk: add iothread-vq-mapping parameter

2023-11-06 Thread Stefan Hajnoczi
On Thu, Nov 02, 2023 at 03:10:52PM +0100, Kevin Wolf wrote: > Am 18.09.2023 um 18:16 hat Stefan Hajnoczi geschrieben: > > virtio-blk and virtio-scsi devices need a way to specify the mapping between > > IOThreads and virtqueues. At the moment all virtqueues are assigned to a > > single > > IOThrea

Re: [PULL 0/3] Block patches

2023-11-06 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL 0/7] xenfv-stable queue

2023-11-06 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v2 0/2] virtio-blk: add iothread-vq-mapping parameter

2023-11-06 Thread Stefan Hajnoczi
On Thu, Nov 02, 2023 at 03:10:52PM +0100, Kevin Wolf wrote: > Am 18.09.2023 um 18:16 hat Stefan Hajnoczi geschrieben: > > virtio-blk and virtio-scsi devices need a way to specify the mapping between > > IOThreads and virtqueues. At the moment all virtqueues are assigned to a > > single > > IOThrea

Re: [PULL 00/60] Misc HW/UI patches for 2023-11-06

2023-11-06 Thread Stefan Hajnoczi
> 10:04:12 +0800) > > are available in the Git repository at: > > https://github.com/philmd/qemu.git tags/misc-cpus-20231106 > > for you to fetch changes up to a81b438ac3933419910cbdf2e2e8d87681de611e: > > ui/sdl2: use correct key names in win title on mac (2023-11-06 11:07:32

Re: [PATCH v2 1/3] ide/pci.c: introduce pci_ide_update_mode() function

2023-11-06 Thread Mark Cave-Ayland
On 06/11/2023 14:12, Kevin Wolf wrote: Hi Kevin, Thanks for taking the time to review this. I'll reply inline below. Am 25.10.2023 um 00:40 hat Mark Cave-Ayland geschrieben: This function reads the value of the PCI_CLASS_PROG register for PCI IDE controllers and configures the PCI BARs and/or

Re: [PATCH v5 3/6] hw/virtio: derive vhost-user-gpio from vhost-user-base

2023-11-06 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Mon, Nov 06, 2023 at 05:30:39PM +, Alex Bennée wrote: >> "Michael S. Tsirkin" writes: >> >> > On Thu, Oct 19, 2023 at 10:56:07AM +0100, Alex Bennée wrote: >> >> Now the new base class supports config handling we can take advantage >> >> and make vhost-user-

[PATCH v6 1/6] virtio: split into vhost-user-base and vhost-user-device

2023-11-06 Thread Alex Bennée
Lets keep a cleaner split between the base class and the derived vhost-user-device which we can use for generic vhost-user stubs. This includes an update to introduce the vq_size property so the number of entries in a virtq can be defined. Signed-off-by: Alex Bennée Message-Id: <20231009095937.19

qemu-block@nongnu.org

2023-11-06 Thread Alex Bennée
A lot of our vhost-user stubs are large chunks of boilerplate that do (mostly) the same thing. This series continues the cleanups by splitting the vhost-user-base and vhost-user-generic implementations. After adding a new vq_size property the rng, gpio and i2c vhost-user devices become simple speci

[PATCH v6 4/6] hw/virtio: derive vhost-user-i2c from vhost-user-base

2023-11-06 Thread Alex Bennée
Now we can take advantage of the new base class and make vhost-user-i2c a much simpler boilerplate wrapper. Also as this doesn't require any target specific hacks we only need to build the stubs once. Message-Id: <20230418162140.373219-13-alex.ben...@linaro.org> Acked-by: Mark Cave-Ayland Acked-b

[PATCH v6 2/6] hw/virtio: derive vhost-user-rng from vhost-user-base

2023-11-06 Thread Alex Bennée
Now we can take advantage of our new base class and make vhost-user-rng a much simpler boilerplate wrapper. Also as this doesn't require any target specific hacks we only need to build the stubs once. Acked-by: Mark Cave-Ayland Signed-off-by: Alex Bennée Message-Id: <20231009095937.195728-3-alex

[PATCH v6 3/6] hw/virtio: derive vhost-user-gpio from vhost-user-base

2023-11-06 Thread Alex Bennée
Now the new base class supports config handling we can take advantage and make vhost-user-gpio a much simpler boilerplate wrapper. Also as this doesn't require any target specific hacks we only need to build the stubs once. Message-Id: <20230418162140.373219-12-alex.ben...@linaro.org> Acked-by: Ma

[PATCH v6 6/6] docs/system: add a basic enumeration of vhost-user devices

2023-11-06 Thread Alex Bennée
Make it clear the vhost-user-device is intended for expert use only. Signed-off-by: Alex Bennée Message-Id: <20231009095937.195728-7-alex.ben...@linaro.org> --- v5 - split vhost-user-device out of the table - sort the table alphabetically - add sound and scmi devices v6 - add note re vho

[PATCH v6 5/6] hw/virtio: add vhost-user-snd and virtio-snd-pci devices

2023-11-06 Thread Alex Bennée
From: Manos Pitsidianakis Tested with rust-vmm vhost-user-sound daemon: RUST_LOG=trace cargo run --bin vhost-user-sound -- --socket /tmp/snd.sock --backend null Invocation: qemu-system-x86_64 \ -qmp unix:./qmp-sock,server,wait=off \ -m 4096 \ -num

Re: [PATCH v5 3/6] hw/virtio: derive vhost-user-gpio from vhost-user-base

2023-11-06 Thread Michael S. Tsirkin
On Mon, Nov 06, 2023 at 05:30:39PM +, Alex Bennée wrote: > "Michael S. Tsirkin" writes: > > > On Thu, Oct 19, 2023 at 10:56:07AM +0100, Alex Bennée wrote: > >> Now the new base class supports config handling we can take advantage > >> and make vhost-user-gpio a much simpler boilerplate wrappe

Re: [PATCH v5 1/6] virtio: split into vhost-user-base and vhost-user-device

2023-11-06 Thread Michael S. Tsirkin
On Mon, Nov 06, 2023 at 05:40:10PM +, Alex Bennée wrote: > "Michael S. Tsirkin" writes: > > > On Thu, Oct 19, 2023 at 10:56:05AM +0100, Alex Bennée wrote: > >> Lets keep a cleaner split between the base class and the derived > >> vhost-user-device which we can use for generic vhost-user stubs

Re: [PATCH v3 0/6] migration: check required entries and sections are loaded

2023-11-06 Thread Michael S. Tsirkin
On Mon, Nov 06, 2023 at 03:35:54PM +0400, marcandre.lur...@redhat.com wrote: > From: Marc-André Lureau > > Hi, > > Surprisingly, the migration code doesn't check that required migration entries > and subsections are loaded. Either optional or required sections are both > ignored when missing. Ac

Re: [PATCH v5 1/6] virtio: split into vhost-user-base and vhost-user-device

2023-11-06 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Thu, Oct 19, 2023 at 10:56:05AM +0100, Alex Bennée wrote: >> Lets keep a cleaner split between the base class and the derived >> vhost-user-device which we can use for generic vhost-user stubs. This >> includes an update to introduce the vq_size property so the n

Re: [PATCH v5 3/6] hw/virtio: derive vhost-user-gpio from vhost-user-base

2023-11-06 Thread Alex Bennée
"Michael S. Tsirkin" writes: > On Thu, Oct 19, 2023 at 10:56:07AM +0100, Alex Bennée wrote: >> Now the new base class supports config handling we can take advantage >> and make vhost-user-gpio a much simpler boilerplate wrapper. Also as >> this doesn't require any target specific hacks we only ne

Re: [PATCH v5 1/6] virtio: split into vhost-user-base and vhost-user-device

2023-11-06 Thread Michael S. Tsirkin
On Thu, Oct 19, 2023 at 10:56:05AM +0100, Alex Bennée wrote: > Lets keep a cleaner split between the base class and the derived > vhost-user-device which we can use for generic vhost-user stubs. This > includes an update to introduce the vq_size property so the number of > entries in a virtq can be

Re: [PATCH v5 3/6] hw/virtio: derive vhost-user-gpio from vhost-user-base

2023-11-06 Thread Michael S. Tsirkin
On Thu, Oct 19, 2023 at 10:56:07AM +0100, Alex Bennée wrote: > Now the new base class supports config handling we can take advantage > and make vhost-user-gpio a much simpler boilerplate wrapper. Also as > this doesn't require any target specific hacks we only need to build > the stubs once. > > M

[PULL 0/3] Block patches

2023-11-06 Thread Hanna Czenczek
The following changes since commit 3e01f1147a16ca566694b97eafc941d62fa1e8d8: Merge tag 'pull-sp-20231105' of https://gitlab.com/rth7680/qemu into staging (2023-11-06 09:34:22 +0800) are available in the Git repository at: https://gitlab.com/hreitz/qemu.git tags/pull-block-2023-11-06 for yo

[PULL 2/3] block/file-posix: fix update_zones_wp() caller

2023-11-06 Thread Hanna Czenczek
From: Sam Li When the zoned request fail, it needs to update only the wp of the target zones for not disrupting the in-flight writes on these other zones. The wp is updated successfully after the request completes. Fixed the callers with right offset and nr_zones. Signed-off-by: Sam Li Message

[PULL 1/3] qcow2: keep reference on zeroize with discard-no-unref enabled

2023-11-06 Thread Hanna Czenczek
From: Jean-Louis Dupond When the discard-no-unref flag is enabled, we keep the reference for normal discard requests. But when a discard is executed on a snapshot/qcow2 image with backing, the discards are saved as zero clusters in the snapshot image. When committing the snapshot to the backing

[PULL 3/3] file-posix: fix over-writing of returning zone_append offset

2023-11-06 Thread Hanna Czenczek
From: Naohiro Aota raw_co_zone_append() sets "s->offset" where "BDRVRawState *s". This pointer is used later at raw_co_prw() to save the block address where the data is written. When multiple IOs are on-going at the same time, a later IO's raw_co_zone_append() call over-writes a former IO's offs

Re: [PATCH v2 3/3] hw/ide/via: implement legacy/native mode switching

2023-11-06 Thread BALATON Zoltan
On Mon, 6 Nov 2023, Kevin Wolf wrote: Am 25.10.2023 um 00:40 hat Mark Cave-Ayland geschrieben: Allow the VIA IDE controller to switch between both legacy and native modes by calling pci_ide_update_mode() to reconfigure the device whenever PCI_CLASS_PROG is updated. This patch moves the initial

Re: [PATCH v4 17/17] docs: update Xen-on-KVM documentation

2023-11-06 Thread Paul Durrant
On 06/11/2023 14:35, David Woodhouse wrote: From: David Woodhouse Add notes about console and network support, and how to launch PV guests. Clean up the disk configuration examples now that that's simpler, and remove the comment about IDE unplug on q35/AHCI now that it's fixed. Update the -ini

Re: [PATCH v4 16/17] doc/sphinx/hxtool.py: add optional label argument to SRST directive

2023-11-06 Thread Paul Durrant
On 06/11/2023 14:35, David Woodhouse wrote: From: David Woodhouse We can't just embed labels directly into files like qemu-options.hx which are included from multiple top-level RST files, because Sphinx sees the labels as duplicate: https://github.com/sphinx-doc/sphinx/issues/9707 So add an 'e

Re: [PATCH v4 13/17] hw/i386/pc: support '-nic' for xen-net-device

2023-11-06 Thread Paul Durrant
On 06/11/2023 14:35, David Woodhouse wrote: From: David Woodhouse The default NIC creation seems a bit hackish to me. I don't understand why each platform has to call pci_nic_init_nofail() from a point in the code where it actually has a pointer to the PCI bus, and then we have the special case

Re: [PATCH v4 06/17] hw/xen: automatically assign device index to block devices

2023-11-06 Thread Paul Durrant
On 06/11/2023 14:34, David Woodhouse wrote: From: David Woodhouse There's no need to force the user to assign a vdev. We can automatically assign one, starting at xvda and searching until we find the first disk name that's unused. This means we can now allow '-drive if=xen,file=xxx' to work wi

Re: [PATCH] file-posix: fix over-writing of returning zone_append offset

2023-11-06 Thread Hanna Czenczek
On 30.10.23 08:38, Naohiro Aota wrote: raw_co_zone_append() sets "s->offset" where "BDRVRawState *s". This pointer is used later at raw_co_prw() to save the block address where the data is written. When multiple IOs are on-going at the same time, a later IO's raw_co_zone_append() call over-write

Re: [PATCH v2 09/10] block: Convert qmp_query_block() to coroutine_fn

2023-11-06 Thread Hanna Czenczek
On 09.06.23 22:19, Fabiano Rosas wrote: This is another caller of bdrv_get_allocated_file_size() that needs to be converted to a coroutine because that function will be made asynchronous when called (indirectly) from the QMP dispatcher. This QMP command is a candidate because it calls bdrv_do_qu

Re: [PATCH v2 10/10] block: Add a thread-pool version of fstat

2023-11-06 Thread Hanna Czenczek
On 09.06.23 22:19, Fabiano Rosas wrote: From: João Silva The fstat call can take a long time to finish when running over NFS. Add a version of it that runs in the thread pool. Adapt one of its users, raw_co_get_allocated_file size to use the new version. That function is called via QMP under t

Re: [PATCH v2 05/10] block: Convert bdrv_query_block_graph_info to coroutine

2023-11-06 Thread Hanna Czenczek
On 09.06.23 22:19, Fabiano Rosas wrote: We're converting callers of bdrv_get_allocated_file_size() to run in coroutines because that function will be made asynchronous when called (indirectly) from the QMP dispatcher. This function is a candidate because it calls bdrv_do_query_node_info(), which

Re: [PATCH v2 04/10] block: Temporarily mark bdrv_co_get_allocated_file_size as mixed

2023-11-06 Thread Hanna Czenczek
On 09.06.23 22:19, Fabiano Rosas wrote: Some callers of this function are about to be converted to run in coroutines, so allow it to be executed both inside and outside a coroutine while we convert all the callers. This will be reverted once all callers of bdrv_do_query_node_info run in a corout

Re: [PATCH v2 03/10] block: Allow the wrapper script to see functions declared in qapi.h

2023-11-06 Thread Hanna Czenczek
On 09.06.23 22:19, Fabiano Rosas wrote: The following patches will add co_wrapper annotations to functions declared in qapi.h. Add that header to the set of files used by block-coroutine-wrapper.py. Signed-off-by: Fabiano Rosas --- block/meson.build | 1 + scripts/block-coro

Re: [PATCH v2 09/10] block: Convert qmp_query_block() to coroutine_fn

2023-11-06 Thread Hanna Czenczek
On 09.06.23 22:19, Fabiano Rosas wrote: This is another caller of bdrv_get_allocated_file_size() that needs to be converted to a coroutine because that function will be made asynchronous when called (indirectly) from the QMP dispatcher. This QMP command is a candidate because it calls bdrv_do_qu

[PATCH v4 15/17] xen-platform: unplug AHCI disks

2023-11-06 Thread David Woodhouse
From: David Woodhouse To support Xen guests using the Q35 chipset, the unplug protocol needs to also remove AHCI disks. Make pci_xen_ide_unplug() more generic, iterating over the children of the PCI device and destroying the "ide-hd" devices. That works the same for both AHCI and IDE, as does th

[PATCH v4 07/17] hw/xen: add get_frontend_path() method to XenDeviceClass

2023-11-06 Thread David Woodhouse
From: David Woodhouse The primary Xen console is special. The guest's side is set up for it by the toolstack automatically and not by the standard PV init sequence. Accordingly, its *frontend* doesn't appear in …/device/console/0 either; instead it appears under …/console in the guest's XenStore

Re: [PATCH v2 3/3] hw/ide/via: implement legacy/native mode switching

2023-11-06 Thread Kevin Wolf
Am 25.10.2023 um 00:40 hat Mark Cave-Ayland geschrieben: > Allow the VIA IDE controller to switch between both legacy and native modes by > calling pci_ide_update_mode() to reconfigure the device whenever > PCI_CLASS_PROG > is updated. > > This patch moves the initial setting of PCI_CLASS_PROG fr

[PATCH v4 17/17] docs: update Xen-on-KVM documentation

2023-11-06 Thread David Woodhouse
From: David Woodhouse Add notes about console and network support, and how to launch PV guests. Clean up the disk configuration examples now that that's simpler, and remove the comment about IDE unplug on q35/AHCI now that it's fixed. Update the -initrd option documentation to explain how to quo

[PATCH v4 08/17] hw/xen: do not repeatedly try to create a failing backend device

2023-11-06 Thread David Woodhouse
From: David Woodhouse If xen_backend_device_create() fails to instantiate a device, the XenBus code will just keep trying over and over again each time the bus is re-enumerated, as long as the backend appears online and in XenbusStateInitialising. The only thing which prevents the XenBus code fr

[PATCH v4 14/17] net: do not delete nics in net_cleanup()

2023-11-06 Thread David Woodhouse
From: David Woodhouse In net_cleanup() we only need to delete the netdevs, as those may have state which outlives Qemu when it exits, and thus may actually need to be cleaned up on exit. The nics, on the other hand, are owned by the device which created them. Most devices don't bother to clean u

[PATCH v4 16/17] doc/sphinx/hxtool.py: add optional label argument to SRST directive

2023-11-06 Thread David Woodhouse
From: David Woodhouse We can't just embed labels directly into files like qemu-options.hx which are included from multiple top-level RST files, because Sphinx sees the labels as duplicate: https://github.com/sphinx-doc/sphinx/issues/9707 So add an 'emitrefs' option to the Sphinx hxtool-doc direc

[PATCH v4 12/17] hw/xen: update Xen PV NIC to XenDevice model

2023-11-06 Thread David Woodhouse
From: David Woodhouse This allows us to use Xen PV networking with emulated Xen guests, and to add them on the command line or hotplug. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/net/meson.build| 2 +- hw/net/trace-events | 11 + hw/net/xen_nic.c

[PATCH v4 05/17] hw/xen: populate store frontend nodes with XenStore PFN/port

2023-11-06 Thread David Woodhouse
From: David Woodhouse This is kind of redundant since without being able to get these through some other method (HVMOP_get_param) the guest wouldn't be able to access XenStore in order to find them. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/kvm/xen_xenstore.c | 11 +

[PATCH v4 02/17] hw/xen: Clean up event channel 'type_val' handling to use union

2023-11-06 Thread David Woodhouse
From: David Woodhouse A previous implementation of this stuff used a 64-bit field for all of the port information (vcpu/type/type_val) and did atomic exchanges on them. When I implemented that in Qemu I regretted my life choices and just kept it simple with locking instead. So there's no need fo

[PATCH v4 11/17] hw/xen: only remove peers of PCI NICs on unplug

2023-11-06 Thread David Woodhouse
From: David Woodhouse When the Xen guest asks to unplug *emulated* NICs, it's kind of unhelpful also to unplug the peer of the *Xen* PV NIC. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/i386/xen/xen_platform.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-)

[PATCH v4 09/17] hw/xen: update Xen console to XenDevice model

2023-11-06 Thread David Woodhouse
From: David Woodhouse This allows (non-primary) console devices to be created on the command line and hotplugged. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- hw/char/trace-events| 8 + hw/char/xen_console.c | 532 +++- hw/xen/xe

[PATCH v4 13/17] hw/i386/pc: support '-nic' for xen-net-device

2023-11-06 Thread David Woodhouse
From: David Woodhouse The default NIC creation seems a bit hackish to me. I don't understand why each platform has to call pci_nic_init_nofail() from a point in the code where it actually has a pointer to the PCI bus, and then we have the special cases for things like ne2k_isa. If qmp_device_add

[PATCH v4 10/17] hw/xen: add support for Xen primary console in emulated mode

2023-11-06 Thread David Woodhouse
From: David Woodhouse The primary console is special because the toolstack maps a page into the guest for its ring, and also allocates the guest-side event channel. The guest's grant table is even primed to export that page using a known grant ref#. Add support for all that in emulated mode, so t

[PATCH v4 06/17] hw/xen: automatically assign device index to block devices

2023-11-06 Thread David Woodhouse
From: David Woodhouse There's no need to force the user to assign a vdev. We can automatically assign one, starting at xvda and searching until we find the first disk name that's unused. This means we can now allow '-drive if=xen,file=xxx' to work without an explicit separate -driver argument, j

[PATCH v4 04/17] i386/xen: advertise XEN_HVM_CPUID_UPCALL_VECTOR in CPUID

2023-11-06 Thread David Woodhouse
From: David Woodhouse This will allow Linux guests (since v6.0) to use the per-vCPU upcall vector delivered as MSI through the local APIC. Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/kvm/kvm.c | 4 1 file changed, 4 insertions(+) diff --git a/target/i386/kvm

[PATCH v4 01/17] i386/xen: Ignore VCPU_SSHOTTMR_future flag in set_singleshot_timer()

2023-11-06 Thread David Woodhouse
From: David Woodhouse Upstream Xen now ignores this flag¹, since the only guest kernel ever to use it was buggy. ¹ https://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=19c6cbd909 Signed-off-by: David Woodhouse Reviewed-by: Paul Durrant --- target/i386/kvm/xen-emu.c | 20 ++---

[PATCH v4 03/17] include: update Xen public headers to Xen 4.17.2 release

2023-11-06 Thread David Woodhouse
From: David Woodhouse ... in order to advertise the XEN_HVM_CPUID_UPCALL_VECTOR feature, which will come in a subsequent commit. Signed-off-by: David Woodhouse Acked-by: Paul Durrant --- hw/i386/kvm/xen_xenstore.c| 2 +- include/hw/xen/interface/arch-arm.h | 37

[PATCH v4 00/17] Get Xen PV shim running in QEMU, add net and console

2023-11-06 Thread David Woodhouse
The Xen PV shim requires a PV console; add that. Also update the Xen PV network support to the new XenDevice model so that it can be used with emulated Xen guests. Fix up the Xen block support to allow it to be used with '-device file=IMAGE,if=xen'. Update the documentation to reflect all of the

Re: [PATCH v2 1/3] ide/pci.c: introduce pci_ide_update_mode() function

2023-11-06 Thread Kevin Wolf
Am 25.10.2023 um 00:40 hat Mark Cave-Ayland geschrieben: > This function reads the value of the PCI_CLASS_PROG register for PCI IDE > controllers and configures the PCI BARs and/or IDE ioports accordingly. > > In the case where we switch to legacy mode, the PCI BARs are set to return > zero > (as

Re: [PULL 38/40] migration: Implement MigrateChannelList to qmp migration flow.

2023-11-06 Thread Juan Quintela
Peter Maydell wrote: > On Thu, 2 Nov 2023 at 11:46, Juan Quintela wrote: >> >> From: Het Gala >> >> Integrate MigrateChannelList with all transport backends >> (socket, exec and rdma) for both src and dest migration >> endpoints for qmp migration. >> >> For current series, limit the size of Migr

Re: [PULL 38/40] migration: Implement MigrateChannelList to qmp migration flow.

2023-11-06 Thread Peter Maydell
On Thu, 2 Nov 2023 at 11:46, Juan Quintela wrote: > > From: Het Gala > > Integrate MigrateChannelList with all transport backends > (socket, exec and rdma) for both src and dest migration > endpoints for qmp migration. > > For current series, limit the size of MigrateChannelList > to single eleme

Re: [PATCH v2 08/10] block: Don't query all block devices at hmp_nbd_server_start

2023-11-06 Thread Hanna Czenczek
On 09.06.23 22:19, Fabiano Rosas wrote: We're currently doing a full query-block just to enumerate the devices for qmp_nbd_server_add and then discarding the BlockInfoList afterwards. Alter hmp_nbd_server_start to instead iterate explicitly over the block_backends list. This allows the removal o

Re: [PATCH v2 06/10] block: Convert bdrv_block_device_info into co_wrapper

2023-11-06 Thread Hanna Czenczek
On 09.06.23 22:19, Fabiano Rosas wrote: We're converting callers of bdrv_get_allocated_file_size() to run in coroutines because that function will be made asynchronous when called (indirectly) from the QMP dispatcher. This function is a candidate because it calls bdrv_query_image_info() -> bdrv_

Re: [PATCH v2 07/10] block: Convert qmp_query_named_block_nodes to coroutine

2023-11-06 Thread Hanna Czenczek
On 09.06.23 22:19, Fabiano Rosas wrote: From: Lin Ma We're converting callers of bdrv_get_allocated_file_size() to run in coroutines because that function will be made asynchronous when called (indirectly) from the QMP dispatcher. This QMP command is a candidate because it indirectly calls bdr

[PATCH v3 2/6] virtio: make endian_needed() work during loading

2023-11-06 Thread marcandre . lureau
From: Marc-André Lureau There is no simple way to distinguish when the callback is used for load or save, AFAICT. Signed-off-by: Marc-André Lureau --- hw/virtio/virtio.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c index e5105

[PATCH v3 5/6] test-vmstate: add some subsection tests

2023-11-06 Thread marcandre . lureau
From: Marc-André Lureau Check subsection support, and optional handling. Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela --- tests/unit/test-vmstate.c | 116 ++ 1 file changed, 116 insertions(+) diff --git a/tests/unit/test-vmstate.c b/tests/un

[PATCH v3 6/6] docs/migration: reflect the changes about needed subsections

2023-11-06 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela --- docs/devel/migration.rst | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/docs/devel/migration.rst b/docs/devel/migration.rst index 240eb16d90..22875ac40c 100644 --- a/d

[PATCH v3 0/6] migration: check required entries and sections are loaded

2023-11-06 Thread marcandre . lureau
From: Marc-André Lureau Hi, Surprisingly, the migration code doesn't check that required migration entries and subsections are loaded. Either optional or required sections are both ignored when missing. According to the documentation a "newer QEMU that knows about a subsection can (with care) lo

[PULL 41/60] hw/loader: Clean up global variable shadowing in rom_add_file()

2023-11-06 Thread Philippe Mathieu-Daudé
Fix: hw/core/loader.c:1073:27: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] bool option_rom, MemoryRegion *mr, ^ include/sysemu/sysemu.h:57:22: note: previous declaration is here extern QEMUOptionRom option_r

[PATCH v3 3/6] migration: check required subsections are loaded, once

2023-11-06 Thread marcandre . lureau
From: Marc-André Lureau Check that required subsections have been loaded. Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela --- migration/vmstate.c | 40 ++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/migration/vmstate.c b/mig

[PULL 11/60] target/ppc: Remove CPU_RESOLVING_TYPE from 'cpu-qom.h'

2023-11-06 Thread Philippe Mathieu-Daudé
CPU_RESOLVING_TYPE is a per-target definition, and is irrelevant for other targets. Move it to "cpu.h". "target/ppc/cpu-qom.h" is supposed to be target agnostic (include-able by any target). Add such mention in the header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Mes

[PATCH v3 1/6] block/fdc: 'phase' is not needed on load

2023-11-06 Thread marcandre . lureau
From: Marc-André Lureau It is reconstructed during fdc_post_load() Signed-off-by: Marc-André Lureau --- hw/block/fdc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/hw/block/fdc.c b/hw/block/fdc.c index d7cc4d3ec1..fc71660ba0 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -1005

[PULL 57/60] MAINTAINERS: Add include/hw/timer/tmu012.h to the SH4 R2D section

2023-11-06 Thread Philippe Mathieu-Daudé
From: Thomas Huth tmu012.h is the header that belongs to hw/timer/sh_timer.c, so we should list it in the same section as sh_timer.c. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Yoshinori Sato Message-ID: <20231026080011.156325-1-th...@redhat.com> Signed-off-by

[PATCH v3 4/6] migration: check required entries are loaded, once

2023-11-06 Thread marcandre . lureau
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela --- migration/savevm.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/migration/savevm.c b/migration/savevm.c index bc98c2ea6f..2ae65b8088 100644 --- a/migratio

[PULL 60/60] ui/sdl2: use correct key names in win title on mac

2023-11-06 Thread Philippe Mathieu-Daudé
From: Adrian Wowk Previously, when using the SDL2 UI on MacOS, the title bar uses incorrect key names (such as Ctrl and Alt instead of the standard MacOS key symbols like ⌃ and ⌥). This commit changes sdl_update_caption in ui/sdl2.c to use the correct symbols when compiling for MacOS (CONFIG_DARW

[PULL 49/60] hw/i2c: pmbus add support for block receive

2023-11-06 Thread Philippe Mathieu-Daudé
From: Titus Rwantare PMBus devices can send and receive variable length data using the block read and write format, with the first byte in the payload denoting the length. This is mostly used for strings and on-device logs. Devices can respond to a block read with an empty string. Reviewed-by:

[PULL 40/60] hw/cpu: Clean up global variable shadowing

2023-11-06 Thread Philippe Mathieu-Daudé
Fix: hw/core/machine.c:1302:22: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] const CPUArchId *cpus = possible_cpus->cpus; ^ hw/core/numa.c:69:17: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] ui

[PULL 12/60] target/riscv: Remove CPU_RESOLVING_TYPE from 'cpu-qom.h'

2023-11-06 Thread Philippe Mathieu-Daudé
CPU_RESOLVING_TYPE is a per-target definition, and is irrelevant for other targets. Move it to "cpu.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: LIU Zhiwei Reviewed-by: Richard Henderson Message-Id: <20231013140116.255-6-phi...@linaro.org> --- target/riscv/cpu-qom.h | 1 - target/ris

[PULL 08/60] target: Unify QOM style

2023-11-06 Thread Philippe Mathieu-Daudé
Enforce the style described by commit 067109a11c ("docs/devel: mention the spacing requirement for QOM"): The first declaration of a storage or class structure should always be the parent and leave a visual space between that declaration and the new code. It is also useful to separate back

[PULL 09/60] target: Mention 'cpu-qom.h' is target agnostic

2023-11-06 Thread Philippe Mathieu-Daudé
"target/foo/cpu-qom.h" is supposed to be target agnostic (include-able by any target). Add such mention in the header. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20231013140116.255-3-phi...@linaro.org> --- target/arm/cpu-qom.h| 2 +- target/hppa/cp

[PULL 31/60] target/mips: Fix TX79 LQ/SQ opcodes

2023-11-06 Thread Philippe Mathieu-Daudé
The base register address offset is *signed*. Cc: qemu-sta...@nongnu.org Fixes: 82a9f9 ("target/mips/tx79: Introduce LQ opcode (Load Quadword)") Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230914090447.12557-1-phi...@linaro.org> --- target/mips/tcg/tx

[PULL 51/60] hw/i2c: pmbus: add fan support

2023-11-06 Thread Philippe Mathieu-Daudé
From: Titus Rwantare PMBus devices may integrate fans whose operation is configurable over PMBus. This commit allows the driver to read and write the fan control registers but does not model the operation of fans. Reviewed-by: Stephen Longfield Acked-by: Corey Minyard Signed-off-by: Titus Rwan

[PULL 58/60] MAINTAINERS: Add the CAN documentation file to the CAN section

2023-11-06 Thread Philippe Mathieu-Daudé
From: Thomas Huth Add can.rst to the corresponding section in MAINTAINERS, so that the maintainers get CC:-ed on corresponding patches. Signed-off-by: Thomas Huth Reviewed-by: Vikram Garhwal Reviewed-by: Philippe Mathieu-Daudé Acked-by: Pavel Pisa Message-ID: <20231027060931.242491-1-th...@r

[PULL 55/60] hw/i2c: pmbus: immediately clear faults on request

2023-11-06 Thread Philippe Mathieu-Daudé
From: Titus Rwantare The probing process of the generic pmbus driver generates faults to determine if functions are available. These faults were not always cleared resulting in probe failures. Reviewed-by: Patrick Venture Signed-off-by: Titus Rwantare Message-ID: <20231023-staging-pmbus-v3-v4-

[PULL 35/60] target/ppc: Prohibit target specific KVM prototypes on user emulation

2023-11-06 Thread Philippe Mathieu-Daudé
None of these target-specific prototypes should be used by user emulation. Remove their declaration there, so we get a compile failure if ever used (instead of having to deal with linker and its possible optimizations, such dead code removal). Suggested-by: Kevin Wolf Signed-off-by: Philippe Math

[PULL 36/60] target/nios2: Create IRQs *after* accelerator vCPU is realized

2023-11-06 Thread Philippe Mathieu-Daudé
Architecture specific hardware doesn't have a particular dependency on the accelerator vCPU (created with cpu_exec_realizefn), and can be initialized *after* the vCPU is realized. Doing so allows further generic API simplification (in few commits). Signed-off-by: Philippe Mathieu-Daudé Reviewed-b

[PULL 33/60] hw/ppc/e500: Restrict ppce500_init_mpic_kvm() to KVM

2023-11-06 Thread Philippe Mathieu-Daudé
Inline and guard the single call to kvm_openpic_connect_vcpu() allows to remove kvm-stub.c. Reviewed-by: Michael Tokarev Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20231003070427.69621-3-phi...@linaro.org> --- hw/ppc/e500.c | 4 target/ppc/kvm-stub.c | 19 ---

[PULL 42/60] hw/isa/i82378: Propagate error if PC_SPEAKER device creation failed

2023-11-06 Thread Philippe Mathieu-Daudé
In commit 40f8214fcd ("hw/audio/pcspk: Inline pcspk_init()") we neglected to give a change to the caller to handle failed device creation cleanly. Respect the caller API contract and propagate the error if creating the PC_SPEAKER device ever failed. This avoid yet another bad API use to be taken as

[PULL 37/60] target/alpha: Tidy up alpha_cpu_class_by_name()

2023-11-06 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Gavin Shan Message-Id: <20230908112235.75914-2-phi...@linaro.org> --- target/alpha/cpu.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c index 51b

[PULL 18/60] target/riscv: Move TYPE_RISCV_CPU_BASE definition to 'cpu.h'

2023-11-06 Thread Philippe Mathieu-Daudé
TYPE_RISCV_CPU_BASE depends on the TARGET_RISCV32/TARGET_RISCV64 definitions which are target specific. Such target specific definition taints "cpu-qom.h". Since "cpu-qom.h" must be target agnostic, remove its target specific definition uses by moving TYPE_RISCV_CPU_BASE to "target/riscv/cpu.h".

[PULL 48/60] tests/qtest: ahci-test: add test exposing reset issue with pending callback

2023-11-06 Thread Philippe Mathieu-Daudé
From: Fiona Ebner Before commit "hw/ide: reset: cancel async DMA operation before resetting state", this test would fail, because a reset with a pending write operation would lead to an unsolicited write to the first sector of the disk. The test writes a pattern to the beginning of the disk and

[PULL 39/60] exec/cpu: Have cpu_exec_realize() return a boolean

2023-11-06 Thread Philippe Mathieu-Daudé
Following the example documented since commit e3fe3988d7 ("error: Document Error API usage rules"), have cpu_exec_realizefn() return a boolean indicating whether an error is set or not. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230918160257.30127-22-phi.

[PULL 19/60] target/ppc: Use env_archcpu() in helper_book3s_msgsndp()

2023-11-06 Thread Philippe Mathieu-Daudé
When CPUArchState* is available (here CPUPPCState*), we can use the fast env_archcpu() macro to get ArchCPU* (here PowerPCCPU*). The QOM cast POWERPC_CPU() macro will be slower when building with --enable-qom-cast-debug. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Daniel Henrique Barboza

[PULL 53/60] hw/sensor: add ADM1266 device model

2023-11-06 Thread Philippe Mathieu-Daudé
From: Titus Rwantare The ADM1266 is a cascadable super sequencer with margin control and fault recording. This commit adds basic support for its PMBus commands and models the identification registers that can be modified in a firmware update. Reviewed-by: Hao Wu Acked-by: Corey Minyard Signed-

[PULL 46/60] hw/cpu: Update the comments of nr_cores and nr_dies

2023-11-06 Thread Philippe Mathieu-Daudé
From: Zhao Liu In the nr_threads' comment, specify it represents the number of threads in the "core" to avoid confusion. Also add comment for nr_dies in CPUX86State. Signed-off-by: Zhao Liu Reviewed-by: Philippe Mathieu-Daudé Tested-by: Babu Moger Tested-by: Yongwei Ma Acked-by: Michael S.

[PULL 54/60] tests/qtest: add tests for ADM1266

2023-11-06 Thread Philippe Mathieu-Daudé
From: Titus Rwantare The ADM1266 can have string fields written by the driver, so it's worth specifically testing. Reviewed-by: Hao Wu Acked-by: Corey Minyard Signed-off-by: Titus Rwantare [PMD: Cover file in MAINTAINERS] Message-ID: <20231023-staging-pmbus-v3-v4-6-07a8cb7cd...@google.com> Si

[PULL 22/60] target/xtensa: Use env_archcpu() in update_c[compare|count]()

2023-11-06 Thread Philippe Mathieu-Daudé
When CPUArchState* is available (here CPUXtensaState*), we can use the fast env_archcpu() macro to get ArchCPU* (here XtensaCPU*). The QOM cast XTENSA_CPU() macro will be slower when building with --enable-qom-cast-debug. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked

[PULL 47/60] hw/ide: reset: cancel async DMA operation before resetting state

2023-11-06 Thread Philippe Mathieu-Daudé
From: Fiona Ebner If there is a pending DMA operation during ide_bus_reset(), the fact that the IDEState is already reset before the operation is canceled can be problematic. In particular, ide_dma_cb() might be called and then use the reset IDEState which contains the signature after the reset.

[PULL 10/60] target/arm: Move internal declarations from 'cpu-qom.h' to 'cpu.h'

2023-11-06 Thread Philippe Mathieu-Daudé
These definitions and declarations are only used by target/arm/, no need to expose them to generic hw/. Reviewed-by: Richard Henderson Message-Id: <20231013140116.255-4-phi...@linaro.org> Signed-off-by: Philippe Mathieu-Daudé Message-Id: --- target/arm/cpu-qom.h | 28

  1   2   >