Re: [PATCH] hw/isa/vt82c686: Respect SCI interrupt assignment

2023-10-04 Thread BALATON Zoltan
On Wed, 4 Oct 2023, Bernhard Beschow wrote: Am 4. Oktober 2023 12:08:02 UTC schrieb BALATON Zoltan : On Tue, 3 Oct 2023, Bernhard Beschow wrote: According to the datasheet, SCI interrupts of the power management function aren't triggered through the PCI pins but rather directly to the

Re: [PATCH v2 09/53] migration/rdma: Fix qemu_rdma_accept() to return failure on errors

2023-10-04 Thread Juan Quintela
Markus Armbruster wrote: > qemu_rdma_accept() returns 0 in some cases even when it didn't > complete its job due to errors. Impact is not obvious. I figure the > caller will soon fail again with a misleading error message. > > Fix it to return -1 on any failure. > > Signed-off-by: Markus

Re: [PATCH v2 08/53] migration/rdma: Give qio_channel_rdma_source_funcs internal linkage

2023-10-04 Thread Juan Quintela
Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > Reviewed-by: Fabiano Rosas > Reviewed-by: Li Zhijian Reviewed-by: Juan Quintela

Re: [PATCH v2 07/53] migration/rdma: Clean up two more harmless signed vs. unsigned issues

2023-10-04 Thread Juan Quintela
Markus Armbruster wrote: > qemu_rdma_exchange_get_response() compares int parameter @expecting > with uint32_t head->type. Actual arguments are non-negative > enumeration constants, RDMAControlHeader uint32_t member type, or > qemu_rdma_exchange_recv() int parameter expecting. Actual arguments

Re: [PATCH v11 02/10] migration: convert migration 'uri' into 'MigrateAddress'

2023-10-04 Thread Fabiano Rosas
Het Gala writes: > This patch parses 'migrate' and 'migrate-incoming' QAPI's 'uri' > string containing migration connection related information > and stores them inside well defined 'MigrateAddress' struct. > > Suggested-by: Aravind Retnakaran > Signed-off-by: Het Gala > Reviewed-by: Daniel P.

Re: [PATCH v2 06/53] migration/rdma: Fix unwanted integer truncation

2023-10-04 Thread Juan Quintela
Markus Armbruster wrote: > qio_channel_rdma_readv() assigns the size_t value of qemu_rdma_fill() > to an int variable before it adds it to @done / subtracts it from > @want, both size_t. Truncation when qemu_rdma_fill() copies more than > INT_MAX bytes. Seems vanishingly unlikely, but needs

Re: [PATCH v2 05/53] migration/rdma: Consistently use uint64_t for work request IDs

2023-10-04 Thread Juan Quintela
Markus Armbruster wrote: > We use int instead of uint64_t in a few places. Change them to > uint64_t. > > This cleans up a comparison of signed qemu_rdma_block_for_wrid() > parameter @wrid_requested with unsigned @wr_id. Harmless, because the > actual arguments are non-negative enumeration

Re: [PATCH v2 04/53] migration/rdma: Drop fragile wr_id formatting

2023-10-04 Thread Juan Quintela
Markus Armbruster wrote: > wrid_desc[] uses 4001 pointers to map four integer values to strings. > > print_wrid() accesses wrid_desc[] out of bounds when passed a negative > argument. It returns null for values 2..1999 and 2001..3999. > > qemu_rdma_poll() and qemu_rdma_block_for_wrid() print

Re: [PATCH v2 03/53] migration/rdma: Clean up rdma_delete_block()'s return type

2023-10-04 Thread Juan Quintela
Markus Armbruster wrote: > rdma_delete_block() always returns 0, which its only caller ignores. > Return void instead. > > Signed-off-by: Markus Armbruster > Reviewed-by: Fabiano Rosas > Reviewed-by: Li Zhijian Reviewed-by: Juan Quintela

Re: [PATCH v2 02/53] migration/rdma: Clean up qemu_rdma_data_init()'s return type

2023-10-04 Thread Juan Quintela
Markus Armbruster wrote: > qemu_rdma_data_init() return type is void *. It actually returns > RDMAContext *, and all its callers assign the value to an > RDMAContext *. Unclean. > > Return RDMAContext * instead. > > Signed-off-by: Markus Armbruster > Reviewed-by: Fabiano Rosas > Reviewed-by:

[PATCH v3 2/3] hw/arm: xlnx-versal-virt: Add AMD/Xilinx TRNG device

2023-10-04 Thread Tong Ho
Connect the support for Versal True Random Number Generator (TRNG) device. Warning: unlike the TRNG component in a real device from the Versal device familiy, the connected TRNG model is not of cryptographic grade and is not intended for use cases when cryptograpically strong TRNG is needed.

[PATCH v3 3/3] tests/qtest: Introduce tests for AMD/Xilinx Versal TRNG device

