Re: [PATCH v4 03/10] migration: migrate 'inc' command option is deprecated.

2023-10-16 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> Juan Quintela writes: >> >>> Markus Armbruster wrote: Juan Quintela writes: >>> So what I want, I want to remove -i/-b in the next version (9.0?). For >>> the other, I want to remove it, but I don't care if the code is around >>> in

[PATCH v2 3/3] hw/nvme: Add SPDM over DOE support

2023-10-16 Thread Alistair Francis
From: Wilfred Mallawa Setup Data Object Exchance (DOE) as an extended capability for the NVME controller and connect SPDM to it (CMA) to it. Signed-off-by: Wilfred Mallawa Signed-off-by: Alistair Francis --- docs/specs/index.rst| 1 + docs/specs/spdm.rst | 114

[PATCH v2 0/3] Initial support for SPDM Responders

2023-10-16 Thread Alistair Francis
The Security Protocol and Data Model (SPDM) Specification defines messages, data objects, and sequences for performing message exchanges over a variety of transport and physical media. - https://www.dmtf.org/sites/default/files/standards/documents/DSP0274_1.3.0.pdf SPDM currently supports PCIe

[PATCH v2 2/3] backends: Initial support for SPDM socket support

2023-10-16 Thread Alistair Francis
From: Huai-Cheng Kuo SPDM enables authentication, attestation and key exchange to assist in providing infrastructure security enablement. It's a standard published by the DMTF [1]. SPDM supports multiple transports, including PCIe DOE and MCTP. This patch adds support to QEMU to connect to an

[PATCH v2 1/3] hw/pci: Add all Data Object Types defined in PCIe r6.0

2023-10-16 Thread Alistair Francis
Add all of the defined protocols/features from the PCIe-SIG r6.0 "Table 6-32 PCI-SIG defined Data Object Types (Vendor ID = 0001h)" table. Signed-off-by: Alistair Francis --- include/hw/pci/pcie_doe.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/pci/pcie_doe.h

Re: [PATCH 2/2] virtio: Drop out of coroutine context in virtio_load()

2023-10-16 Thread Michael Tokarev
05.09.2023 17:50, Kevin Wolf wrote: virtio_load() as a whole should run in coroutine context because it reads from the migration stream and we don't want this to block. However, it calls virtio_set_features_nocheck() and devices don't expect their .set_features callback to run in a coroutine

Re: [PULL 00/25] Python patches

2023-10-16 Thread John Snow
On Mon, Oct 16, 2023 at 3:21 PM Stefan Hajnoczi wrote: > > Applied, thanks. > > Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any > user-visible changes. Hi Vladimir: all done! I've created a MR to backport your changes to the standalone repo here:

Re: [PULL 00/38] Migration 20231016 patches

2023-10-16 Thread Fabiano Rosas
373ad22c794a013da69663c03f1297a5c56: >> >> >> >> Merge tag 'pull-riscv-to-apply-20231012-1' of >> >> https://github.com/alistair23/qemu into staging (2023-10-12 10:24:44 >> >> -0400) >> >> >> >> are available in the Git repos

[PULL 0/1] Block patches

2023-10-16 Thread Stefan Hajnoczi
The following changes since commit 63011373ad22c794a013da69663c03f1297a5c56: Merge tag 'pull-riscv-to-apply-20231012-1' of https://github.com/alistair23/qemu into staging (2023-10-12 10:24:44 -0400) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git

[PULL 1/1] virtio-blk: don't start dataplane during the stop of dataplane

2023-10-16 Thread Stefan Hajnoczi
From: hujian During the stop of dataplane for virtio-blk, virtio_bus_cleanup_host_notifier() is be called to clean up notifier at the end, if polled ioeventfd, virtio_blk_handle_output() is used to handle io request. But due to s->dataplane_disabled is false, it will be returned directly,

Re: [PULL 00/25] Python patches

2023-10-16 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 v2 0/2] hw/ufs: fixes

2023-10-16 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 00/26] Block layer patches

