qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] a2531b: hw/arm: Deprecate various old Arm mac


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] a2531b: hw/arm: Deprecate various old Arm machine types
Date: Tue, 12 Mar 2024 06:07:38 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a2531bb855079597444f2ef1dcd4118d6609baf1
      
https://github.com/qemu/qemu/commit/a2531bb855079597444f2ef1dcd4118d6609baf1
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M docs/about/deprecated.rst
    M hw/arm/gumstix.c
    M hw/arm/mainstone.c
    M hw/arm/nseries.c
    M hw/arm/palm.c
    M hw/arm/spitz.c
    M hw/arm/tosa.c
    M hw/arm/z2.c

  Log Message:
  -----------
  hw/arm: Deprecate various old Arm machine types

QEMU includes some models of old Arm machine types which are
a bit problematic for us because:
 * they're written in a very old way that uses numerous APIs that we
   would like to get away from (eg they don't use qdev, they use
   qemu_system_reset_request(), they use vmstate_register(), etc)
 * they've been that way for a decade plus and nobody particularly has
   stepped up to try to modernise the code (beyond some occasional
   work here and there)
 * we often don't have test cases for them, which means that if we
   do try to do the necessary refactoring work on them we have no
   idea if they even still work at all afterwards

All these machine types are also of hardware that has largely passed
away into history and where I would not be surprised to find that
e.g. the Linux kernel support was never tested on real hardware
any more.

After some consultation with the Linux kernel developers, we
are going to deprecate:

All PXA2xx machines:

akita                Sharp SL-C1000 (Akita) PDA (PXA270)
borzoi               Sharp SL-C3100 (Borzoi) PDA (PXA270)
connex               Gumstix Connex (PXA255)
mainstone            Mainstone II (PXA27x)
spitz                Sharp SL-C3000 (Spitz) PDA (PXA270)
terrier              Sharp SL-C3200 (Terrier) PDA (PXA270)
tosa                 Sharp SL-6000 (Tosa) PDA (PXA255)
verdex               Gumstix Verdex Pro XL6P COMs (PXA270)
z2                   Zipit Z2 (PXA27x)

All OMAP2 machines:

n800                 Nokia N800 tablet aka. RX-34 (OMAP2420)
n810                 Nokia N810 tablet aka. RX-44 (OMAP2420)

One of the OMAP1 machines:

cheetah              Palm Tungsten|E aka. Cheetah PDA (OMAP310)

Rationale:
 * for QEMU dropping individual machines is much less beneficial
   than if we can drop support for an entire SoC
 * the OMAP2 QEMU code in particular is large, old and unmaintained,
   and none of the OMAP2 kernel maintainers said they were using
   QEMU in any of their testing/development
 * although there is a setup that is booting test kernels on some
   of the PXA2xx machines, nobody seemed to be using them as part
   of their active kernel development and my impression from the
   email thread is that PXA is the closest of all these SoC families
   to being dropped from the kernel soon
 * nobody said they were using cheetah, so it's entirely
   untested and quite probably broken
 * on the other hand the OMAP1 sx1 model does seem to be being
   used as part of kernel development, and there was interest
   in keeping collie around

In particular, the mainstone, tosa and z2 machine types have
already been dropped from Linux.

Mark all these machine types as deprecated.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240308171621.3749894-1-peter.maydell@linaro.org


  Commit: b48139d0d90e9a551f630760fa57732cfeee759f
      
https://github.com/qemu/qemu/commit/b48139d0d90e9a551f630760fa57732cfeee759f
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/pdb.c

  Log Message:
  -----------
  contrib/elf2dmp: Remove unnecessary err flags

They are always evaluated to 1.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Message-id: 20240307-elf2dmp-v4-1-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: a4e58de14678503fd773e7920359028de77711f9
      
https://github.com/qemu/qemu/commit/a4e58de14678503fd773e7920359028de77711f9
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/download.c
    M contrib/elf2dmp/main.c

  Log Message:
  -----------
  contrib/elf2dmp: Assume error by default

A common construct in contrib/elf2dmp is to set "err" flag and goto
in error paths. In such a construct, there is only one successful path
while there are several error paths, so it will be more simpler to
initialize "err" flag set, and clear it in the successful path.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Message-id: 20240307-elf2dmp-v4-2-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 87157ef3508dbc84dd74ebf099f86828b652d854
      
https://github.com/qemu/qemu/commit/87157ef3508dbc84dd74ebf099f86828b652d854
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/main.c

  Log Message:
  -----------
  contrib/elf2dmp: Continue even contexts are lacking

Let fill_context() continue even if it fails to fill contexts of some
CPUs. A dump may still contain valuable information even if it lacks
contexts of some CPUs due to dump corruption or a failure before
starting CPUs.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Message-id: 20240307-elf2dmp-v4-3-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 262a0ff88029e86b29434d4b2e7f710ae73b646c
      
https://github.com/qemu/qemu/commit/262a0ff88029e86b29434d4b2e7f710ae73b646c
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/addrspace.c
    M contrib/elf2dmp/addrspace.h
    M contrib/elf2dmp/main.c

  Log Message:
  -----------
  contrib/elf2dmp: Change pa_space_create() signature

pa_space_create() used to return an integer to propagate error, but
it never fails so let it return void.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240307-elf2dmp-v4-4-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: a15f9749490e8d813b8929c69a7365e3edc6ab8c
      
https://github.com/qemu/qemu/commit/a15f9749490e8d813b8929c69a7365e3edc6ab8c
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/addrspace.c
    M contrib/elf2dmp/addrspace.h
    M contrib/elf2dmp/main.c

  Log Message:
  -----------
  contrib/elf2dmp: Fix error reporting style in addrspace.c