2023-10-04 Thread Tong Ho
Signed-off-by: Tong Ho --- tests/qtest/meson.build | 2 +- tests/qtest/xlnx-versal-trng-test.c | 490 2 files changed, 491 insertions(+), 1 deletion(-) create mode 100644 tests/qtest/xlnx-versal-trng-test.c diff --git a/tests/qtest/meson.build

[PATCH v3 0/3] AMD/Xilinx Versal TRNG support

2023-10-04 Thread Tong Ho
This series adds support for the True Random Number Generator (TRNG) in the AMD/Xilinx Versal family of devices. The series starts by introducing a non-cryptographic grade model of the TRNG controller in the Versal family of devices, followed by instantiating the model in Xilinx Versal machine.

[PATCH v3 1/3] hw/misc: Introduce AMD/Xilix Versal TRNG device

2023-10-04 Thread Tong Ho
This adds a non-cryptographic grade implementation of the model for the True Random Number Generator (TRNG) component in AMD/Xilinx Versal device family. This implements all 3 modes defined by the actual hardware specs, all of which selectable by guest software at will at anytime: 1) PRNG mode,

Re: [PATCH v2 01/53] migration/rdma: Clean up qemu_rdma_poll()'s return type

2023-10-04 Thread Juan Quintela
Markus Armbruster wrote: > qemu_rdma_poll()'s return type is uint64_t, even though it returns 0, > -1, or @ret, which is int. Its callers assign the return value to int > variables, then check whether it's negative. Unclean. > > Return int instead. > > Signed-off-by: Markus Armbruster >

Re: [PULL 09/11] migration: file URI

2023-10-04 Thread Juan Quintela
Fabiano Rosas wrote: > Juan Quintela writes: > >> Fabiano Rosas wrote: >>> Juan Quintela writes: >>> From: Steve Sistare Extend the migration URI to support file:. This can be used for any migration scenario that does not require a reverse path. It can be used as an

Re: [PATCH v5 0/6] migration: Test the new "file:" migration

2023-10-04 Thread Juan Quintela
Fabiano Rosas wrote: > Based-on: > [PATCH V4 0/2] migration file URI > https://lore.kernel.org/r/1688135108-316997-1-git-send-email-steven.sist...@oracle.com Full series are integrated for next PULL request. Thanks, Juan. > > Since v4: > > - Implemented a separate version of

Re: [PATCH v5 4/6] migration: Set migration status early in incoming side

2023-10-04 Thread Juan Quintela
Fabiano Rosas wrote: > We are sending a migration event of MIGRATION_STATUS_SETUP at > qemu_start_incoming_migration but never actually setting the state. > > This creates a window between qmp_migrate_incoming and > process_incoming_migration_co where the migration status is still >

Re: [PATCH v5 2/6] tests/qtest: migration: Add migrate_incoming_qmp helper

2023-10-04 Thread Juan Quintela
Fabiano Rosas wrote: > file-based migration requires the target to initiate its migration after > the source has finished writing out the data in the file. Currently > there's no easy way to initiate 'migrate-incoming', allow this by > introducing migrate_incoming_qmp helper, similarly to

Re: [PATCH 00/13] misc: Rename 'softmmu' -> 'system'

2023-10-04 Thread Philippe Mathieu-Daudé
On 4/10/23 15:49, Paolo Bonzini wrote: On Wed, Oct 4, 2023 at 3:41 PM Claudio Fontana wrote: On 10/4/23 14:37, Thomas Huth wrote: On 04/10/2023 14.33, Daniel P. Berrangé wrote: Am I mis-understanding what you mean by 'finishes' here, as I see many references to softmmu remaining In

Re: [PULL 09/11] migration: file URI

2023-10-04 Thread Fabiano Rosas
Juan Quintela writes: > Fabiano Rosas wrote: >> Juan Quintela writes: >> >>> From: Steve Sistare >>> >>> Extend the migration URI to support file:. This can be used for >>> any migration scenario that does not require a reverse path. It can be >>> used as an alternative to 'exec:cat > file'

Re: [PATCH] hw/rdma: Deprecate the pvrdma device and the rdma subsystem

2023-10-04 Thread Juan Quintela
Thomas Huth wrote: > This subsystem is said to be in a bad shape (see e.g. [1], [2] > and [3]), and nobody seems to feel responsible to pick up patches > for this and send them via a pull request. For example there is > a patch for a CVE-worthy bug posted more than half a year ago [4] > which has

Re: [PATCH v11 00/10] migration: Modify 'migrate' and 'migrate-incoming' QAPI commands for migration

2023-10-04 Thread Fabiano Rosas
Het Gala writes: > On 04/10/23 7:03 pm, Fabiano Rosas wrote: >> Het Gala writes: >> >>> This is v11 patchset of modified 'migrate' and 'migrate-incoming' QAPI >>> design >>> for upstream review. >>> >>> Update: Daniel has reviewed all patches and is okay with them. Markus has >>> also >>>