2023-10-16 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 00/38] Migration 20231016 patches

2023-10-16 Thread Stefan Hajnoczi
t; > >> Merge tag 'pull-riscv-to-apply-20231012-1' of > >> https://github.com/alistair23/qemu into staging (2023-10-12 10:24:44 -0400) > >> > >> are available in the Git repository at: > >> > >> https://gitlab.co

Re: [PULL 11/38] tests/qtest: migration-test: Add tests for file-based migration

2023-10-16 Thread Fabiano Rosas
Juan Quintela writes: > From: Fabiano Rosas > > Add basic tests for file-based migration. > > Note that we cannot use test_precopy_common because that routine > expects it to be possible to run the migration live. With the file > transport there is no live migration because we must wait for the

Re: [RFC PATCH 00/78] Strict disable implicit fallthrough

2023-10-16 Thread Manos Pitsidianakis
On Mon, 16 Oct 2023, 18:04 Peter Maydell, wrote: > On Mon, 16 Oct 2023 at 15:58, Manos Pitsidianakis > wrote: > > > > Hello Peter, > > > > On Mon, 16 Oct 2023, 17:13 Peter Maydell, > wrote: > >> > >> On Fri, 13 Oct 2023 at 13:42, Markus Armbruster > wrote: > >> > > >> > Emmanouil

Re: [PATCH v2] block/file-posix: fix update_zones_wp() caller

2023-10-16 Thread Stefan Hajnoczi
On Fri, Aug 25, 2023 at 12:05:56PM +0800, Sam Li wrote: > 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

Re: [PULL 00/38] Migration 20231016 patches

2023-10-16 Thread Fabiano Rosas
taging (2023-10-12 10:24:44 -0400) >> >> are available in the Git repository at: >> >> https://gitlab.com/juan.quintela/qemu.git >> tags/migration-20231016-pull-request >> >> for you to fetch changes up to f39b0f42753635b0f2d8b00a26d11bb197bf51e2: >>

Re: [PULL 00/38] Migration 20231016 patches

2023-10-16 Thread Stefan Hajnoczi
available in the Git repository at: > > https://gitlab.com/juan.quintela/qemu.git > tags/migration-20231016-pull-request > > for you to fetch changes up to f39b0f42753635b0f2d8b00a26d11bb197bf51e2: > > migration/multifd: Clarify Error usage in multifd_cha

[PATCH 07/12] hw/xen: update Xen console to XenDevice model

2023-10-16 Thread David Woodhouse
This allows (non-primary) console devices to be created on the command line. Signed-off-by: David Woodhouse --- hw/char/trace-events| 8 + hw/char/xen_console.c | 502 +++- hw/xen/xen-legacy-backend.c | 1 - 3 files changed, 381 insertions(+),

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

2023-10-16 Thread David Woodhouse
From: David Woodhouse The primary console is special because the toolstack maps a page at a fixed GFN and also allocates the guest-side event channel. Add support for that in emulated mode, so that we can have a primary console. Add a *very* rudimentary stub of foriegnmem ops for emulated mode,

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

2023-10-16 Thread David Woodhouse
From: David Woodhouse This is kind of redundant since without being able to get these through ome other method (HVMOP_get_param) the guest wouldn't be able to access XenStore in order to find them. But Xen populates them, and it does allow guests to *rebind* to the event channel port after a

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

2023-10-16 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 --- target/i386/kvm/kvm.c | 4 1 file changed, 4 insertions(+) diff --git a/target/i386/kvm/kvm.c

[PATCH 02/12] hw/xen: select kernel mode for per-vCPU event channel upcall vector

2023-10-16 Thread David Woodhouse
From: David Woodhouse A guest which has configured the per-vCPU upcall vector may set the HVM_PARAM_CALLBACK_IRQ param to fairly much anything other than zero. For example, Linux v6.0+ after commit b1c3497e604 ("x86/xen: Add support for HVMOP_set_evtchn_upcall_vector") will just do this after

[PATCH 0/12] Get Xen PV shim running in qemu