include/qapi/error.h says:
> We recommend
> * bool-valued functions return true on success / false on failure,
> ...

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240307-elf2dmp-v4-5-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 1b806c36bc88a975cc10af219f1a397942f43e8d
      
https://github.com/qemu/qemu/commit/1b806c36bc88a975cc10af219f1a397942f43e8d
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/download.c
    M contrib/elf2dmp/download.h
    M contrib/elf2dmp/main.c

  Log Message:
  -----------
  contrib/elf2dmp: Fix error reporting style in download.c

include/qapi/error.h says:
> We recommend
> * bool-valued functions return true on success / false on failure,
> ...

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20240307-elf2dmp-v4-6-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: b1250455c71193ad92cb7c98ee54078ce33e0b04
      
https://github.com/qemu/qemu/commit/b1250455c71193ad92cb7c98ee54078ce33e0b04
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/main.c
    M contrib/elf2dmp/pdb.c
    M contrib/elf2dmp/pdb.h

  Log Message:
  -----------
  contrib/elf2dmp: Fix error reporting style in pdb.c

include/qapi/error.h says:
> We recommend
> * bool-valued functions return true on success / false on failure,
> ...

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20240307-elf2dmp-v4-7-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 49760ccf862ff6cd0b18dd5897a60f8d708a6e52
      
https://github.com/qemu/qemu/commit/49760ccf862ff6cd0b18dd5897a60f8d708a6e52
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/main.c
    M contrib/elf2dmp/qemu_elf.c
    M contrib/elf2dmp/qemu_elf.h

  Log Message:
  -----------
  contrib/elf2dmp: Fix error reporting style in qemu_elf.c

include/qapi/error.h says:
> We recommend
> * bool-valued functions return true on success / false on failure,
> ...

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20240307-elf2dmp-v4-8-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: fbc3d7d2f1d638f2c68a2af343be882717a9eed8
      
https://github.com/qemu/qemu/commit/fbc3d7d2f1d638f2c68a2af343be882717a9eed8
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/main.c

  Log Message:
  -----------
  contrib/elf2dmp: Fix error reporting style in main.c

include/qapi/error.h says:
> We recommend
> * bool-valued functions return true on success / false on failure,
> ...

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20240307-elf2dmp-v4-9-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: a6a62ef5751371a82a9fb3ce67190d38a7f465fb
      
https://github.com/qemu/qemu/commit/a6a62ef5751371a82a9fb3ce67190d38a7f465fb
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/addrspace.c

  Log Message:
  -----------
  contrib/elf2dmp: Always check for PA resolution failure

Not checking PA resolution failure can result in NULL deference.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Message-id: 20240307-elf2dmp-v4-10-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 2aa205f7c6339cb46d26473a0434a292fc3d32cf
      
https://github.com/qemu/qemu/commit/2aa205f7c6339cb46d26473a0434a292fc3d32cf
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/main.c

  Log Message:
  -----------
  contrib/elf2dmp: Always destroy PA space

Destroy PA space even if paging base couldn't be found, fixing memory
leak.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Message-id: 20240307-elf2dmp-v4-11-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 667909478b09f9f16b03b7e7b11f3c42e7bdcdf3
      
https://github.com/qemu/qemu/commit/667909478b09f9f16b03b7e7b11f3c42e7bdcdf3
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/addrspace.c

  Log Message:
  -----------
  contrib/elf2dmp: Ensure segment fits in file

This makes elf2dmp more robust against corrupted inputs.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Message-id: 20240307-elf2dmp-v4-12-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 2aa501af351c25f91c56f3c9fd023df4bbea3f3c
      
https://github.com/qemu/qemu/commit/2aa501af351c25f91c56f3c9fd023df4bbea3f3c
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/pdb.c

  Log Message:
  -----------
  contrib/elf2dmp: Use lduw_le_p() to read PDB

The relevant value may be unaligned and is little-endian.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240307-elf2dmp-v4-13-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: f024f5031ee570d952d3e93c4bb00ee111eb9dc6
      
https://github.com/qemu/qemu/commit/f024f5031ee570d952d3e93c4bb00ee111eb9dc6
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/main.c

  Log Message:
  -----------
  contrib/elf2dmp: Use rol64() to decode

rol64() is roubust against too large shift values and fixes UBSan
warnings.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240307-elf2dmp-v4-14-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: a2de23c6e3e840e3e96ad0bb9e4314988e5a2f42
      
https://github.com/qemu/qemu/commit/a2de23c6e3e840e3e96ad0bb9e4314988e5a2f42
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Add Akihiko Odaki as a elf2dmp reviewer

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20240307-elf2dmp-v4-15-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 0c94e32dff020f868a8125c5314fe9f318a8215d
      
https://github.com/qemu/qemu/commit/0c94e32dff020f868a8125c5314fe9f318a8215d
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/qemu_elf.c

  Log Message:
  -----------
  contrib/elf2dmp: Use GPtrArray

This removes the need to enumarate QEMUCPUState twice and saves code.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Message-id: 20240307-elf2dmp-v4-17-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 9de37c288367ad22dd8abe069eeae17faf6e3ed9
      
https://github.com/qemu/qemu/commit/9de37c288367ad22dd8abe069eeae17faf6e3ed9
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/qemu_elf.c

  Log Message:
  -----------
  contrib/elf2dmp: Clamp QEMU note to file size

This fixes crashes with truncated dumps.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Message-id: 20240307-elf2dmp-v4-18-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 98d16e5f724cf4f884cab28956321a4a093474d7
      
https://github.com/qemu/qemu/commit/98d16e5f724cf4f884cab28956321a4a093474d7
  Author: Akihiko Odaki <akihiko.odaki@daynix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M contrib/elf2dmp/qemu_elf.c

  Log Message:
  -----------
  contrib/elf2dmp: Ensure phdrs fit in file