Re: [PATCH] dump: Silence compiler warning in dump code when compiling with -Wshadow

2023-10-04 Thread Philippe Mathieu-Daudé
On 4/10/23 15:13, Thomas Huth wrote: Rename a variable to make this code compilable with -Wshadow. Signed-off-by: Thomas Huth --- dump/dump.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v3 2/4] tests/migration-test: Add a test for null parameter setups

2023-10-04 Thread Juan Quintela
Peter Xu wrote: > Add a test for StrOrNull parameters (tls-*). > > Reviewed-by: Fabiano Rosas > Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Peter Xu Reviewed-by: Juan Quintela queued

Re: [PATCH v3 1/4] migration/qmp: Fix crash on setting tls-authz with null

2023-10-04 Thread Juan Quintela
Peter Xu wrote: > QEMU will crash if anyone tries to set tls-authz (which is a type > StrOrNull) with 'null' value. Fix it in the easy way by converting it to > qstring just like the other two tls parameters. > > Cc: qemu-sta...@nongnu.org # v4.0+ > Fixes: d2f1d29b95 ("migration: add support for

[PATCH] block-jobs: add final flush

2023-10-04 Thread Vladimir Sementsov-Ogievskiy
From: Vladimir Sementsov-Ogievskiy Actually block job is not completed without the final flush. It's rather unexpected to have broken target when job was successfully completed long ago and now we fail to flush or process just crashed/killed. Mirror job already has mirror_flush() for this. So,

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

2023-10-04 Thread Eric Auger
Hi Cédric, On 10/3/23 17:56, Cédric Le Goater wrote: > 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

[PULL 1/1] osdep: set _FORTIFY_SOURCE=2 when optimization is enabled

2023-10-04 Thread Stefan Hajnoczi
From: Daniel P. Berrangé 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 override this by setting CFLAGS="-O0" or

[PULL 0/1] Block patches

2023-10-04 Thread Stefan Hajnoczi
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/stefanha/qemu.git tags/block-pull-request for you to

Re: [PATCH 00/13] misc: Rename 'softmmu' -> 'system'

2023-10-04 Thread Daniel P . Berrangé
On Wed, Oct 04, 2023 at 03:49:31PM +0200, Paolo Bonzini wrote: > On Wed, Oct 4, 2023 at 3:41 PM Claudio Fontana wrote: > > > > On 10/4/23 14:37, Thomas Huth wrote: > > > On 04/10/2023 14.33, Daniel P. Berrangé wrote: > > >> Am I mis-understanding what you mean by 'finishes' here, as > > >> I see

Re: [PATCH v2 52/53] migration/rdma: Use error_report() & friends instead of stderr

2023-10-04 Thread Fabiano Rosas
Markus Armbruster writes: > Fabiano Rosas writes: > >> Markus Armbruster writes: >> >>> error_report() obeys -msg, reports the current error location if any, >>> and reports to the current monitor if any. Reporting to stderr >>> directly with fprintf() or perror() is wrong, because it loses

Re: [PATCH 00/13] misc: Rename 'softmmu' -> 'system'

2023-10-04 Thread Paolo Bonzini
On Wed, Oct 4, 2023 at 3:41 PM Claudio Fontana wrote: > > On 10/4/23 14:37, Thomas Huth wrote: > > On 04/10/2023 14.33, Daniel P. Berrangé wrote: > >> Am I mis-understanding what you mean by 'finishes' here, as > >> I see many references to softmmu remaining > >> In particular under configs/ > >>

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

2023-10-04 Thread Eric Auger
Hi Matthew, On 10/4/23 15:41, Matthew Rosato wrote: > On 10/4/23 5:58 AM, Eric Auger wrote: >> Hi Cédric, >> >> On 10/3/23 17:25, Cédric Le Goater wrote: >>> 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

Re: [PATCH v3 15/16] sysemu/tpm: Clean up global variable shadowing

2023-10-04 Thread Stefan Berger
On 10/4/23 08:00, Philippe Mathieu-Daudé wrote: Fix: softmmu/tpm.c:178:59: error: declaration shadows a variable in the global scope [-Werror,-Wshadow] int tpm_config_parse(QemuOptsList *opts_list, const char *optarg) ^

Re: [PULL 09/11] migration: file URI

2023-10-04 Thread Juan Quintela
Fabiano Rosas wrote: > Juan Quintela writes: > >> From: Steve Sistare >> >> Extend the migration URI to support file:. This can be used for >> any migration scenario that does not require a reverse path. It can be >> used as an alternative to 'exec:cat > file' in minimized containers that >>

Re: [PATCH v11 00/10] migration: Modify 'migrate' and 'migrate-incoming' QAPI commands for migration

2023-10-04 Thread Het Gala
On 04/10/23 7:03 pm, Fabiano Rosas wrote: Het Gala writes: This is v11 patchset of modified 'migrate' and 'migrate-incoming' QAPI design for upstream review. Update: Daniel has reviewed all patches and is okay with them. Markus has also given Acked-by tag for patches related to