2023-10-16 Thread David Woodhouse
I hadn't got round to getting the PV shim running yet; I thought it would need work on the multiboot loader. Turns out it doesn't. I *did* need to fix a couple of brown-paper-bag bugs in the per-vCPU upcall vector support, and implement Xen console support though. Now I can test PV guests: $

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

2023-10-16 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

[PATCH 11/12] hw/xen: automatically assign device index to block devices

2023-10-16 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,

[PATCH 10/12] hw/xen: automatically assign device index to console devices

2023-10-16 Thread David Woodhouse
From: David Woodhouse Now that we can reliably tell whether a given device already exists, we can allow the user to add console devices on the command line with just '-device xen-console,chardev=foo'. Start at 1, because we can't add the *primary* console; that's special because the toolstack

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

2023-10-16 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 --- hw/i386/kvm/xen_xenstore.c| 2 +- include/hw/xen/interface/arch-arm.h | 37 +++---

[PATCH 06/12] hw/xen: add get_frontend_path() method to XenDeviceClass

2023-10-16 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

[PATCH 09/12] hw/xen: prevent duplicate device registrations

2023-10-16 Thread David Woodhouse
From: David Woodhouse Ensure that we have a XenBackendInstance for every device regardless of whether it was "discovered" in XenStore or created directly in QEMU. This allows the backend_list to be a source of truth about whether a given backend exists, and allows us to reject duplicates. This

[PATCH 01/12] i386/xen: fix per-vCPU upcall vector for Xen emulation

2023-10-16 Thread David Woodhouse
From: David Woodhouse The per-vCPU upcall vector support had two problems. Firstly it was using the wrong hypercall argument and would always return -EFAULT. And secondly it was using the wrong ioctl() to pass the vector to the kernel and thus the *kernel* would always return -EINVAL. Linux

Re: [RFC PATCH v3 02/78] block: add fallthrough pseudo-keyword

2023-10-16 Thread Stefan Hajnoczi
On Fri, Oct 13, 2023 at 11:45:30AM +0300, Emmanouil Pitsidianakis wrote: > In preparation of raising -Wimplicit-fallthrough to 5, replace all > fall-through comments with the fallthrough attribute pseudo-keyword. > > Signed-off-by: Emmanouil Pitsidianakis > --- > block/block-copy.c| 1 + >

Re: [RFC PATCH 00/78] Strict disable implicit fallthrough

2023-10-16 Thread Peter Maydell
On Mon, 16 Oct 2023 at 15:58, Manos Pitsidianakis wrote: > > Hello Peter, > > On Mon, 16 Oct 2023, 17:13 Peter Maydell, wrote: >> >> On Fri, 13 Oct 2023 at 13:42, Markus Armbruster wrote: >> > >> > Emmanouil Pitsidianakis writes: >> > >> > > Hello, >> > > >> > > This RFC is inspired by the

Re: [RFC PATCH v3 08/78] hw/block: add fallthrough pseudo-keyword

2023-10-16 Thread Stefan Hajnoczi
On Fri, Oct 13, 2023 at 11:45:36AM +0300, Emmanouil Pitsidianakis wrote: > In preparation of raising -Wimplicit-fallthrough to 5, replace all > fall-through comments with the fallthrough attribute pseudo-keyword. > > Signed-off-by: Emmanouil Pitsidianakis > --- > hw/block/dataplane/xen-block.c

Re: [RFC PATCH 00/78] Strict disable implicit fallthrough

2023-10-16 Thread Manos Pitsidianakis
Hello Peter, On Mon, 16 Oct 2023, 17:13 Peter Maydell, wrote: > On Fri, 13 Oct 2023 at 13:42, Markus Armbruster wrote: > > > > Emmanouil Pitsidianakis writes: > > > > > Hello, > > > > > > This RFC is inspired by the kernel's move to -Wimplicit-fallthrough=3 > > > back in 2019.[0] > > > We

Re: [PATCH v2] block/file-posix: fix update_zones_wp() caller