Callers of elf64_getphdr() and elf_getphdrnum() assume phdrs are
accessible.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2202
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Tested-by: Viktor Prutyanov <viktor.prutyanov@phystech.edu>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20240307-elf2dmp-v4-19-4f324ad4d99d@daynix.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 5dd6bfd90d01e0cb27c349157208e5e4ce883846
      
https://github.com/qemu/qemu/commit/5dd6bfd90d01e0cb27c349157208e5e4ce883846
  Author: Ani Sinha <anisinha@redhat.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M docs/conf.py
    M include/qemu/help-texts.h

  Log Message:
  -----------
  docs: update copyright date to the year 2024

We are already in the third month of 2024 but the copyright notices still refer
to 2023. Update the date to 2024 in documentation and help texts.

Cc: peter.maydell@linaro.org
Cc: qemu-trivial@nongnu.org
Signed-off-by: Ani Sinha <anisinha@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20240311120346.9596-1-anisinha@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 4e1871c450a14e38b09d4e312922eefd475c1c64
      
https://github.com/qemu/qemu/commit/4e1871c450a14e38b09d4e312922eefd475c1c64
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: Don't serialize devices in qemu_savevm_state_iterate()

Commit 90697be8896c ("live migration: Serialize vmstate saving in stage
2") introduced device serialization in qemu_savevm_state_iterate(). The
rationale behind it was to first complete migration of slower changing
block devices and only then migrate the RAM, to avoid sending fast
changing RAM pages over and over.

This commit was added a long time ago, and while it was useful back
then, it is not the case anymore:
1. Block migration is deprecated, see commit 66db46ca83b8 ("migration:
   Deprecate block migration").
2. Today there are other iterative devices besides RAM and block, such
   as VFIO, which are registered for migration after RAM. With current
   serialization behavior, a fast changing device can block other
   devices from sending their data, which may prevent migration from
   converging in some cases.

The issue described in item 2 was observed in several VFIO migration
scenarios with switchover-ack capability enabled, where some workload on
the VM prevented RAM from ever reaching a hard zero, thus blocking VFIO
initial pre-copy data from being sent. Hence, destination could not ack
switchover and migration could not converge.

Fix that by not serializing iterative devices in
qemu_savevm_state_iterate().

Note that this still doesn't fully prevent device starvation. As
correctly pointed out by Peter [1], a fast changing device might
constantly consume all allocated bandwidth and block the following
devices. However, this scenario is more likely to happen only if
max-bandwidth is low.

[1] https://lore.kernel.org/qemu-devel/Zd6iw9dBhW6wKNxx@x1n/

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240304105339.20713-2-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 3f6ed59ec400a58646e766a323f7f8047f044b98
      
https://github.com/qemu/qemu/commit/3f6ed59ec400a58646e766a323f7f8047f044b98
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M hw/vfio/migration.c

  Log Message:
  -----------
  vfio/migration: Refactor vfio_save_state() return value

Currently, vfio_save_state() returns 1 regardless of whether there is
more data to send or not. This was done to prevent a fast changing VFIO
device from potentially blocking other devices from sending their data,
as qemu_savevm_state_iterate() serialized devices.

Now that qemu_savevm_state_iterate() no longer serializes devices, there
is no need for that.

Refactor vfio_save_state() to return 0 if more data is available and 1
if no more data is available.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240304105339.20713-3-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: ff64e0ba817d79968bffa88d205397abf05cc6e8
      
https://github.com/qemu/qemu/commit/ff64e0ba817d79968bffa88d205397abf05cc6e8
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M hw/vfio/migration.c

  Log Message:
  -----------
  vfio/migration: Add a note about migration rate limiting

VFIO migration buffer size is currently limited to 1MB. Therefore, there
is no need to check if migration rate exceeded, as in the worst case it
will exceed by only 1MB.

However, if the buffer size is later changed to a bigger value,
vfio_save_iterate() should enforce migration rate (similar to migration
RAM code).

Add a note about this in vfio_save_iterate() to serve as a reminder.

Suggested-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240304105339.20713-4-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 12ab1e4fe84aafac37e006673f0d01f716a9a058
      
https://github.com/qemu/qemu/commit/12ab1e4fe84aafac37e006673f0d01f716a9a058
  Author: Maksim Davydov <davydov-max@yandex-team.ru>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration/ram: add additional check

If a migration stream is broken, the address and flag reading can return
zero. Thus, an irrelevant flag error will be returned instead of EIO.
It can be fixed by additional check after the reading.

Signed-off-by: Maksim Davydov <davydov-max@yandex-team.ru>
Link: 
https://lore.kernel.org/r/20240304144203.158477-1-davydov-max@yandex-team.ru
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: e8c44363fbf25c2601fa2fbf3ec0d6d37c5f1a02
      
https://github.com/qemu/qemu/commit/e8c44363fbf25c2601fa2fbf3ec0d6d37c5f1a02
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M migration/qemu-file.c

  Log Message:
  -----------
  migration: Report error when shutdown fails

This will help detect issues regarding I/O channels usage.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240304122844.1888308-7-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: f61efdee1ef96445af7db832a0170d137fbdb31c
      
https://github.com/qemu/qemu/commit/f61efdee1ef96445af7db832a0170d137fbdb31c
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M include/migration/register.h
    M include/qemu/typedefs.h

  Log Message:
  -----------
  migration: Remove SaveStateHandler and LoadStateHandler typedefs

They are only used once.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240304122844.1888308-8-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: ee8bb867ec48085404e6282e8f53f8446261cb84
      
https://github.com/qemu/qemu/commit/ee8bb867ec48085404e6282e8f53f8446261cb84
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M include/migration/register.h

  Log Message:
  -----------
  migration: Add documentation for SaveVMHandlers

The SaveVMHandlers structure is still in use for complex subsystems
and devices. Document the handlers since we are going to modify a few
later.

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240304122844.1888308-9-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: e6e08e83239a067449b9698874c7547164a38414
      
https://github.com/qemu/qemu/commit/e6e08e83239a067449b9698874c7547164a38414
  Author: Cédric Le Goater <clg@redhat.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: Do not call PRECOPY_NOTIFY_SETUP notifiers in case of error

When commit bd2270608fa0 ("migration/ram.c: add a notifier chain for
precopy") added PRECOPY_NOTIFY_SETUP notifiers at the end of
qemu_savevm_state_setup(), it didn't take into account a possible
error in the loop calling vmstate_save() or .save_setup() handlers.

Check ret value before calling the notifiers.

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>
Link: https://lore.kernel.org/r/20240304122844.1888308-10-clg@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 61dec060821de5d81a0c5f6b827e4f0282cd92ca
      
https://github.com/qemu/qemu/commit/61dec060821de5d81a0c5f6b827e4f0282cd92ca
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M docs/devel/migration/main.rst
    M io/channel-file.c
    M migration/multifd.c

  Log Message:
  -----------
  migration/multifd: Don't fsync when closing QIOChannelFile

Commit bc38feddeb ("io: fsync before closing a file channel") added a
fsync/fdatasync at the closing point of the QIOChannelFile to ensure
integrity of the migration stream in case of QEMU crash.

The decision to do the sync at qio_channel_close() was not the best
since that function runs in the main thread and the fsync can cause
QEMU to hang for several minutes, depending on the migration size and
disk speed.

To fix the hang, remove the fsync from qio_channel_file_close().

At this moment, the migration code is the only user of the fsync and
we're taking the tradeoff of not having a sync at all, leaving the
responsibility to the upper layers.

Fixes: bc38feddeb ("io: fsync before closing a file channel")
Reviewed-by: "Daniel P. Berrangé" <berrange@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240305195629.9922-1-farosas@suse.de
Link: https://lore.kernel.org/r/20240305174332.2553-1-farosas@suse.de
[peterx: add more comment to the qio_channel_close()]
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 69f7b00d057f8832a841a53d5ee31eb303157398
      
https://github.com/qemu/qemu/commit/69f7b00d057f8832a841a53d5ee31eb303157398
  Author: Yu Zhang <yu.zhang@ionos.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M migration/rdma.c

  Log Message:
  -----------
  migration/rdma: Fix a memory issue for migration

In commit 3fa9642ff7 change was made to convert the RDMA backend to
accept MigrateAddress struct. However, the assignment of "host" leads
to data corruption on the target host and the failure of migration.

    isock->host = rdma->host;

By allocating the memory explicitly for it with g_strdup_printf(), the
issue is fixed and the migration doesn't fail any more.

Fixes: 3fa9642ff7 ("migration: convert rdma backend to accept MigrateAddress")
Cc: qemu-stable <qemu-stable@nongnu.org>
Cc: Li Zhijian <lizhijian@fujitsu.com>
Link: 
https://lore.kernel.org/r/CAHEcVy4L_D6tuhJ8h=xLR4WaPaprJE3nnxZAEyUnoTrxQ6CF5w@mail.gmail.com
Signed-off-by: Yu Zhang <yu.zhang@ionos.com>
[peterx: use g_strdup() instead of g_strdup_printf(), per Zhijian]
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 4c7c8563191fd65d98cba05352a1fc1fbef6d817
      
https://github.com/qemu/qemu/commit/4c7c8563191fd65d98cba05352a1fc1fbef6d817
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M system/physmem.c

  Log Message:
  -----------
  physmem: Rename addr1 to more informative mr_addr in flatview_read/write() 
and similar

The calls to flatview_read/write[_continue]() have parameters addr and
addr1 but the names give no indication of what they are addresses of.
Rename addr1 to mr_addr to reflect that it is the translated address
offset within the MemoryRegion returned by flatview_translate().
Similarly rename the parameter in address_space_read/write_cached_slow()

Suggested-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Link: 
https://lore.kernel.org/r/20240307153710.30907-2-Jonathan.Cameron@huawei.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: bcfd8ba4f5d887dc9923738131c8598e90e76bb2
      
https://github.com/qemu/qemu/commit/bcfd8ba4f5d887dc9923738131c8598e90e76bb2
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M system/physmem.c

  Log Message:
  -----------
  physmem: Reduce local variable scope in flatview_read/write_continue()

Precursor to factoring out the inner loops for reuse.

Reviewed-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: 
https://lore.kernel.org/r/20240307153710.30907-3-Jonathan.Cameron@huawei.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: e7927d33cf667d2c034f7b6aa0c0d0dde22a9753
      
https://github.com/qemu/qemu/commit/e7927d33cf667d2c034f7b6aa0c0d0dde22a9753
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M system/physmem.c

  Log Message:
  -----------
  physmem: Factor out body of flatview_read/write_continue() loop

This code will be reused for the address_space_cached accessors
shortly.

Also reduce scope of result variable now we aren't directly
calling this in the loop.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Link: 
https://lore.kernel.org/r/20240307153710.30907-4-Jonathan.Cameron@huawei.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 47293c922cb4d70aae5b8100936ffc624d2a4076
      
https://github.com/qemu/qemu/commit/47293c922cb4d70aae5b8100936ffc624d2a4076
  Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M system/physmem.c

  Log Message:
  -----------
  physmem: Fix wrong address in large address_space_read/write_cached_slow()

If the access is bigger than the MemoryRegion supports,
flatview_read/write_continue() will attempt to update the Memory Region.
but the address passed to flatview_translate() is relative to the cache, not
to the FlatView.

On arm/virt with interleaved CXL memory emulation and virtio-blk-pci this
lead to the first part of descriptor being read from the CXL memory and the
second part from PA 0x8 which happens to be a blank region
of a flash chip and all ffs on this particular configuration.
Note this test requires the out of tree ARM support for CXL, but
the problem is more general.

Avoid this by adding new address_space_read_continue_cached()
and address_space_write_continue_cached() which share all the logic
with the flatview versions except for the MemoryRegion lookup which
is unnecessary as the MemoryRegionCache only covers one MemoryRegion.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: 
https://lore.kernel.org/r/20240307153710.30907-5-Jonathan.Cameron@huawei.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: a1bb5dd169f4e47690a3b53c64692808472171a7
      
https://github.com/qemu/qemu/commit/a1bb5dd169f4e47690a3b53c64692808472171a7
  Author: Anthony PERARD <anthony.perard@citrix.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M migration/file.c

  Log Message:
  -----------
  migration: Fix format in error message

In file_write_ramblock_iov(), "offset" is "uintptr_t" and not
"ram_addr_t". While usually they are both equivalent, this is not the
case with CONFIG_XEN_BACKEND.

Use the right format. This will fix build on 32-bit.

Fixes: f427d90b9898 ("migration/multifd: Support outgoing mapped-ram stream 
format")
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Link: https://lore.kernel.org/r/20240311123439.16844-1-anthony.perard@citrix.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: f3bff6c44304a21ea99eeed336672bd46ca102d5
      
https://github.com/qemu/qemu/commit/f3bff6c44304a21ea99eeed336672bd46ca102d5
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M hw/vfio/migration.c
    M hw/virtio/virtio-balloon.c
    A include/migration/client-options.h
    M include/migration/misc.h
    M migration/options.h
    M system/dirtylimit.c

  Log Message:
  -----------
  migration: export fewer options

A small number of migration options are accessed by migration clients,
but to see them clients must include all of options.h, which is mostly
for migration core code.  migrate_mode() in particular will be needed by
multiple clients.

Refactor the option declarations so clients can see the necessary few via
misc.h, which already exports a portion of the client API.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: 
https://lore.kernel.org/r/1710179319-294320-1-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: f853fa0714061989b14d7f85667a353b69e2d9b6
      
https://github.com/qemu/qemu/commit/f853fa0714061989b14d7f85667a353b69e2d9b6
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M hw/vfio/container.c
    M hw/virtio/vhost-user.c
    M hw/virtio/virtio-balloon.c
    M system/qdev-monitor.c
    M target/loongarch/kvm/kvm.c
    M tests/unit/test-vmstate.c

  Log Message:
  -----------
  migration: remove migration.h references

Remove migration.h from files that no longer need it due to
previous commits.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: 
https://lore.kernel.org/r/1710179338-294359-2-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 7dcb3c87d87cbf3359c9bbef8066e5195ee92f4d
      
https://github.com/qemu/qemu/commit/7dcb3c87d87cbf3359c9bbef8066e5195ee92f4d
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M hw/vfio/common.c
    M include/migration/misc.h
    M migration/migration.c
    M migration/migration.h
    M migration/ram.c
    M net/vhost-vdpa.c

  Log Message:
  -----------
  migration: export migration_is_setup_or_active

Delete the MigrationState parameter from migration_is_setup_or_active
and move it to the public API in misc.h.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: 
https://lore.kernel.org/r/1710179338-294359-3-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 3a6813b68cf21a366522564f83f885bf2657dcc8
      
https://github.com/qemu/qemu/commit/3a6813b68cf21a366522564f83f885bf2657dcc8
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M hw/vfio/common.c
    M include/migration/misc.h
    M migration/migration.c
    M system/dirtylimit.c

  Log Message:
  -----------
  migration: export migration_is_active

Delete the MigrationState parameter from migration_is_active so it
can be exported and used without including migration.h.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: 
https://lore.kernel.org/r/1710179338-294359-4-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: aeaafb1e59f81f5cc715e656dac23f3fe5db3faa
      
https://github.com/qemu/qemu/commit/aeaafb1e59f81f5cc715e656dac23f3fe5db3faa
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M include/migration/misc.h
    M migration/migration.c
    M migration/migration.h
    M migration/options.c
    M migration/savevm.c
    M system/dirtylimit.c
    M target/riscv/kvm/kvm-cpu.c

  Log Message:
  -----------
  migration: export migration_is_running

Delete the MigrationState parameter from migration_is_running and move
it to the public API in misc.h.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: 
https://lore.kernel.org/r/1710179338-294359-5-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 714f33123bfc73c6caacd19a44e082da8cdc96e3
      
https://github.com/qemu/qemu/commit/714f33123bfc73c6caacd19a44e082da8cdc96e3
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M include/migration/client-options.h
    M migration/options.c
    M system/dirtylimit.c

  Log Message:
  -----------
  migration: export vcpu_dirty_limit_period

Define and export vcpu_dirty_limit_period to eliminate a dependency
on MigrationState.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: 
https://lore.kernel.org/r/1710179338-294359-6-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 6e7856397641326163ef493197a849f99a9a6a44
      
https://github.com/qemu/qemu/commit/6e7856397641326163ef493197a849f99a9a6a44
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M include/migration/misc.h
    M migration/migration.c
    M system/dirtylimit.c

  Log Message:
  -----------
  migration: migration_thread_is_self

Define and export migration_thread_is_self to eliminate a dependency
on MigrationState.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: 
https://lore.kernel.org/r/1710179338-294359-7-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 9bb630c6ee6e930e1c521829681365e5672bbd99
      
https://github.com/qemu/qemu/commit/9bb630c6ee6e930e1c521829681365e5672bbd99
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M hw/vfio/common.c
    M include/migration/misc.h
    M migration/migration.c

  Log Message:
  -----------
  migration: migration_is_device

Define and export migration_is_device to eliminate a dependency
on MigrationState.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: 
https://lore.kernel.org/r/1710179338-294359-8-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 20c64c8a51a477115589b3a9f7304e423dcbe7f2
      
https://github.com/qemu/qemu/commit/20c64c8a51a477115589b3a9f7304e423dcbe7f2
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M hw/vfio/common.c
    M hw/vfio/migration.c
    M include/migration/misc.h
    M migration/migration.c

  Log Message:
  -----------
  migration: migration_file_set_error

Define and export migration_file_set_error to eliminate a dependency
on MigrationState.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: 
https://lore.kernel.org/r/1710179338-294359-9-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 7395127f230abe8065eeec274f106c29a8a4498a
      
https://github.com/qemu/qemu/commit/7395127f230abe8065eeec274f106c29a8a4498a
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M migration/colo.c
    M net/colo-compare.c
    M stubs/colo.c

  Log Message:
  -----------
  migration: privatize colo interfaces

Remove private migration interfaces from net/colo-compare.c and push them
to migration/colo.c.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: 
https://lore.kernel.org/r/1710179338-294359-10-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: a3ed48933659b52f942a677b80b31e4234ddb32f
      
https://github.com/qemu/qemu/commit/a3ed48933659b52f942a677b80b31e4234ddb32f
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M include/migration/misc.h
    M migration/migration.c

  Log Message:
  -----------
  migration: delete unused accessors

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: 
https://lore.kernel.org/r/1710179338-294359-11-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: c9539d9b14e6369ff169951f581b4c5cea1786e2
      
https://github.com/qemu/qemu/commit/c9539d9b14e6369ff169951f581b4c5cea1786e2
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M include/migration/misc.h
    M migration/migration.h

  Log Message:
  -----------
  migration: purge MigrationState from public interface

Move remaining MigrationState references from the public file
misc.h to the private file migration.h.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Link: 
https://lore.kernel.org/r/1710179338-294359-12-git-send-email-steven.sistare@oracle.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 44fe138edc0f08b8568fe4ee90be6a2a56c67daf
      
https://github.com/qemu/qemu/commit/44fe138edc0f08b8568fe4ee90be6a2a56c67daf
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M migration/file.c

  Log Message:
  -----------
  migration/multifd: Allow zero pages in file migration

Currently, it's an error to have no data pages in the multifd file
migration because zero page detection is done in the migration thread
and zero pages don't reach multifd. This is enforced with the
pages->num assert.

We're about to add zero page detection on the multifd thread. Fix the
file_write_ramblock_iov() to stop considering p->iovs_num=0 an error.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240311180015.3359271-2-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: c3cdf3fb18e5ecf8a3b4dc7223ddbfc53c418eb8
      
https://github.com/qemu/qemu/commit/c3cdf3fb18e5ecf8a3b4dc7223ddbfc53c418eb8
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M migration/multifd.c
    M migration/ram.c
    M migration/ram.h

  Log Message:
  -----------
  migration/multifd: Allow clearing of the file_bmap from multifd

We currently only need to clear the mapped-ram file bitmap from the
migration thread during save_zero_page.

We're about to add support for zero page detection on the multifd
thread, so allow ramblock_set_file_bmap_atomic() to also clear the
bits.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240311180015.3359271-3-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 5fdbb1dfccfd59661c95cae760b8e276c5b8e65c
      
https://github.com/qemu/qemu/commit/5fdbb1dfccfd59661c95cae760b8e276c5b8e65c
  Author: Hao Xiang <hao.xiang@bytedance.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M hw/core/qdev-properties-system.c
    M include/hw/qdev-properties-system.h
    M migration/migration-hmp-cmds.c
    M migration/options.c
    M migration/options.h
    M migration/ram.c
    M qapi/migration.json

  Log Message:
  -----------
  migration/multifd: Add new migration option zero-page-detection.

This new parameter controls where the zero page checking is running.
1. If this parameter is set to 'legacy', zero page checking is
done in the migration main thread.
2. If this parameter is set to 'none', zero page checking is disabled.

Signed-off-by: Hao Xiang <hao.xiang@bytedance.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Link: https://lore.kernel.org/r/20240311180015.3359271-4-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 303e6f54f9657be76ee060006ee2d4cacff263a0
      
https://github.com/qemu/qemu/commit/303e6f54f9657be76ee060006ee2d4cacff263a0
  Author: Hao Xiang <hao.xiang@bytedance.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M hw/core/qdev-properties-system.c
    M migration/meson.build
    A migration/multifd-zero-page.c
    M migration/multifd-zlib.c
    M migration/multifd-zstd.c
    M migration/multifd.c
    M migration/multifd.h
    M migration/ram.c
    M migration/trace-events
    M qapi/migration.json

  Log Message:
  -----------
  migration/multifd: Implement zero page transmission on the multifd thread.

1. Add zero_pages field in MultiFDPacket_t.
2. Implements the zero page detection and handling on the multifd
threads for non-compression, zlib and zstd compression backends.
3. Added a new value 'multifd' in ZeroPageDetection enumeration.
4. Adds zero page counters and updates multifd send/receive tracing
format to track the newly added counters.

Signed-off-by: Hao Xiang <hao.xiang@bytedance.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240311180015.3359271-5-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 9ae90f73e623c8b8c7ec1fccd8ca493805df8fbd
      
https://github.com/qemu/qemu/commit/9ae90f73e623c8b8c7ec1fccd8ca493805df8fbd
  Author: Hao Xiang <hao.xiang@bytedance.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration/multifd: Implement ram_save_target_page_multifd to handle multifd 
version of MigrationOps::ram_save_target_page.

1. Add a dedicated handler for MigrationOps::ram_save_target_page in
multifd live migration.
2. Refactor ram_save_target_page_legacy so that the legacy and multifd
handlers don't have internal functions calling into each other.

Signed-off-by: Hao Xiang <hao.xiang@bytedance.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Message-Id: <20240226195654.934709-4-hao.xiang@bytedance.com>
Link: https://lore.kernel.org/r/20240311180015.3359271-6-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 70c25c92e602f393d3c33596530c5f2b18491e55
      
https://github.com/qemu/qemu/commit/70c25c92e602f393d3c33596530c5f2b18491e55
  Author: Hao Xiang <hao.xiang@bytedance.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M hw/core/machine.c
    M migration/options.c
    M qapi/migration.json

  Log Message:
  -----------
  migration/multifd: Enable multifd zero page checking by default.

1. Set default "zero-page-detection" option to "multifd". Now
zero page checking can be done in the multifd threads and this
becomes the default configuration.
2. Handle migration QEMU9.0 -> QEMU8.2 compatibility. We provide
backward compatibility where zero page checking is done from the
migration main thread.

Signed-off-by: Hao Xiang <hao.xiang@bytedance.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240311180015.3359271-7-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 1815338df00fd0a3fe25085564c6966f74c8f43d
      
https://github.com/qemu/qemu/commit/1815338df00fd0a3fe25085564c6966f74c8f43d
  Author: Hao Xiang <hao.xiang@bytedance.com>
  Date:   2024-03-11 (Mon, 11 Mar 2024)

  Changed paths:
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  migration/multifd: Add new migration test cases for legacy zero page checking.

Now that zero page checking is done on the multifd sender threads by
default, we still provide an option for backward compatibility. This
change adds a qtest migration test case to set the zero-page-detection
option to "legacy" and run multifd migration with zero page checking on the
migration main thread.

Signed-off-by: Hao Xiang <hao.xiang@bytedance.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240311180015.3359271-8-hao.xiang@linux.dev
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 1c268991b3fe699fee16b1cbb9c6025d334c5b25
      
https://github.com/qemu/qemu/commit/1c268991b3fe699fee16b1cbb9c6025d334c5b25
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    M MAINTAINERS
    M contrib/elf2dmp/addrspace.c
    M contrib/elf2dmp/addrspace.h
    M contrib/elf2dmp/download.c
    M contrib/elf2dmp/download.h
    M contrib/elf2dmp/main.c
    M contrib/elf2dmp/pdb.c
    M contrib/elf2dmp/pdb.h
    M contrib/elf2dmp/qemu_elf.c
    M contrib/elf2dmp/qemu_elf.h
    M docs/about/deprecated.rst
    M docs/conf.py
    M hw/arm/gumstix.c
    M hw/arm/mainstone.c
    M hw/arm/nseries.c
    M hw/arm/palm.c
    M hw/arm/spitz.c
    M hw/arm/tosa.c
    M hw/arm/z2.c
    M include/qemu/help-texts.h

  Log Message:
  -----------
  Merge tag 'pull-target-arm-20240311' of 
https://git.linaro.org/people/pmaydell/qemu-arm into staging

target-arm queue:
 * contrib/elf2dmp: Improve robustness to corrupt input files
 * docs: update copyright date to the year 2024
 * hw/arm: Deprecate various old Arm machine types

# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmXvV4gZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3oe5EACvvve9LOJ7UA4teEbn8zzs
# O7GGsycpu3XWINX98sUi5Cuu+uexkcXsHf2Vg8GABj2fUuA+EEqPIdIWZhVcfB2t
# RYGPgat/JVTwRUsl38OQ97l4joI2JeW18B20Pmh4/2tbZCJuIHoiHxxb+3aQl6Nl
# gz/H137ayy+Q5utt1b6z1qXnw4etiUhk4wg2ltGVtAw63w5GZOvamTicSQ1DC3ZP
# zfbIKW2WpGNjzrC1tCvaW/dNojt2blpZbsnpdPsL8cNE8puo01FnFLsUZCzOtu3m
# 23uoQq0KjQZBJrU2oZMtshc+sKT/FGPADJ9B+J8jjU0EY6cV+Qo7FT4E78mxzoR0
# JbY9SLATtY7RE1Fbh3/Am+3OEyb3ZDor5nCux0CWOsuFoBk96dzD7r5MXxM2eft1
# pGmdJStYysZkdlSyx61bu6OifHOaGjnOe+lYWpaCrVy1U3cO3hbMWH2siSQygppM
# 8EfjyfadzfST+nAnXfduSgWMv7Nc4ql4GIOxVnMIfGig32PIp545IvM9neh6GIp/
# 8fzw6TdoCQkHcWaazV1ibPF0ceH6JwRvLIMkWlNpr/QBSNdsx+zkdh7WZD+3S91U
# XrCAA7hgf7OIvHauSD0ucSbztIiFRMROcHxIoh0ui6BermtaD6fnlei4QcsJI17o
# 6XZSNSWm5/+JEsn+dcVh4g==
# =UHyi
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 11 Mar 2024 19:12:08 GMT
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" 
[ultimate]
# gpg:                 aka "Peter Maydell <peter@archaic.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* tag 'pull-target-arm-20240311' of 
https://git.linaro.org/people/pmaydell/qemu-arm:
  docs: update copyright date to the year 2024
  contrib/elf2dmp: Ensure phdrs fit in file
  contrib/elf2dmp: Clamp QEMU note to file size
  contrib/elf2dmp: Use GPtrArray
  MAINTAINERS: Add Akihiko Odaki as a elf2dmp reviewer
  contrib/elf2dmp: Use rol64() to decode
  contrib/elf2dmp: Use lduw_le_p() to read PDB
  contrib/elf2dmp: Ensure segment fits in file
  contrib/elf2dmp: Always destroy PA space
  contrib/elf2dmp: Always check for PA resolution failure
  contrib/elf2dmp: Fix error reporting style in main.c
  contrib/elf2dmp: Fix error reporting style in qemu_elf.c
  contrib/elf2dmp: Fix error reporting style in pdb.c
  contrib/elf2dmp: Fix error reporting style in download.c
  contrib/elf2dmp: Fix error reporting style in addrspace.c
  contrib/elf2dmp: Change pa_space_create() signature
  contrib/elf2dmp: Continue even contexts are lacking
  contrib/elf2dmp: Assume error by default
  contrib/elf2dmp: Remove unnecessary err flags
  hw/arm: Deprecate various old Arm machine types

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 8f3f329f5e0117bd1a23a79ab751f8a7d3471e4b
      
https://github.com/qemu/qemu/commit/8f3f329f5e0117bd1a23a79ab751f8a7d3471e4b
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-03-12 (Tue, 12 Mar 2024)

  Changed paths:
    M docs/devel/migration/main.rst
    M hw/core/machine.c
    M hw/core/qdev-properties-system.c
    M hw/vfio/common.c
    M hw/vfio/container.c
    M hw/vfio/migration.c
    M hw/virtio/vhost-user.c
    M hw/virtio/virtio-balloon.c
    M include/hw/qdev-properties-system.h
    A include/migration/client-options.h
    M include/migration/misc.h
    M include/migration/register.h
    M include/qemu/typedefs.h
    M io/channel-file.c
    M migration/colo.c
    M migration/file.c
    M migration/meson.build
    M migration/migration-hmp-cmds.c
    M migration/migration.c
    M migration/migration.h
    A migration/multifd-zero-page.c
    M migration/multifd-zlib.c
    M migration/multifd-zstd.c
    M migration/multifd.c
    M migration/multifd.h
    M migration/options.c
    M migration/options.h
    M migration/qemu-file.c
    M migration/ram.c
    M migration/ram.h
    M migration/rdma.c
    M migration/savevm.c
    M migration/trace-events
    M net/colo-compare.c
    M net/vhost-vdpa.c
    M qapi/migration.json
    M stubs/colo.c
    M system/dirtylimit.c
    M system/physmem.c
    M system/qdev-monitor.c
    M target/loongarch/kvm/kvm.c
    M target/riscv/kvm/kvm-cpu.c
    M tests/qtest/migration-test.c
    M tests/unit/test-vmstate.c

  Log Message:
  -----------
  Merge tag 'migration-20240311-pull-request' of https://gitlab.com/peterx/qemu 
into staging

Migration pull request

- Avihai's fix to allow vmstate iterators to not starve for VFIO
- Maksim's fix on additional check on precopy load error
- Fabiano's fix on fdatasync() hang in mapped-ram
- Jonathan's fix on vring cached access over MMIO regions
- Cedric's cleanup patches 1-4 out of his error report series
- Yu's fix for RDMA migration (which used to be broken even for 8.2)
- Anthony's small cleanup/fix on err message
- Steve's patches on privatize migration.h
- Xiang's patchset to enable zero page detections in multifd threads

# -----BEGIN PGP SIGNATURE-----
#
# iIgEABYKADAWIQS5GE3CDMRX2s990ak7X8zN86vXBgUCZe9+uBIccGV0ZXJ4QHJl
# ZGhhdC5jb20ACgkQO1/MzfOr1wamaQD/SvmpMEcuRndT9LPSxzXowAGDZTBpYUfv
# 5XAbx80dS9IBAO8PJJgQJIBHBeacyLBjHP9CsdVtgw5/VW+wCsbfV4AB
# =xavb
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 11 Mar 2024 21:59:20 GMT
# gpg:                using EDDSA key B9184DC20CC457DACF7DD1A93B5FCCCDF3ABD706
# gpg:                issuer "peterx@redhat.com"
# gpg: Good signature from "Peter Xu <xzpeter@gmail.com>" [marginal]
# gpg:                 aka "Peter Xu <peterx@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: B918 4DC2 0CC4 57DA CF7D  D1A9 3B5F CCCD F3AB D706

* tag 'migration-20240311-pull-request' of https://gitlab.com/peterx/qemu: (34 
commits)
  migration/multifd: Add new migration test cases for legacy zero page checking.
  migration/multifd: Enable multifd zero page checking by default.
  migration/multifd: Implement ram_save_target_page_multifd to handle multifd 
version of MigrationOps::ram_save_target_page.
  migration/multifd: Implement zero page transmission on the multifd thread.
  migration/multifd: Add new migration option zero-page-detection.
  migration/multifd: Allow clearing of the file_bmap from multifd
  migration/multifd: Allow zero pages in file migration
  migration: purge MigrationState from public interface
  migration: delete unused accessors
  migration: privatize colo interfaces
  migration: migration_file_set_error
  migration: migration_is_device
  migration: migration_thread_is_self
  migration: export vcpu_dirty_limit_period
  migration: export migration_is_running
  migration: export migration_is_active
  migration: export migration_is_setup_or_active
  migration: remove migration.h references
  migration: export fewer options
  migration: Fix format in error message
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/05ec97467120...8f3f329f5e01

To unsubscribe from these emails, change your notification settings at 
https://github.com/qemu/qemu/settings/notifications



reply via email to

[Prev in Thread] Current Thread [Next in Thread]