Re: [PULL 09/11] migration: file URI

2023-10-04 Thread Fabiano Rosas
Juan Quintela writes: > From: Steve Sistare > > Extend the migration URI to support file:. This can be used for > any migration scenario that does not require a reverse path. It can be > used as an alternative to 'exec:cat > file' in minimized containers that > do not contain /bin/sh, and it

Re: [PATCH 00/13] misc: Rename 'softmmu' -> 'system'

2023-10-04 Thread Claudio Fontana
On 10/4/23 14:37, Thomas Huth wrote: > On 04/10/2023 14.33, Daniel P. Berrangé wrote: >> On Wed, Oct 04, 2023 at 11:06:15AM +0200, Philippe Mathieu-Daudé wrote: >>> This series finishes the cleanup which remove the confusion >>> of using 'softmmu' when we really mean 'system emulation', >>> as

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

2023-10-04 Thread Matthew Rosato
On 10/4/23 5:58 AM, Eric Auger wrote: > Hi Cédric, > > On 10/3/23 17:25, Cédric Le Goater wrote: >> 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

Re: [PATCH v5 2/2] migration: Update error description outside migration.c

2023-10-04 Thread Juan Quintela
Juan Quintela wrote: > Tejus GK wrote: >> On 04/10/23 1:53 pm, Juan Quintela wrote: >>> Tejus GK wrote: On 03/10/23 6:14 pm, Juan Quintela wrote: > Ouch, that again. > > I think that I know how to fix that. > > Will take a look. > > Later, Juan. I first only saw that you were missing

Re: [PATCH] hw/isa/vt82c686: Respect SCI interrupt assignment

2023-10-04 Thread Bernhard Beschow
Am 4. Oktober 2023 12:08:02 UTC schrieb BALATON Zoltan : >On Tue, 3 Oct 2023, Bernhard Beschow wrote: >> According to the datasheet, SCI interrupts of the power management function >> aren't triggered through the PCI pins but rather directly to the integrated >> PIC. >> The routing is

Re: [PATCH v11 00/10] migration: Modify 'migrate' and 'migrate-incoming' QAPI commands for migration

2023-10-04 Thread Fabiano Rosas
Het Gala writes: > This is v11 patchset of modified 'migrate' and 'migrate-incoming' QAPI design > for upstream review. > > Update: Daniel has reviewed all patches and is okay with them. Markus has also > given Acked-by tag for patches related to QAPI syntax change. > Fabiano, Juan and

Re: [PATCH v3 1/7] vhost-user: strip superfluous whitespace

2023-10-04 Thread Laszlo Ersek
On 10/4/23 14:54, Michael S. Tsirkin wrote: > On Wed, Oct 04, 2023 at 12:08:52PM +0200, Laszlo Ersek wrote: >> On 10/4/23 11:06, Michael S. Tsirkin wrote: >>> On Mon, Oct 02, 2023 at 10:32:15PM +0200, Laszlo Ersek wrote: Cc: "Michael S. Tsirkin" (supporter:vhost) >>> >>> why the

Re: [PULL 30/63] vhost-user: call VHOST_USER_SET_VRING_ENABLE synchronously

2023-10-04 Thread Laszlo Ersek
On 10/4/23 14:53, Michael S. Tsirkin wrote: > On Wed, Oct 04, 2023 at 12:11:44PM +0200, Laszlo Ersek wrote: >> On 10/4/23 10:44, Michael S. Tsirkin wrote: >>> From: Laszlo Ersek >>> >>> (1) The virtio-1.2 specification >>> writes:

Re: [PATCH 00/13] misc: Rename 'softmmu' -> 'system'

2023-10-04 Thread Thomas Huth
On 04/10/2023 15.20, Paolo Bonzini wrote: Queued, thanks. Ok, but could you please wait with a pull request for a day or two to see whether we could agree on a better wording first: https://lore.kernel.org/qemu-devel/85be2979-c0ca-3eb4-dae9-bbabf256c...@redhat.com/ ? Thomas

Re: [PATCH 00/13] misc: Rename 'softmmu' -> 'system'

2023-10-04 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] target/i386: Check for USER_ONLY definition instead of SOFTMMU one

2023-10-04 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] util/log: re-allow switching away from stderr log file

2023-10-04 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH v2 0/2] sysemu/accel: Simplify sysemu/hvf.h

2023-10-04 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: Wshadow: Better name for 'optarg'?

2023-10-04 Thread Warner Losh
On Wed, Oct 4, 2023, 4:16 AM Daniel P. Berrangé wrote: > On Wed, Oct 04, 2023 at 12:05:04PM +0200, Philippe Mathieu-Daudé wrote: > > Hi, > > > > I'm getting a bunch of errors for 'optarg' declared in : > > > > NAME > > getopt – get option character from command line argument list > > > >