2023-10-16 Thread Sam Li
Sam Li 于2023年8月25日周五 12:06写道: > > 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. >

Re: [RFC PATCH 00/78] Strict disable implicit fallthrough

2023-10-16 Thread Peter Maydell
On Fri, 13 Oct 2023 at 13:42, Markus Armbruster wrote: > > Emmanouil Pitsidianakis writes: > > > Hello, > > > > This RFC is inspired by the kernel's move to -Wimplicit-fallthrough=3 > > back in 2019.[0] > > We take one step (or two) further by increasing it to 5 which rejects > > fall through

Re: [PATCH v4 03/10] migration: migrate 'inc' command option is deprecated.

2023-10-16 Thread Juan Quintela
Markus Armbruster wrote: > Juan Quintela writes: > >> Markus Armbruster wrote: >>> Juan Quintela writes: >> So what I want, I want to remove -i/-b in the next version (9.0?). For >> the other, I want to remove it, but I don't care if the code is around >> in "deprecated" state for another

Re: -drive if=none: can't we make this the default?

2023-10-16 Thread Michael Tokarev
Almost everyone mentions -blockdev as a replacement for -drive. But I have to remind several issues with it: 1. While documentation has improved a lot, -blockdev is still mostly unknown to the masses. 2. -blockdev is just too verbose, one have to specify a lot of parameters just to do a

Re: [PATCH v4 03/10] migration: migrate 'inc' command option is deprecated.

2023-10-16 Thread Markus Armbruster
Juan Quintela writes: > Markus Armbruster wrote: >> Juan Quintela writes: >> >>> Set the 'block_incremental' migration parameter to 'true' instead. >>> >>> Reviewed-by: Thomas Huth >>> Acked-by: Stefan Hajnoczi >>> Signed-off-by: Juan Quintela >>> >>> --- >>> >>> Improve documentation and

[PULL 37/38] migration/multifd: Unify multifd_send_thread error paths

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas The preferred usage of the Error type is to always set both the return code and the error when a failure happens. As all code called from the send thread follows this pattern, we'll always have the return code and the error set at the same time. Aside from the convention, in

[PULL 32/38] migration/ram: Remove RAMState from xbzrle_cache_zero_page

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas 'rs' is not used in that function. It's a leftover from commit 9360447d34 ("ram: Use MigrationStats for statistics"). Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID:

[PULL 06/38] migration: Fix analyze-migration.py 'configuration' parsing

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas The 'configuration' state subsections are currently not being parsed and the script fails when analyzing an aarch64 stream: Traceback (most recent call last): File "./scripts/analyze-migration.py", line 625, in dump.read(dump_memory = args.memory) File

[PULL 14/38] migration: Create migrate_rdma()

2023-10-16 Thread Juan Quintela
Helper to say if we are doing a migration over rdma. Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-2-quint...@redhat.com> --- migration/migration.h | 2 ++ migration/options.h | 1 + migration/migration.c | 1 +

[PULL 27/38] migration: Improve json and formatting

2023-10-16 Thread Juan Quintela
Reviewed-by: Markus Armbruster Signed-off-by: Juan Quintela Message-ID: <20231013104736.31722-2-quint...@redhat.com> --- qapi/migration.json | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qapi/migration.json b/qapi/migration.json index 360e609f66..db3df12d6c 100644

[PULL 33/38] migration/ram: Stop passing QEMUFile around in save_zero_page

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas We don't need the QEMUFile when we're already passing the PageSearchStatus. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231011184604.32364-5-faro...@suse.de> --- migration/ram.c | 11

[PULL 34/38] migration/ram: Move xbzrle zero page handling into save_zero_page

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas It makes a bit more sense to have the zero page handling of xbzrle right where we save the zero page. Also invert the exit condition to remove one level of indentation which makes the next patch easier to grasp. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas

[PULL 26/38] migration/rdma: Remove all "ret" variables that are used only once