[PATCH] dump: Silence compiler warning in dump code when compiling with -Wshadow

2023-10-04 Thread Thomas Huth
Rename a variable to make this code compilable with -Wshadow. Signed-off-by: Thomas Huth --- dump/dump.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dump/dump.c b/dump/dump.c index d4ef713cd0..d3578ddc62 100644 --- a/dump/dump.c +++ b/dump/dump.c @@ -1872,20

[PATCH v2] hw/usb: Silence compiler warnings in USB code when compiling with -Wshadow

2023-10-04 Thread Thomas Huth
Rename variables or remove nested definitions where it makes sense, so that we can finally compile the USB code with "-Wshadow", too. Signed-off-by: Thomas Huth --- v2: Fix the warning in host-libusb.c, too hw/usb/desc.c| 2 +- hw/usb/dev-hub.c | 8 hw/usb/dev-storage.c

Re: [PATCH] hw/usb: Silence compiler warnings in USB code when compiling with -Wshadow

2023-10-04 Thread Thomas Huth
On 04/10/2023 13.44, Markus Armbruster wrote: I got one more: ../hw/usb/host-libusb.c: In function ‘usb_host_open’: ../hw/usb/host-libusb.c:1013:13: warning: declaration of ‘rc’ shadows a previous local [-Wshadow=compatible-local] 1013 | int rc = ioctl(hostfd, USBDEVFS_GET_SPEED,

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

2023-10-04 Thread Eric Auger
Hi Cédric, On 10/3/23 17:59, Cédric Le Goater wrote: > 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 >>

[PATCH v4 3/8] vhost-user.rst: Clarify enabling/disabling vrings

2023-10-04 Thread Hanna Czenczek
Currently, the vhost-user documentation says that rings are to be initialized in a disabled state when VHOST_USER_F_PROTOCOL_FEATURES is negotiated. However, by the time of feature negotiation, all rings have already been initialized, so it is not entirely clear what this means. At least the

[PATCH v4 6/8] vhost-user: Interface for migration state transfer

2023-10-04 Thread Hanna Czenczek
Add the interface for transferring the back-end's state during migration as defined previously in vhost-user.rst. Reviewed-by: Stefan Hajnoczi Signed-off-by: Hanna Czenczek --- include/hw/virtio/vhost-backend.h | 24 + include/hw/virtio/vhost.h | 78

[PATCH v4 7/8] vhost: Add high-level state save/load functions

2023-10-04 Thread Hanna Czenczek
vhost_save_backend_state() and vhost_load_backend_state() can be used by vhost front-ends to easily save and load the back-end's state to/from the migration stream. Because we do not know the full state size ahead of time, vhost_save_backend_state() simply reads the data in 1 MB chunks, and

[PATCH v4 5/8] vhost-user.rst: Migrating back-end-internal state

2023-10-04 Thread Hanna Czenczek
For vhost-user devices, qemu can migrate the virtio state, but not the back-end's internal state. To do so, we need to be able to transfer this internal state between front-end (qemu) and back-end. At this point, this new feature is added for the purpose of virtio-fs migration. Because

[PATCH v4 1/8] vhost-user.rst: Deprecate [GS]ET_STATUS

2023-10-04 Thread Hanna Czenczek
There is no clearly defined purpose for the virtio status byte in vhost-user: For resetting, we already have RESET_DEVICE; and for virtio feature negotiation, we have [GS]ET_FEATURES. With the REPLY_ACK protocol extension, it is possible for SET_FEATURES to return errors (SET_PROTOCOL_FEATURES

[PATCH v4 2/8] vhost-user.rst: Improve [GS]ET_VRING_BASE doc

2023-10-04 Thread Hanna Czenczek
GET_VRING_BASE does not mention that it stops the respective ring. Fix that. Furthermore, it is not fully clear what the "base offset" these commands' documentation refers to is; an offset could be many things. Be more precise and verbose about it, especially given that these commands use

[PATCH v4 8/8] vhost-user-fs: Implement internal migration

2023-10-04 Thread Hanna Czenczek
A virtio-fs device's VM state consists of: - the virtio device (vring) state (VMSTATE_VIRTIO_DEVICE) - the back-end's (virtiofsd's) internal state We get/set the latter via the new vhost operations to transfer migratory state. It is its own dedicated subsection, so that for external migration,

[PATCH v4 4/8] vhost-user.rst: Introduce suspended state

2023-10-04 Thread Hanna Czenczek
In vDPA, GET_VRING_BASE does not stop the queried vring, which is why SUSPEND was introduced so that the returned index would be stable. In vhost-user, it does stop the vring, so under the same reasoning, it can get away without SUSPEND. Still, we do want to clarify that if the device is

[PATCH v4 0/8] vhost-user: Back-end state migration

2023-10-04 Thread Hanna Czenczek
RFC: https://lists.nongnu.org/archive/html/qemu-devel/2023-03/msg04263.html v1: https://lists.nongnu.org/archive/html/qemu-devel/2023-04/msg01575.html v2: https://lists.nongnu.org/archive/html/qemu-devel/2023-07/msg02604.html v3:

Re: [PATCH v3 1/7] vhost-user: strip superfluous whitespace

2023-10-04 Thread Michael S. Tsirkin
On Wed, Oct 04, 2023 at 12:08:52PM +0200, Laszlo Ersek wrote: > On 10/4/23 11:06, Michael S. Tsirkin wrote: > > On Mon, Oct 02, 2023 at 10:32:15PM +0200, Laszlo Ersek wrote: > >> Cc: "Michael S. Tsirkin" (supporter:vhost) > > > > why the (supporter:vhost) part? not all scripts will cope > > well

Re: [PULL 30/63] vhost-user: call VHOST_USER_SET_VRING_ENABLE synchronously

2023-10-04 Thread Michael S. Tsirkin
On Wed, Oct 04, 2023 at 12:11:44PM +0200, Laszlo Ersek wrote: > On 10/4/23 10:44, Michael S. Tsirkin wrote: > > From: Laszlo Ersek > > > > (1) The virtio-1.2 specification > > writes: > > > >> 3 General Initialization And

Re: [PATCH 00/13] misc: Rename 'softmmu' -> 'system'

2023-10-04 Thread Daniel P . Berrangé
On Wed, Oct 04, 2023 at 02:37:14PM +0200, Thomas Huth wrote: > On 04/10/2023 14.33, Daniel P. Berrangé wrote: > > On Wed, Oct 04, 2023 at 11:06:15AM +0200, Philippe Mathieu-Daudé wrote: > > > This series finishes the cleanup which remove the confusion > > > of using 'softmmu' when we really mean

[PATCH v2 01/10] migration: Create migrate_rdma()

2023-10-04 Thread Juan Quintela
Helper to say if we are doing a migration over rdma. Reviewed-by: Peter Xu Signed-off-by: Juan Quintela --- migration/migration.h | 2 ++ migration/options.h | 1 + migration/migration.c | 1 + migration/options.c | 7 +++ migration/rdma.c | 4 +++- 5 files changed, 14

[PATCH v2 04/10] migration/rdma: Remove all uses of RAM_CONTROL_HOOK

2023-10-04 Thread Juan Quintela
Instead of going trhough ram_control_load_hook(), call qemu_rdma_registration_handle() directly. Reviewed-by: Peter Xu Signed-off-by: Juan Quintela --- migration/qemu-file.h | 1 - migration/rdma.h | 3 +++ migration/ram.c | 5 - migration/rdma.c | 12 +++- 4

Re: [PATCH] hw/virtio/vhost: Silence compiler warnings in vhost code when using -Wshadow

2023-10-04 Thread Michael S. Tsirkin
On Wed, Oct 04, 2023 at 01:48:09PM +0200, Thomas Huth wrote: > Rename a variable in vhost_dev_sync_region() and remove a superfluous > declaration in vhost_commit() to make this code compilable with "-Wshadow". > > Signed-off-by: Thomas Huth Reviewed-by: Michael S. Tsirkin > --- >

[PATCH v2 09/10] migration/rdma: Remove qemu_ prefix from exported functions

2023-10-04 Thread Juan Quintela
Functions are long enough even without this. Reviewed-by: Peter Xu Signed-off-by: Juan Quintela --- migration/rdma.h | 12 ++-- migration/ram.c| 14 +++--- migration/rdma.c | 40 +++- migration/trace-events | 28

[PATCH v2 00/10] Removal of QEMUFileHooks

2023-10-04 Thread Juan Quintela
Hi zThis was in a previous PULL request, but it failed CI. Fixed the problems with using: QIOChannelRDMA *rioc = QIO_CHANNEL_RDMA(obj); Before we had checked that rdma was enabled. The problem was identified by Daniel. I remove the reviewed by from peter for 2-6 because I had to touch those

[PATCH v2 02/10] migration/rdma: Unfold ram_control_before_iterate()

2023-10-04 Thread Juan Quintela
Once there: - Remove unused data parameter - unfold it in its callers. - change all callers to call qemu_rdma_registration_start() - We need to call QIO_CHANNEL_RDMA() after we check for migrate_rdma() Reviewed-by: Peter Xu Signed-off-by: Juan Quintela -- initilazize rioc after checknig that

[PATCH v2 07/10] qemu-file: Remove QEMUFileHooks

2023-10-04 Thread Juan Quintela
The only user was rdma, and its use is gone. Reviewed-by: Peter Xu Signed-off-by: Juan Quintela --- migration/qemu-file.h | 4 migration/qemu-file.c | 6 -- migration/rdma.c | 9 - 3 files changed, 19 deletions(-) diff --git a/migration/qemu-file.h

[PATCH v2 03/10] migration/rdma: Unfold ram_control_after_iterate()

2023-10-04 Thread Juan Quintela
Once there: - Remove unused data parameter - unfold it in its callers - change all callers to call qemu_rdma_registration_stop() - We need to call QIO_CHANNEL_RDMA() after we check for migrate_rdma() Reviewed-by: Peter Xu Signed-off-by: Juan Quintela --- This function has goto's. So I don't

[PATCH v2 05/10] migration/rdma: Unfold hook_ram_load()

2023-10-04 Thread Juan Quintela
There is only one flag called with: RAM_CONTROL_BLOCK_REG. Reviewed-by: Peter Xu Signed-off-by: Juan Quintela --- migration/qemu-file.h | 11 --- migration/rdma.h | 3 +++ migration/qemu-file.c | 10 -- migration/ram.c | 6 -- migration/rdma.c | 34

[PATCH v2 10/10] migration/rdma: Check sooner if we are in postcopy for save_page()

2023-10-04 Thread Juan Quintela
Reviewed-by: Peter Xu Signed-off-by: Juan Quintela --- migration/rdma.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index c73e610416..62293ab1d6 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -3253,10 +3253,6 @@ static

[PATCH v2 08/10] migration/rdma: Move rdma constants from qemu-file.h to rdma.h

2023-10-04 Thread Juan Quintela
Reviewed-by: Peter Xu Signed-off-by: Juan Quintela --- migration/qemu-file.h | 17 - migration/rdma.h | 16 migration/ram.c | 2 +- 3 files changed, 17 insertions(+), 18 deletions(-) diff --git a/migration/qemu-file.h b/migration/qemu-file.h index

[PATCH v2 06/10] migration/rdma: Create rdma_control_save_page()

2023-10-04 Thread Juan Quintela
The only user of ram_control_save_page() and save_page() hook was rdma. Just move the function to rdma.c, rename it to rdma_control_save_page(). Reviewed-by: Peter Xu Signed-off-by: Juan Quintela --- migration/qemu-file.h | 12 migration/rdma.h | 10 ++

[PATCH] util/log: re-allow switching away from stderr log file

2023-10-04 Thread Fiona Ebner
Commit 59bde21374 ("util/log: do not close and reopen log files when flags are turned off") prevented switching away from stderr on a subsequent invocation of qemu_set_log_internal(). This prevented switching away from stderr with the 'logfile' monitor command as well as an invocation like >

Re: [PATCH v5 2/2] migration: Update error description outside migration.c

2023-10-04 Thread Juan Quintela
Tejus GK wrote: > On 04/10/23 1:53 pm, Juan Quintela wrote: >> Tejus GK wrote: >>> On 03/10/23 6:14 pm, Juan Quintela wrote: Tejus GK wrote: > A few code paths exist in the source code,where a migration is > marked as failed via MIGRATION_STATUS_FAILED, but the failure happens

Re: [PATCH v1 1/9] qapi: golang: Generate qapi's enum types in Go

2023-10-04 Thread Victor Toso
Hi, On Mon, Oct 02, 2023 at 04:09:29PM -0400, John Snow wrote: > On Mon, Oct 2, 2023 at 3:07 PM John Snow wrote: > > > > On Wed, Sep 27, 2023 at 7:25 AM Victor Toso wrote: > > > > > > This patch handles QAPI enum types and generates its equivalent in Go. > > > > > > Basically, Enums are being

RE: [PULL 0/2] hex queue

2023-10-04 Thread Brian Cain
> -Original Message- > From: Markus Armbruster > Sent: Wednesday, October 4, 2023 2:38 AM > To: Brian Cain > Cc: qemu-devel@nongnu.org; richard.hender...@linaro.org; > phi...@linaro.org; peter.mayd...@linaro.org; Matheus Bernardino (QUIC) > ; stefa...@redhat.com; a...@rev.ng; >

[PULL 06/11] i386/a-b-bootblock: factor test memory addresses out into constants

2023-10-04 Thread Juan Quintela
From: Daniil Tatianin So that we have less magic numbers to deal with. This also allows us to reuse these in the following commits. Reviewed-by: Peter Xu Reviewed-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela Signed-off-by: Daniil Tatianin Signed-off-by: Juan Quintela

[PULL 03/11] MAINTAINERS: Add entry for rdma migration

2023-10-04 Thread Juan Quintela
From: Peter Xu It's not obvious to many that RDMA migration is in Odd Fixes stage for a long time. Add an explicit sub entry for it (besides migration, which already covers the rdma files) to be clear on that, meanwhile add Zhijian as Reviewer, so Zhijian can see the patches and review when he

[PULL 00/11] Migration 20231004 patches

2023-10-04 Thread Juan Quintela
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/juan.quintela/qemu.git tags/migration-20231004-pull

[PULL 10/11] migration: file URI offset

2023-10-04 Thread Juan Quintela
From: Steve Sistare Allow an offset option to be specified as part of the file URI, in the form "file:filename,offset=offset", where offset accepts the common size suffixes, or the 0x prefix, but not both. Migration data is written to and read from the file starting at offset. If unspecified,

[PULL 11/11] migration: Unify and trace vmstate field_exists() checks

2023-10-04 Thread Juan Quintela
From: Peter Xu 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 reformat the code to make it much easier to read. The real benefit here (besides code

[PULL 07/11] i386/a-b-bootblock: zero the first byte of each page on start

2023-10-04 Thread Juan Quintela
From: Daniil Tatianin The migration qtest all the way up to this point used to work by sheer luck relying on the contents of all pages from 1MiB to 100MiB to contain the same one value in the first byte initially. This easily breaks if we reduce the amount of RAM for the test instances from

[PULL 05/11] migration/rdma: zore out head.repeat to make the error more clear

2023-10-04 Thread Juan Quintela
From: Li Zhijian Previously, we got a confusion error that complains the RDMAControlHeader.repeat: qemu-system-x86_64: rdma: Too many requests in this message (3638950032).Bailing. Actually, it's caused by an unexpected RDMAControlHeader.type. After this patch, error will become:

[PULL 09/11] migration: file URI

2023-10-04 Thread Juan Quintela
From: Steve Sistare Extend the migration URI to support file:. This can be used for any migration scenario that does not require a reverse path. It can be used as an alternative to 'exec:cat > file' in minimized containers that do not contain /bin/sh, and it is easier to use than the fd: URI.

[PULL 02/11] migration: Update error description outside migration.c

2023-10-04 Thread Juan Quintela
From: Tejus GK A few code paths exist in the source code,where a migration is marked as failed via MIGRATION_STATUS_FAILED, but the failure happens outside of migration.c In such cases, an error_report() call is made, however the current MigrationState is never updated with the error

[PULL 08/11] s390x/a-b-bios: zero the first byte of each page on start

2023-10-04 Thread Juan Quintela
From: Daniil Tatianin Same as with the x86 verison of this test, we relied on the contents of all pages in RAM to be the same across the entire test range, which is very fragile. Zero the first byte of each page before running the increment loop to fix this. Fixes: 5571dc824b ("tests/migration:

[PULL 01/11] migration/vmstate: Introduce vmstate_save_state_with_err

2023-10-04 Thread Juan Quintela
From: Tejus GK Currently, a few code paths exist in the function vmstate_save_state_v, which ultimately leads to a migration failure. However, an update in the current MigrationState for the error description is never done. vmstate.c somehow doesn't seem to allow the use of migrate_set_error

[PATCH 2/2] target/hexagon: fix some occurrences of -Wshadow=local

2023-10-04 Thread Brian Cain
Of the changes in this commit, the changes in `HELPER(commit_hvx_stores)()` are less obvious. They are required because of some macro invocations like SCATTER_OP_WRITE_TO_MEM(). e.g.: In file included from ../target/hexagon/op_helper.c:31: ../target/hexagon/mmvec/macros.h:205:18: error:

[PATCH 0/2] Fix usage of GETPC(), variable shadowing

2023-10-04 Thread Brian Cain
Matheus' patch has previously been reviewed, but I based my -Wshadow patch on his. So I'm submitting the series for review. Brian Cain (1): target/hexagon: fix some occurrences of -Wshadow=local Matheus Tavares Bernardino (1): target/hexagon: move GETPC() calls to top level helpers

[PATCH 1/2] target/hexagon: move GETPC() calls to top level helpers

2023-10-04 Thread Brian Cain
From: Matheus Tavares Bernardino As docs/devel/loads-stores.rst states: ``GETPC()`` should be used with great care: calling it in other functions that are *not* the top level ``HELPER(foo)`` will cause unexpected behavior. Instead, the value of ``GETPC()`` should be read from the helper

[PULL 04/11] migration: Add co-maintainers for migration

2023-10-04 Thread Juan Quintela
From: Peter Xu 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 Acked-by: Fabiano Rosas Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Peter

Re: [PATCH 00/13] misc: Rename 'softmmu' -> 'system'

2023-10-04 Thread Thomas Huth
On 04/10/2023 14.33, Daniel P. Berrangé wrote: On Wed, Oct 04, 2023 at 11:06:15AM +0200, Philippe Mathieu-Daudé wrote: This series finishes the cleanup which remove the confusion of using 'softmmu' when we really mean 'system emulation', as opposition to 'user emulation'. Am I

Re: [PATCH v3 09/16] semihosting: Clean up global variable shadowing

2023-10-04 Thread Markus Armbruster
Alex Bennée writes: > Philippe Mathieu-Daudé writes: > >> Fix: >> >> semihosting/config.c:134:49: error: declaration shadows a variable in the >> global scope [-Werror,-Wshadow] >> int qemu_semihosting_config_options(const char *optarg) >>

<    1   2   3   4   5   6   7   >