2023-10-16 Thread Juan Quintela
Change code that is: int ret; ... ret = foo(); if (ret[ < 0]?) { to: if (foo()[ < 0]) { Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-14-quint...@redhat.com> --- migration/rdma.c | 29 - 1 file

[PULL 25/38] migration/rdma: Declare for index variables local

2023-10-16 Thread Juan Quintela
Declare all variables that are only used inside a for loop inside the for statement. This makes clear that they are not used outside of the for loop. Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-13-quint...@redhat.com> ---

[PULL 31/38] migration/ram: Refactor precopy ram loading code

2023-10-16 Thread Juan Quintela
From: Nikolay Borisov Extract the ramblock parsing code into a routine that operates on the sequence of headers from the stream and another the parses the individual ramblock. This makes ram_load_precopy() easier to comprehend. Signed-off-by: Nikolay Borisov Reviewed-by: Philippe Mathieu-Daudé

[PULL 09/38] migration: Fix analyze-migration read operation signedness

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas The migration code uses unsigned values for 16, 32 and 64-bit operations. Fix the script to do the same. This was causing an issue when parsing the migration stream generated on the ppc64 target because one of instance_ids was larger than the 32bit signed maximum: Traceback

[PULL 19/38] migration/rdma: Create rdma_control_save_page()

2023-10-16 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 Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-7-quint...@redhat.com> ---

[PULL 20/38] qemu-file: Remove QEMUFileHooks

2023-10-16 Thread Juan Quintela
The only user was rdma, and its use is gone. Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-8-quint...@redhat.com> --- migration/qemu-file.h | 4 migration/qemu-file.c | 6 -- migration/rdma.c | 9 - 3 files

[PULL 17/38] migration/rdma: Remove all uses of RAM_CONTROL_HOOK

2023-10-16 Thread Juan Quintela
Instead of going through ram_control_load_hook(), call qemu_rdma_registration_handle() directly. Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-5-quint...@redhat.com> --- migration/qemu-file.h | 1 - migration/rdma.h | 3 +++ migration/ram.c

[PULL 35/38] migration/ram: Merge save_zero_page functions

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas We don't need to do this in two pieces. One single function makes it easier to grasp, specially since it removes the indirection on the return value handling. Reviewed-by: Peter Xu Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela

[PULL 28/38] migration: check for rate_limit_max for RATE_LIMIT_DISABLED

2023-10-16 Thread Juan Quintela
From: Elena Ufimtseva In migration rate limiting atomic operations are used to read the rate limit variables and transferred bytes and they are expensive. Check first if rate_limit_max is equal to RATE_LIMIT_DISABLED and return false immediately if so. Note that with this patch we will also

[PULL 13/38] migration: Non multifd migration don't care about multifd flushes

2023-10-16 Thread Juan Quintela
RDMA was having trouble because migrate_multifd_flush_after_each_section() can only be true or false, but we don't want to send any flush when we are not in multifd migration. CC: Fabiano Rosas Reviewed-by: Li Zhijian Reviewed-by: Peter Xu Signed-off-by: Juan Quintela Message-ID:

[PULL 02/38] migration: Use g_autofree to simplify ram_dirty_bitmap_reload()

2023-10-16 Thread Juan Quintela
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Reviewed-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID: <20231011023627.86691-1-phi...@linaro.org> --- migration/ram.c | 17 ++--- 1 file

[PULL 04/38] migration: fix RAMBlock add NULL check

2023-10-16 Thread Juan Quintela
From: Dmitry Frolov qemu_ram_block_from_host() may return NULL, which will be dereferenced w/o check. Usualy return value is checked for this function. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Dmitry Frolov Reviewed-by: Fabiano Rosas Reviewed-by: Peter

[PULL 29/38] multifd: fix counters in multifd_send_thread

2023-10-16 Thread Juan Quintela
From: Elena Ufimtseva Previous commit cbec7eb76879d419e7dbf531ee2506ec0722e825 "migration/multifd: Compute transferred bytes correctly" removed accounting for packet_len in non-rdma case, but the next_packet_size only accounts for pages, not for the header packet (normal_pages * PAGE_SIZE) that

[PULL 08/38] migration: Fix analyze-migration.py when ignore-shared is used

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas The script is currently broken when the x-ignore-shared capability is used: Traceback (most recent call last): File "./scripts/analyze-migration.py", line 656, in dump.read(dump_memory = args.memory) File "./scripts/analyze-migration.py", line 593, in read

[PULL 00/38] Migration 20231016 patches

2023-10-16 Thread Juan Quintela
/migration-20231016-pull-request for you to fetch changes up to f39b0f42753635b0f2d8b00a26d11bb197bf51e2: migration/multifd: Clarify Error usage in multifd_channel_connect (2023-10-16 11:01:33 +0200) Migration Pull request (20231016

[PULL 36/38] migration/multifd: Remove direct "socket" references

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas We're about to enable support for other transports in multifd, so remove direct references to sockets. Signed-off-by: Fabiano Rosas Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID:

[PULL 30/38] multifd: reset next_packet_len after sending pages

2023-10-16 Thread Juan Quintela
From: Elena Ufimtseva Sometimes multifd sends just sync packet with no pages (normal_num is 0). In this case the old value is being preserved and being accounted for while only packet_len is being transferred. Reset it to 0 after sending and accounting for. Signed-off-by: Elena Ufimtseva

[PULL 23/38] migration/rdma: Check sooner if we are in postcopy for save_page()

2023-10-16 Thread Juan Quintela
Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-11-quint...@redhat.com> --- migration/rdma.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/migration/rdma.c b/migration/rdma.c index c147c94b08..e973579a52

[PULL 16/38] migration/rdma: Unfold ram_control_after_iterate()

2023-10-16 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: Li Zhijian Signed-off-by: Juan Quintela Message-ID:

[PULL 38/38] migration/multifd: Clarify Error usage in multifd_channel_connect

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas The function is currently called from two sites, one always gives it a NULL Error and the other always gives it a non-NULL Error. In the non-NULL case, all it does it trace the error and return. One of the callers already have tracing, add a tracepoint to the other and stop

[PULL 07/38] migration: Add capability parsing to analyze-migration.py

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas The script is broken when the configuration/capabilities section is present. Add support for parsing the capabilities so we can fix it in the next patch. Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela Message-ID:

[PULL 01/38] migration: refactor migration_completion

2023-10-16 Thread Juan Quintela
From: Wei Wang Current migration_completion function is a bit long. Refactor the long implementation into different subfunctions: - migration_completion_precopy: completion code related to precopy - migration_completion_postcopy: completion code related to postcopy Rename

[PULL 21/38] migration/rdma: Move rdma constants from qemu-file.h to rdma.h

2023-10-16 Thread Juan Quintela
Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-9-quint...@redhat.com> --- migration/qemu-file.h | 17 - migration/rdma.h | 16 migration/ram.c | 2 +- 3 files changed, 17 insertions(+), 18

[PULL 22/38] migration/rdma: Remove qemu_ prefix from exported functions

2023-10-16 Thread Juan Quintela
Functions are long enough even without this. Reviewed-by: Peter Xu Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-10-quint...@redhat.com> --- migration/rdma.h | 12 ++-- migration/ram.c| 14 +++--- migration/rdma.c |

[PULL 10/38] tests/qtest/migration: Add a test for the analyze-migration script

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas Add a smoke test that migrates to a file and gives it to the script. It should catch the most annoying errors such as changes in the ram flags. After code has been merged it becomes way harder to figure out what is causing the script to fail, the person making the change is

[PULL 24/38] migration/rdma: Use i as for index instead of idx

2023-10-16 Thread Juan Quintela
Once there, all the uses are local to the for, so declare the variable inside the for statement. Reviewed-by: Fabiano Rosas Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-12-quint...@redhat.com> --- migration/rdma.c | 49

[PULL 18/38] migration/rdma: Unfold hook_ram_load()

2023-10-16 Thread Juan Quintela
There is only one flag called with: RAM_CONTROL_BLOCK_REG. Reviewed-by: Li Zhijian Signed-off-by: Juan Quintela Message-ID: <20231011203527.9061-6-quint...@redhat.com> --- migration/qemu-file.h | 11 --- migration/rdma.h | 3 +++ migration/qemu-file.c | 10 --

[PULL 15/38] migration/rdma: Unfold ram_control_before_iterate()

2023-10-16 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: Li Zhijian Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID:

[PULL 03/38] migration: Allow user to specify available switchover bandwidth

2023-10-16 Thread Juan Quintela
From: Peter Xu Migration bandwidth is a very important value to live migration. It's because it's one of the major factors that we'll make decision on when to switchover to destination in a precopy process. This value is currently estimated by QEMU during the whole live migration process by

[PULL 11/38] tests/qtest: migration-test: Add tests for file-based migration

2023-10-16 Thread Juan Quintela
From: Fabiano Rosas Add basic tests for file-based migration. Note that we cannot use test_precopy_common because that routine expects it to be possible to run the migration live. With the file transport there is no live migration because we must wait for the source to finish writing the

[PULL 05/38] migration: Add the configuration vmstate to the json writer

2023-10-16 Thread Juan Quintela
From: Nikolay Borisov Make the migration json writer part of MigrationState struct, allowing the 'configuration' object be serialized to json. This will facilitate the parsing of the 'configuration' object in the next patch that fixes analyze-migration.py for arm. Signed-off-by: Nikolay

[PULL 12/38] migration: hold the BQL during setup

2023-10-16 Thread Juan Quintela
From: Fiona Ebner This is intended to be a semantic revert of commit 9b09503752 ("migration: run setup callbacks out of big lock"). There have been so many changes since that commit (e.g. a new setup callback dirty_bitmap_save_setup() that also needs to be adapted now), it's easier to do the

Re: -drive if=none: can't we make this the default?

2023-10-16 Thread Paolo Bonzini
On 10/14/23 21:16, Michael Tokarev wrote: Can't we make -drive if=none the default? Yes, I know current default is ide, and whole world have to use if=none explicitly to undo this.  I think at this point we can deprecate if=ide default and switch to if=none in the next release.  I think it

Re: -drive if=none: can't we make this the default?

2023-10-16 Thread Daniel P . Berrangé
On Sat, Oct 14, 2023 at 10:16:16PM +0300, Michael Tokarev wrote: > Can't we make -drive if=none the default? > > Yes, I know current default is ide, and whole world have to use if=none > explicitly > to undo this. I think at this point we can deprecate if=ide default and > switch to > if=none

Re: [PATCH v3 0/8] qemu-img: rebase: add compression support

2023-10-16 Thread Andrey Drobyshev
On 10/2/23 09:35, Andrey Drobyshev wrote: > On 9/19/23 20:57, Andrey Drobyshev wrote: >> v2 --> v3: >> * Patch 3/8: fixed logic in the if statement, so that we align on blk >>when blk_old_backing == NULL; >> * Patch 4/8: comment fix; >> * Patch 5/8: comment fix; dropped redundant "if

Re: [PATCH v4 03/10] migration: migrate 'inc' command option is deprecated.

2023-10-16 Thread Juan Quintela
Markus Armbruster wrote: > Juan Quintela writes: > >> Set the 'block_incremental' migration parameter to 'true' instead. >> >> Reviewed-by: Thomas Huth >> Acked-by: Stefan Hajnoczi >> Signed-off-by: Juan Quintela >> >> --- >> >> Improve documentation and style (thanks Markus) >> --- >>

Re: [PATCH v5] migration: hold the BQL during setup

2023-10-16 Thread Juan Quintela
Fiona Ebner wrote: queued. > This is intended to be a semantic revert of commit 9b09503752 > ("migration: run setup callbacks out of big lock"). There have been so > many changes since that commit (e.g. a new setup callback > dirty_bitmap_save_setup() that also needs to be adapted now), it's >