qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 6436db: hw/ipmi: Don't call vmstate_register(


From: Alex Bennée
Subject: [Qemu-commits] [qemu/qemu] 6436db: hw/ipmi: Don't call vmstate_register() from instan...
Date: Thu, 02 Nov 2023 20:23:54 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 6436db5a609c16c57e50e525e45e2b88cf925fff
      
https://github.com/qemu/qemu/commit/6436db5a609c16c57e50e525e45e2b88cf925fff
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M hw/ipmi/ipmi_bmc_extern.c
    M hw/ipmi/isa_ipmi_bt.c
    M hw/ipmi/isa_ipmi_kcs.c

  Log Message:
  -----------
  hw/ipmi: Don't call vmstate_register() from instance_init() functions

instance_init() can be called multiple times, e.g. during introspection
of the device. We should not install the vmstate handlers here. Do it
in the realize() function instead.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020145554.662751-1-thuth@redhat.com>


  Commit: 2fb40d1b949a98c1742a9277e716da9bc502ffe4
      
https://github.com/qemu/qemu/commit/2fb40d1b949a98c1742a9277e716da9bc502ffe4
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M hw/s390x/s390-skeys.c

  Log Message:
  -----------
  hw/s390x/s390-skeys: Don't call register_savevm_live() during instance_init()

Since the instance_init() function immediately tries to set the
property to "true", the s390_skeys_set_migration_enabled() tries
to register a savevm handler during instance_init(). However,
instance_init() functions can be called multiple times, e.g. for
introspection of devices. That means multiple instances of devices
can be created during runtime (which is fine as long as they all
don't get realized, too), so the "Prevent double registration of
savevm handler" check in the s390_skeys_set_migration_enabled()
function does not work at all as expected (since there could be
more than one instance).

Thus we must not call register_savevm_live() from an instance_init()
function at all. Move this to the realize() function instead. This
way we can also get rid of the property getter and setter functions
completely, simplifying the code along the way quite a bit.

Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020150554.664422-2-thuth@redhat.com>


  Commit: bc1bf2ae2f76d451126fb6a15f00d8a2cb9c4e76
      
https://github.com/qemu/qemu/commit/bc1bf2ae2f76d451126fb6a15f00d8a2cb9c4e76
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M hw/s390x/s390-stattrib.c

  Log Message:
  -----------
  hw/s390x/s390-stattrib: Simplify handling of the "migration-enabled" property

There's no need for dedicated handlers here if they don't do anything
special.

Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020150554.664422-3-thuth@redhat.com>


  Commit: 832685707fbe52b2525974a100a240338998e544
      
https://github.com/qemu/qemu/commit/832685707fbe52b2525974a100a240338998e544
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M hw/s390x/s390-stattrib.c

  Log Message:
  -----------
  hw/s390x/s390-stattrib: Don't call register_savevm_live() during 
instance_init()

We must not call register_savevm_live() from an instance_init() function
(since this could be called multiple times during device introspection).
Move this to the realize() function instead.

Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020150554.664422-4-thuth@redhat.com>


  Commit: 71daf640d91d49a784ead059c9021070a2107008
      
https://github.com/qemu/qemu/commit/71daf640d91d49a784ead059c9021070a2107008
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M include/migration/vmstate.h

  Log Message:
  -----------
  migration: Create vmstate_register_any()

We have lots of cases where we are using an instance_id==0 when we
should be using VMSTATE_INSTANCE_ID_ANY (-1).  Basically everything
that can have more than one needs to have a proper instance_id or -1
and the system will take one for it.

vmstate_register_any(): We register with -1.

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020090731.28701-2-quintela@redhat.com>


  Commit: 99b16e8ee4789432cc543fde45902796385713c0
      
https://github.com/qemu/qemu/commit/99b16e8ee4789432cc543fde45902796385713c0
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M backends/dbus-vmstate.c
    M backends/tpm/tpm_emulator.c
    M hw/i2c/core.c
    M hw/input/adb.c
    M hw/input/ads7846.c
    M hw/input/stellaris_input.c
    M hw/net/eepro100.c
    M hw/pci/pci.c
    M hw/ppc/spapr_nvdimm.c
    M hw/timer/arm_timer.c
    M hw/virtio/virtio-mem.c

  Log Message:
  -----------
  migration: Use vmstate_register_any()

This are the easiest cases, where we were already using
VMSTATE_INSTANCE_ID_ANY.

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020090731.28701-3-quintela@redhat.com>


  Commit: 1f52c7a80bf19fef5228abe85cdb845088e07274
      
https://github.com/qemu/qemu/commit/1f52c7a80bf19fef5228abe85cdb845088e07274
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M hw/ide/isa.c

  Log Message:
  -----------
  migration: Use vmstate_register_any() for isa-ide

Otherwise qom-test fails.

ok 4 /i386/qom/x-remote
qemu-system-i386: savevm_state_handler_insert: Detected duplicate 
SaveStateEntry: id=isa-ide, instance_id=0x0
Broken pipe
../../../../../mnt/code/qemu/full/tests/qtest/libqtest.c:195: kill_qemu() tried 
to terminate QEMU process but encountered exit status 1 (expected 0)
Aborted (core dumped)
$

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020090731.28701-4-quintela@redhat.com>


  Commit: b23db4cd8218345a7ec75a8ff810896ce3a391b1
      
https://github.com/qemu/qemu/commit/b23db4cd8218345a7ec75a8ff810896ce3a391b1
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M net/slirp.c

  Log Message:
  -----------
  migration: Use VMSTATE_INSTANCE_ID_ANY for slirp

Each user network conection create a new slirp instance.  We register
more than one slirp instance for number 0.

qemu-system-x86_64: -netdev user,id=hs1: savevm_state_handler_insert: Detected 
duplicate SaveStateEntry: id=slirp, instance_id=0x0
Broken pipe
../../../../../mnt/code/qemu/full/tests/qtest/libqtest.c:195: kill_qemu() tried 
to terminate QEMU process but encountered exit status 1 (expected 0)
Aborted (core dumped)

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020090731.28701-6-quintela@redhat.com>


  Commit: 485fb95546e1cc94e77b93ff785bdbfa2c1d3ff1
      
https://github.com/qemu/qemu/commit/485fb95546e1cc94e77b93ff785bdbfa2c1d3ff1
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M hw/intc/xics.c
    M hw/ppc/spapr.c
    M include/migration/vmstate.h
    M migration/savevm.c

  Log Message:
  -----------
  migration: Hack to maintain backwards compatibility for ppc

Current code does:
- register pre_2_10_vmstate_dummy_icp with "icp/server" and instance
  dependinfg on cpu number
- for newer machines, it register vmstate_icp with "icp/server" name
  and instance 0
- now it unregisters "icp/server" for the 1st instance.

This is wrong at many levels:
- we shouldn't have two VMSTATEDescriptions with the same name
- In case this is the only solution that we can came with, it needs to
  be:
  * register pre_2_10_vmstate_dummy_icp
  * unregister pre_2_10_vmstate_dummy_icp
  * register real vmstate_icp

Created vmstate_replace_hack_for_ppc() with warnings left and right
that it is a hack.

CC: Cedric Le Goater <clg@kaod.org>
CC: Daniel Henrique Barboza <danielhb413@gmail.com>
CC: David Gibson <david@gibson.dropbear.id.au>
CC: Greg Kurz <groug@kaod.org>

Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020090731.28701-8-quintela@redhat.com>


  Commit: caa91b3c44cdb2d2921e25eda554d38c527e6c47
      
https://github.com/qemu/qemu/commit/caa91b3c44cdb2d2921e25eda554d38c527e6c47
  Author: Peter Xu <peterx@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: Check in savevm_state_handler_insert for dups

Before finally register one SaveStateEntry, we detect for duplicated
entries.  This could be helpful to notify us asap instead of get
silent migration failures which could be hard to diagnose.

For example, this patch will generate a message like this (if without
previous fixes on x2apic) as long as we wants to boot a VM instance
with "-smp 200,maxcpus=288,sockets=2,cores=72,threads=2" and QEMU will
bail out even before VM starts:

savevm_state_handler_insert: Detected duplicate SaveStateEntry: id=apic, 
instance_id=0x0

Suggested-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020090731.28701-10-quintela@redhat.com>


  Commit: 5b146be3e78d0290670cfc60179218e539a7774f
      
https://github.com/qemu/qemu/commit/5b146be3e78d0290670cfc60179218e539a7774f
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M docs/devel/migration.rst

  Log Message:
  -----------
  migration: Improve example and documentation of vmstate_register()

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020090731.28701-11-quintela@redhat.com>


  Commit: a9500913ab96f59eb8f7e5fc79f80d5d66842102
      
https://github.com/qemu/qemu/commit/a9500913ab96f59eb8f7e5fc79f80d5d66842102
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M audio/audio.c

  Log Message:
  -----------
  migration: Use vmstate_register_any() for audio

We can have more than one audio backend.

void audio_init_audiodevs(void)
{
    AudiodevListEntry *e;

    QSIMPLEQ_FOREACH(e, &audiodevs, next) {
        audio_init(e->dev, &error_fatal);
    }
}

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020090731.28701-12-quintela@redhat.com>


  Commit: 7769fb81efeda6546f4c0fe3324bde91443aabec
      
https://github.com/qemu/qemu/commit/7769fb81efeda6546f4c0fe3324bde91443aabec
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M hw/nvram/eeprom93xx.c

  Log Message:
  -----------
  migration: Use vmstate_register_any() for eeprom93xx

We can have more than one eeprom93xx.
For instance:

e100_nic_realize() -> eeprom93xx_new()

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020090731.28701-13-quintela@redhat.com>


  Commit: c64a59552e44fbae22a565eec3632df59e79d57c
      
https://github.com/qemu/qemu/commit/c64a59552e44fbae22a565eec3632df59e79d57c
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M hw/display/vmware_vga.c

  Log Message:
  -----------
  migration: Use vmstate_register_any() for vmware_vga

I have no idea if we can have more than one vmware_vga device, so play
it safe.

Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231020090731.28701-14-quintela@redhat.com>


  Commit: 62f5da7dd10a594fb30cebb5569dc738456f7131
      
https://github.com/qemu/qemu/commit/62f5da7dd10a594fb30cebb5569dc738456f7131
  Author: Peter Xu <peterx@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Set downtime_start even for postcopy

Postcopy calculates its downtime separately.  It always sets
MigrationState.downtime properly, but not MigrationState.downtime_start.

Make postcopy do the same as other modes on properly recording the
timestamp when the VM is going to be stopped.  Drop the temporary variable
in postcopy_start() along the way.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231030163346.765724-2-peterx@redhat.com>


  Commit: e22ffad03a32d3fc4717561f8af5ef7d9657728d
      
https://github.com/qemu/qemu/commit/e22ffad03a32d3fc4717561f8af5ef7d9657728d
  Author: Peter Xu <peterx@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Add migration_downtime_start|end() helpers

Unify the three users on recording downtimes with the same pair of helpers.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231030163346.765724-3-peterx@redhat.com>


  Commit: 3c80f14272057f77c87fb9971e8c4f603a03289a
      
https://github.com/qemu/qemu/commit/3c80f14272057f77c87fb9971e8c4f603a03289a
  Author: Peter Xu <peterx@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M migration/savevm.c
    M migration/trace-events

  Log Message:
  -----------
  migration: Add per vmstate downtime tracepoints

We have a bunch of savevm_section* tracepoints, they're good to analyze
migration stream, but not always suitable if someone would like to analyze
the migration downtime.  Two major problems:

  - savevm_section* tracepoints are dumping all sections, we only care
    about the sections that contribute to the downtime

  - They don't have an identifier to show the type of sections, so no way
    to filter downtime information either easily.

We can add type into the tracepoints, but instead of doing so, this patch
kept them untouched, instead of adding a bunch of downtime specific
tracepoints, so one can enable "vmstate_downtime*" tracepoints and get a
full picture of how the downtime is distributed across iterative and
non-iterative vmstate save/load.

Note that here both save() and load() need to be traced, because both of
them may contribute to the downtime.  The contribution is not a simple "add
them together", though: consider when the src is doing a save() of device1
while the dest can be load()ing for device2, so they can happen
concurrently.

Tracking both sides make sense because device load() and save() can be
imbalanced, one device can save() super fast, but load() super slow, vice
versa.  We can't figure that out without tracing both.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231030163346.765724-4-peterx@redhat.com>


  Commit: 93bdf888fa5c1b3972e337c8c8fbe7d2bcd29900
      
https://github.com/qemu/qemu/commit/93bdf888fa5c1b3972e337c8c8fbe7d2bcd29900
  Author: Peter Xu <peterx@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

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

  Log Message:
  -----------
  migration: migration_stop_vm() helper

Provide a helper for non-COLO use case of migration to stop a VM.  This
prepares for adding some downtime relevant tracepoints to migration, where
they may or may not apply to COLO.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231030163346.765724-5-peterx@redhat.com>


  Commit: 3e5f3bcdc281fed483b5bbe72050b63d4b41abf5
      
https://github.com/qemu/qemu/commit/3e5f3bcdc281fed483b5bbe72050b63d4b41abf5
  Author: Peter Xu <peterx@redhat.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M migration/migration.c
    M migration/savevm.c
    M migration/trace-events

  Log Message:
  -----------
  migration: Add tracepoints for downtime checkpoints

This patch is inspired by Joao Martin's patch here:

https://lore.kernel.org/r/20230926161841.98464-1-joao.m.martins@oracle.com

Add tracepoints for major downtime checkpoints on both src and dst.  They
share the same tracepoint with a string showing its stage.

Besides the checkpoints in the previous patch, this patch also added
destination checkpoints.

On src, we have these checkpoints added:

  - src-downtime-start: right before vm stops on src
  - src-vm-stopped: after vm is fully stopped
  - src-iterable-saved: after all iterables saved (END sections)
  - src-non-iterable-saved: after all non-iterable saved (FULL sections)
  - src-downtime-stop: migration fully completed

On dst, we have these checkpoints added:

  - dst-precopy-loadvm-completes: after loadvm all done for precopy
  - dst-precopy-bh-*: record BH steps to resume VM for precopy
  - dst-postcopy-bh-*: record BH steps to resume VM for postcopy

On dst side, we don't have a good way to trace total time consumed by
iterable or non-iterable for now.  We can mark it by 1st time receiving a
FULL / END section, but rather than that let's just rely on the other
tracepoints added for vmstates to back up the information.

With this patch, one can enable "vmstate_downtime*" tracepoints and it'll
enable all tracepoints for downtime measurements necessary.

Drop loadvm_postcopy_handle_run_bh() tracepoint alongside, because they
service the same purpose, which was only for postcopy.  We then have
unified prefix for all downtime relevant tracepoints.

Co-developed-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231030163346.765724-6-peterx@redhat.com>


  Commit: eea1e5c9d6fac211cf3fe2d3d7f3be2bf767d421
      
https://github.com/qemu/qemu/commit/eea1e5c9d6fac211cf3fe2d3d7f3be2bf767d421
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

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

  Log Message:
  -----------
  migration: mode parameter

Create a mode migration parameter that can be used to select alternate
migration algorithms.  The default mode is normal, representing the
current migration algorithm, and does not need to be explicitly set.

No functional change until a new mode is added, except that the mode is
shown by the 'info migrate' command.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <1698263069-406971-2-git-send-email-steven.sistare@oracle.com>


  Commit: fa3673e497a1119fbf2c1f948da71907a84385d9
      
https://github.com/qemu/qemu/commit/fa3673e497a1119fbf2c1f948da71907a84385d9
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M include/migration/blocker.h
    M migration/migration.c
    M stubs/migr-blocker.c

  Log Message:
  -----------
  migration: per-mode blockers

Extend the blocker interface so that a blocker can be registered for
one or more migration modes.  The existing interfaces register a
blocker for all modes, and the new interfaces take a varargs list
of modes.

Internally, maintain a separate blocker list per mode.  The same Error
object may be added to multiple lists.  When a block is deleted, it is
removed from every list, and the Error is freed.

No functional change until a new mode is added.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <1698263069-406971-3-git-send-email-steven.sistare@oracle.com>


  Commit: e0ee3a8ff74a47ae8ca147d8192e2c0745dfb51d
      
https://github.com/qemu/qemu/commit/e0ee3a8ff74a47ae8ca147d8192e2c0745dfb51d
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M block/parallels.c
    M block/qcow.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M block/vvfat.c

  Log Message:
  -----------
  cpr: relax blockdev migration blockers

Some blockdevs block migration because they do not support sharing across
hosts and/or do not support dirty bitmaps.  These prohibitions do not apply
if the old and new qemu processes do not run concurrently, and if new qemu
starts on the same host as old, which is the case for cpr.  Narrow the scope
of these blockers so they only apply to normal mode.  They will not block
cpr modes when they are added in subsequent patches.

No functional change until a new mode is added.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <1698263069-406971-4-git-send-email-steven.sistare@oracle.com>


  Commit: 89415796f688036faa88e6dc9ae2f3acfcdc39c8
      
https://github.com/qemu/qemu/commit/89415796f688036faa88e6dc9ae2f3acfcdc39c8
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M hw/scsi/vhost-scsi.c
    M hw/virtio/vhost.c

  Log Message:
  -----------
  cpr: relax vhost migration blockers

vhost blocks migration if logging is not supported to track dirty
memory, and vhost-user blocks it if the log cannot be saved to a shm fd.

vhost-vdpa blocks migration if both hosts do not support all the device's
features using a shadow VQ, for tracking requests and dirty memory.

vhost-scsi blocks migration if storage cannot be shared across hosts,
or if state cannot be migrated.

None of these conditions apply if the old and new qemu processes do
not run concurrently, and if new qemu starts on the same host as old,
which is the case for cpr.

Narrow the scope of these blockers so they only apply to normal mode.
They will not block cpr modes when they are added in subsequent patches.

No functional change until a new mode is added.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <1698263069-406971-5-git-send-email-steven.sistare@oracle.com>


  Commit: a87e64519b027c9b36d9badbd73b13f6475dfb3d
      
https://github.com/qemu/qemu/commit/a87e64519b027c9b36d9badbd73b13f6475dfb3d
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2023-11-01 (Wed, 01 Nov 2023)

  Changed paths:
    M hw/core/qdev-properties-system.c
    M qapi/migration.json

  Log Message:
  -----------
  cpr: reboot mode

Add the cpr-reboot migration mode.  Usage:

$ qemu-system-$arch -monitor stdio ...
QEMU 8.1.50 monitor - type 'help' for more information
(qemu) migrate_set_capability x-ignore-shared on
(qemu) migrate_set_parameter mode cpr-reboot
(qemu) migrate -d file:vm.state
(qemu) info status
VM status: paused (postmigrate)
(qemu) quit

$ qemu-system-$arch -monitor stdio -incoming defer ...
QEMU 8.1.50 monitor - type 'help' for more information
(qemu) migrate_set_capability x-ignore-shared on
(qemu) migrate_set_parameter mode cpr-reboot
(qemu) migrate_incoming file:vm.state
(qemu) info status
VM status: running

In this mode, the migrate command saves state to a file, allowing one
to quit qemu, reboot to an updated kernel, and restart an updated version
of qemu.  The caller must specify a migration URI that writes to and reads
from a file.  Unlike normal mode, the use of certain local storage options
does not block the migration, but the caller must not modify guest block
devices between the quit and restart.  To avoid saving guest RAM to the
file, the memory backend must be shared, and the @x-ignore-shared migration
capability must be set.  Guest RAM must be non-volatile across reboot, such
as by backing it with a dax device, but this is not enforced.  The restarted
qemu arguments must match those used to initially start qemu, plus the
-incoming option.

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <1698263069-406971-6-git-send-email-steven.sistare@oracle.com>


  Commit: e7b428d6bc06a0dfffa7e47fb3b3ee47f1c93499
      
https://github.com/qemu/qemu/commit/e7b428d6bc06a0dfffa7e47fb3b3ee47f1c93499
  Author: Steve Sistare <steven.sistare@oracle.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

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

  Log Message:
  -----------
  tests/qtest: migration: add reboot mode test

[ Maintainer note:

I put the test as flaky because our CI has problems with shared
memory.  We will remove the flaky bits as soon as we get a solution.
]

Signed-off-by: Steve Sistare <steven.sistare@oracle.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <1698263069-406971-7-git-send-email-steven.sistare@oracle.com>


  Commit: 7aa6070d09c5a6c83490599a3c564c64d7e2520a
      
https://github.com/qemu/qemu/commit/7aa6070d09c5a6c83490599a3c564c64d7e2520a
  Author: Peter Xu <peterx@redhat.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M migration/migration.c
    M migration/migration.h
    M migration/qemu-file.c
    M migration/qemu-file.h
    M migration/ram.c
    M migration/ram.h
    M migration/trace-events

  Log Message:
  -----------
  migration: Refactor error handling in source return path

rp_state.error was a boolean used to show error happened in return path
thread.  That's not only duplicating error reporting (migrate_set_error),
but also not good enough in that we only do error_report() and set it to
true, we never can keep a history of the exact error and show it in
query-migrate.

To make this better, a few things done:

  - Use error_setg() rather than error_report() across the whole lifecycle
    of return path thread, keeping the error in an Error*.

  - With above, no need to have mark_source_rp_bad(), remove it, alongside
    with rp_state.error itself.

  - Use migrate_set_error() to apply that captured error to the global
    migration object when error occured in this thread.

  - Do the same when detected qemufile error in source return path

We need to re-export qemu_file_get_error_obj() to do the last one.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231017202633.296756-2-peterx@redhat.com>


  Commit: f8c543e808f20ba936d94cfa5fc592627d8d100c
      
https://github.com/qemu/qemu/commit/f8c543e808f20ba936d94cfa5fc592627d8d100c
  Author: Peter Xu <peterx@redhat.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

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

  Log Message:
  -----------
  migration: Allow network to fail even during recovery

Normally the postcopy recover phase should only exist for a super short
period, that's the duration when QEMU is trying to recover from an
interrupted postcopy migration, during which handshake will be carried out
for continuing the procedure with state changes from PAUSED -> RECOVER ->
POSTCOPY_ACTIVE again.

Here RECOVER phase should be super small, that happens right after the
admin specified a new but working network link for QEMU to reconnect to
dest QEMU.

However there can still be case where the channel is broken in this small
RECOVER window.

If it happens, with current code there's no way the src QEMU can got kicked
out of RECOVER stage. No way either to retry the recover in another channel
when established.

This patch allows the RECOVER phase to fail itself too - we're mostly
ready, just some small things missing, e.g. properly kick the main
migration thread out when sleeping on rp_sem when we found that we're at
RECOVER stage.  When this happens, it fails the RECOVER itself, and
rollback to PAUSED stage.  Then the user can retry another round of
recovery.

To make it even stronger, teach QMP command migrate-pause to explicitly
kick src/dst QEMU out when needed, so even if for some reason the migration
thread didn't got kicked out already by a failing rethrn-path thread, the
admin can also kick it out.

This will be an super, super corner case, but still try to cover that.

One can try to test this with two proxy channels for migration:

  (a) socat unix-listen:/tmp/src.sock,reuseaddr,fork tcp:localhost:10000
  (b) socat tcp-listen:10000,reuseaddr,fork unix:/tmp/dst.sock

So the migration channel will be:

                      (a)          (b)
  src -> /tmp/src.sock -> tcp:10000 -> /tmp/dst.sock -> dst

Then to make QEMU hang at RECOVER stage, one can do below:

  (1) stop the postcopy using QMP command postcopy-pause
  (2) kill the 2nd proxy (b)
  (3) try to recover the postcopy using /tmp/src.sock on src
  (4) src QEMU will go into RECOVER stage but won't be able to continue
      from there, because the channel is actually broken at (b)

Before this patch, step (4) will make src QEMU stuck in RECOVER stage,
without a way to kick the QEMU out or continue the postcopy again.  After
this patch, (4) will quickly fail qemu and bounce back to PAUSED stage.

Admin can also kick QEMU from (4) into PAUSED when needed using
migrate-pause when needed.

After bouncing back to PAUSED stage, one can recover again.

Reported-by: Xiaohui Li <xiaohli@redhat.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2111332
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231017202633.296756-3-peterx@redhat.com>


  Commit: 7bca2bb7bfd2fe5241696fd09cc97f23661d4fc8
      
https://github.com/qemu/qemu/commit/7bca2bb7bfd2fe5241696fd09cc97f23661d4fc8
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

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

  Log Message:
  -----------
  tests/migration-test: Add a test for postcopy hangs during RECOVER

To do so, create two paired sockets, but make them not providing real data.
Feed those fake sockets to src/dst QEMUs for recovery to let them go into
RECOVER stage without going out.  Test that we can always kick it out and
recover again with the right ports.

This patch is based on Fabiano's version here:

https://lore.kernel.org/r/877cowmdu0.fsf@suse.de

Signed-off-by: Fabiano Rosas <farosas@suse.de>
[peterx: write commit message, remove case 1, fix bugs, and more]
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231017202633.296756-4-peterx@redhat.com>


  Commit: 88577f32421cd6f52928b0c69573983d8d9acbd0
      
https://github.com/qemu/qemu/commit/88577f32421cd6f52928b0c69573983d8d9acbd0
  Author: Peter Xu <peterx@redhat.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

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

  Log Message:
  -----------
  migration: Change ram_dirty_bitmap_reload() retval to bool

Now we have a Error** passed into the return path thread stack, which is
even clearer than an int retval.  Change ram_dirty_bitmap_reload() and the
callers to use a bool instead to replace errnos.

Suggested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231017202633.296756-5-peterx@redhat.com>


  Commit: e034f8836492d6a4c64a6a0079877fc3c7e09f36
      
https://github.com/qemu/qemu/commit/e034f8836492d6a4c64a6a0079877fc3c7e09f36
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M qapi/migration.json

  Log Message:
  -----------
  migration: New QAPI type 'MigrateAddress'

This patch introduces well defined MigrateAddress struct
and its related child objects.

The existing argument of 'migrate' and 'migrate-incoming' QAPI
- 'uri' is of type string. The current implementation follows
double encoding scheme for fetching migration parameters like
'uri' and this is not an ideal design.

Motive for intoducing struct level design is to prevent double
encoding of QAPI arguments, as Qemu should be able to directly
use the QAPI arguments without any level of encoding.

Note: this commit only adds the type, and actual uses comes
in later commits.

Fabiano fixed for "file" transport.

Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
Signed-off-by: Het Gala <het.gala@nutanix.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231023182053.8711-2-farosas@suse.de>
Message-Id: <20231023182053.8711-3-farosas@suse.de>


  Commit: 72a8192e225ceafd8494150eb9375c400da50dd6
      
https://github.com/qemu/qemu/commit/72a8192e225ceafd8494150eb9375c400da50dd6
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M migration/exec.c
    M migration/exec.h
    M migration/file.c
    M migration/file.h
    M migration/migration.c

  Log Message:
  -----------
  migration: convert migration 'uri' into 'MigrateAddress'

This patch parses 'migrate' and 'migrate-incoming' QAPI's 'uri'
string containing migration connection related information
and stores them inside well defined 'MigrateAddress' struct.

Fabiano fixed for "file" transport.

Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
Signed-off-by: Het Gala <het.gala@nutanix.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231023182053.8711-4-farosas@suse.de>
Message-ID: <20231023182053.8711-5-farosas@suse.de>


  Commit: 34dfc5e4077039e93667b5a72a2fbbe2f1b96e4b
      
https://github.com/qemu/qemu/commit/34dfc5e4077039e93667b5a72a2fbbe2f1b96e4b
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M migration/migration.c
    M migration/socket.c
    M migration/socket.h

  Log Message:
  -----------
  migration: convert socket backend to accept MigrateAddress

Socket transport backend for 'migrate'/'migrate-incoming' QAPIs accept
new wire protocol of MigrateAddress struct.

It is achived by parsing 'uri' string and storing migration parameters
required for socket connection into well defined SocketAddress struct.

Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
Signed-off-by: Het Gala <het.gala@nutanix.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231023182053.8711-6-farosas@suse.de>


  Commit: 3fa9642ff7d51f7fc3ba68e6ccd13a939d5bd609
      
https://github.com/qemu/qemu/commit/3fa9642ff7d51f7fc3ba68e6ccd13a939d5bd609
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M migration/migration.c
    M migration/rdma.c
    M migration/rdma.h

  Log Message:
  -----------
  migration: convert rdma backend to accept MigrateAddress

RDMA based transport backend for 'migrate'/'migrate-incoming' QAPIs
accept new wire protocol of MigrateAddress struct.

It is achived by parsing 'uri' string and storing migration parameters
required for RDMA connection into well defined InetSocketAddress struct.

Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
Signed-off-by: Het Gala <het.gala@nutanix.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231023182053.8711-7-farosas@suse.de>


  Commit: cbab4face57b829e93e935b3bf52bf9f1bea0e42
      
https://github.com/qemu/qemu/commit/cbab4face57b829e93e935b3bf52bf9f1bea0e42
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M migration/exec.c
    M migration/exec.h
    M migration/migration.c

  Log Message:
  -----------
  migration: convert exec backend to accept MigrateAddress.

Exec transport backend for 'migrate'/'migrate-incoming' QAPIs accept
new wire protocol of MigrateAddress struct.

It is achived by parsing 'uri' string and storing migration parameters
required for exec connection into strList struct.

Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
Signed-off-by: Het Gala <het.gala@nutanix.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231023182053.8711-8-farosas@suse.de>


  Commit: 02afba63e93729e3bdc2ffa900c4e8bc835e1950
      
https://github.com/qemu/qemu/commit/02afba63e93729e3bdc2ffa900c4e8bc835e1950
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M migration/file.c
    M migration/file.h
    M migration/migration.c

  Log Message:
  -----------
  migration: Convert the file backend to the new QAPI syntax

Convert the file: URI to accept a FileMigrationArgs to be compatible
with the new migration QAPI.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231023182053.8711-9-farosas@suse.de>


  Commit: 074dbce5fcce597e61ff6c44d2977458f0ba2f29
      
https://github.com/qemu/qemu/commit/074dbce5fcce597e61ff6c44d2977458f0ba2f29
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M migration/migration-hmp-cmds.c
    M migration/migration.c
    M qapi/migration.json
    M system/vl.c

  Log Message:
  -----------
  migration: New migrate and migrate-incoming argument 'channels'

MigrateChannelList allows to connect accross multiple interfaces.
Add MigrateChannelList struct as argument to migration QAPIs.

We plan to include multiple channels in future, to connnect
multiple interfaces. Hence, we choose 'MigrateChannelList'
as the new argument over 'MigrateChannel' to make migration
QAPIs future proof.

Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
Signed-off-by: Het Gala <het.gala@nutanix.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231023182053.8711-10-farosas@suse.de>


  Commit: d95533e1cdcc06c383b5ca113bfde02152cb1ab5
      
https://github.com/qemu/qemu/commit/d95533e1cdcc06c383b5ca113bfde02152cb1ab5
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: modify migration_channels_and_uri_compatible() for new QAPI syntax

migration_channels_and_uri_compatible() check for transport mechanism
suitable for multifd migration gets executed when the caller calls old
uri syntax. It needs it to be run when using the modern MigrateChannel
QAPI syntax too.

After URI -> 'MigrateChannel' :
migration_channels_and_uri_compatible() ->
migration_channels_and_transport_compatible() passes object as argument
and check for valid transport mechanism.

Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
Signed-off-by: Het Gala <het.gala@nutanix.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231023182053.8711-12-farosas@suse.de>


  Commit: 5994024fd132cf2eb53ca2385fd198b1bd33d446
      
https://github.com/qemu/qemu/commit/5994024fd132cf2eb53ca2385fd198b1bd33d446
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Implement MigrateChannelList to qmp migration flow.

Integrate MigrateChannelList with all transport backends
(socket, exec and rdma) for both src and dest migration
endpoints for qmp migration.

For current series, limit the size of MigrateChannelList
to single element (single interface) as runtime check.

Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
Signed-off-by: Het Gala <het.gala@nutanix.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231023182053.8711-13-farosas@suse.de>


  Commit: 967f2de5c9ec224480b940d5c9fc207ca625b7d8
      
https://github.com/qemu/qemu/commit/967f2de5c9ec224480b940d5c9fc207ca625b7d8
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M migration/migration-hmp-cmds.c
    M migration/migration.c
    M migration/migration.h

  Log Message:
  -----------
  migration: Implement MigrateChannelList to hmp migration flow.

Integrate MigrateChannelList with all transport backends
(socket, exec and rdma) for both src and dest migration
endpoints for hmp migration.

Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
Signed-off-by: Het Gala <het.gala@nutanix.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Message-ID: <20231023182053.8711-14-farosas@suse.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>


  Commit: 8e3766eefbb4036cbc280c1f1a0d28537929f7fb
      
https://github.com/qemu/qemu/commit/8e3766eefbb4036cbc280c1f1a0d28537929f7fb
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

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

  Log Message:
  -----------
  migration: modify test_multifd_tcp_none() to use new QAPI syntax.

modify multifd tcp common test to incorporate the new QAPI
syntax defined.

Suggested-by: Aravind Retnakaran <aravind.retnakaran@nutanix.com>
Signed-off-by: Het Gala <het.gala@nutanix.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231023182053.8711-15-farosas@suse.de>


  Commit: 5cfea2487d0efe03ea2b80654090eb7581cc26aa
      
https://github.com/qemu/qemu/commit/5cfea2487d0efe03ea2b80654090eb7581cc26aa
  Author: Marielle Novastrider <marielle@novastrider.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M linux-user/elfload.c
    M target/arm/cpu-features.h

  Log Message:
  -----------
  linux-user/elfload: Add missing arm64 hwcap values

Specifically DIT, LSE2, and MTE3.

We already expose detection of these via the CPUID interface, but
missed these from ELF hwcaps.

Signed-off-by: Marielle Novastrider <marielle@novastrider.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231029210058.38986-1-marielle@novastrider.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
[PMM: fixed conflict with feature tests moving to cpu-features.h]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: c45460decbda7f94d188d2e18ead91b7c60d4e24
      
https://github.com/qemu/qemu/commit/c45460decbda7f94d188d2e18ead91b7c60d4e24
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/arm/Kconfig
    M hw/arm/stellaris.c
    M hw/input/Kconfig
    M hw/input/meson.build
    A hw/input/stellaris_gamepad.c
    R hw/input/stellaris_input.c
    R include/hw/input/gamepad.h
    A include/hw/input/stellaris_gamepad.h

  Log Message:
  -----------
  hw/input/stellaris_input: Rename to stellaris_gamepad

This source file implements a stellaris gamepad device; rename
it so that it is a closer match to the device name.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231030114802.3671871-2-peter.maydell@linaro.org


  Commit: 281e461820db96a017ebf0fc36474d36feb33902
      
https://github.com/qemu/qemu/commit/281e461820db96a017ebf0fc36474d36feb33902
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/input/stellaris_gamepad.c

  Log Message:
  -----------
  hw/input/stellaris_gamepad: Rename structs to our usual convention

Rename the structs in stellaris_gamepad.c to our now-standard
CamelCase convention.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231030114802.3671871-3-peter.maydell@linaro.org


  Commit: 32400a7e872fe620ab52ec32521e839a71ffb54c
      
https://github.com/qemu/qemu/commit/32400a7e872fe620ab52ec32521e839a71ffb54c
  Author: Kevin Wolf <kwolf@redhat.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/core/qdev-properties.c
    M include/hw/qdev-properties.h

  Log Message:
  -----------
  qdev: Add qdev_prop_set_array()

Instead of exposing the ugly hack of how we represent arrays in qdev (a
static "foo-len" property and after it is set, dynamically created
"foo[i]" properties) to boards, add an interface that allows setting the
whole array at once.

Once all internal users of devices with array properties have been
converted to use this function, we can change the implementation to move
away from this hack.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231030114802.3671871-4-peter.maydell@linaro.org


  Commit: 5f8d505e3a60b957530c7ad9b1214cc440d8b951
      
https://github.com/qemu/qemu/commit/5f8d505e3a60b957530c7ad9b1214cc440d8b951
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/input/stellaris_gamepad.c

  Log Message:
  -----------
  hw/input/stellaris_gamepad: Remove StellarisGamepadButton struct

Currently for each button on the device we have a
StellarisGamepadButton struct which has the irq, keycode and pressed
state for it.  When we convert to qdev, the qdev property and GPIO
APIs are going to require that we have separate arrays for the irqs
and keycodes.  Convert from array-of-structs to three separate arrays
in preparation.

This is a migration compatibility break for the stellaris boards
(lm3s6965evb, lm3s811evb).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231030114802.3671871-5-peter.maydell@linaro.org
--
v1=>v2: mention migration compat break in commit message;
  bump version fields in vmstate


  Commit: a75f336b97a643fc536ba847042f840890e9b378
      
https://github.com/qemu/qemu/commit/a75f336b97a643fc536ba847042f840890e9b378
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/arm/stellaris.c
    M hw/input/stellaris_gamepad.c
    M include/hw/input/stellaris_gamepad.h

  Log Message:
  -----------
  hw/input/stellaris_input: Convert to qdev

Convert the hw/input/stellaris_input device to qdev.

The interface uses an array property for the board to specify the
keycodes to use, so the s->keycodes memory is now allocated by the
array-property machinery.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231030114802.3671871-6-peter.maydell@linaro.org


  Commit: 7c76f397fde313bcdfd3781d64fc28dae0e42df8
      
https://github.com/qemu/qemu/commit/7c76f397fde313bcdfd3781d64fc28dae0e42df8
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/arm/stellaris.c
    M hw/input/stellaris_gamepad.c
    M include/hw/input/stellaris_gamepad.h

  Log Message:
  -----------
  hw/input/stellaris_gamepad: Convert to qemu_input_handler_register()

Now that we have converted to qdev, we can use the newer
qemu_input_handler_register() API rather than the legacy
qemu_add_kbd_event_handler().

Since we only have one user, take the opportunity to convert
from scancodes to QCodes, rather than using
qemu_input_key_value_to_scancode() (which adds an 0xe0
prefix and encodes up/down indication in the scancode,
which our old handler function then had to reverse). That
lets us drop the old state field which was tracking whether
we were halfway through a two-byte scancode.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231030114802.3671871-7-peter.maydell@linaro.org


  Commit: 8472cc5dbe6438c62021c427574077bfd996ba8e
      
https://github.com/qemu/qemu/commit/8472cc5dbe6438c62021c427574077bfd996ba8e
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M MAINTAINERS
    M docs/specs/index.rst
    A docs/specs/vmw_pvscsi-spec.rst
    R docs/specs/vmw_pvscsi-spec.txt

  Log Message:
  -----------
  docs/specs/vmw_pvscsi-spec: Convert to rST

Convert the docs/specs/vmw_pvscsi-spec.txt file to rST format.
This conversion includes some minor wordsmithing of the text
to fix some grammar nits.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 20230927151205.70930-2-peter.maydell@linaro.org


  Commit: 4df3f195ad8bfe9b444578c8b7b6af5d4492e44c
      
https://github.com/qemu/qemu/commit/4df3f195ad8bfe9b444578c8b7b6af5d4492e44c
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M MAINTAINERS
    A docs/specs/edu.rst
    R docs/specs/edu.txt
    M docs/specs/index.rst

  Log Message:
  -----------
  docs/specs/edu: Convert to rST

Convert docs/specs/edu.txt to rST format.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-id: 20230927151205.70930-3-peter.maydell@linaro.org


  Commit: bb1cff6ee044cb13e2e81609a0b9a86378f85f1f
      
https://github.com/qemu/qemu/commit/bb1cff6ee044cb13e2e81609a0b9a86378f85f1f
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M docs/specs/index.rst
    A docs/specs/ivshmem-spec.rst
    R docs/specs/ivshmem-spec.txt
    M docs/specs/pci-ids.rst
    M docs/system/devices/ivshmem.rst

  Log Message:
  -----------
  docs/specs/ivshmem-spec: Convert to rST

Convert docs/specs/ivshmem-spec.txt to rST format.

In converting, I have dropped the sections on the device's command
line interface and usage, as they are already covered by the
user-facing docs in system/devices/ivshmem.rst.

I have also removed the reference to Memnic, because the URL is dead
and a web search suggests that whatever this was it's pretty much
sunk without trace.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20230927151205.70930-4-peter.maydell@linaro.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: 945f3fd4e46405ed37b035922eebe2bfad6bc11e
      
https://github.com/qemu/qemu/commit/945f3fd4e46405ed37b035922eebe2bfad6bc11e
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M docs/specs/index.rst
    A docs/specs/pvpanic.rst
    R docs/specs/pvpanic.txt

  Log Message:
  -----------
  docs/specs/pvpanic: Convert to rST

Convert docs/specs/pvpanic.txt to rST format.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20230927151205.70930-5-peter.maydell@linaro.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: 68ed96bebf12100a78a211796c1231d66c868d33
      
https://github.com/qemu/qemu/commit/68ed96bebf12100a78a211796c1231d66c868d33
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M MAINTAINERS
    M docs/specs/index.rst
    A docs/specs/standard-vga.rst
    R docs/specs/standard-vga.txt
    M hw/display/vga-isa.c
    M hw/display/vga-pci.c

  Log Message:
  -----------
  docs/specs/standard-vga: Convert to rST

Convert docs/specs/standard-vga.txt to rST format.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20230927151205.70930-6-peter.maydell@linaro.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: 6e0c849275250ff9d1b3b2ae32f6a4b1247ed745
      
https://github.com/qemu/qemu/commit/6e0c849275250ff9d1b3b2ae32f6a4b1247ed745
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M MAINTAINERS
    M docs/specs/index.rst
    A docs/specs/virt-ctlr.rst
    R docs/specs/virt-ctlr.txt

  Log Message:
  -----------
  docs/specs/virt-ctlr: Convert to rST

Convert docs/specs/virt-ctlr.txt to rST format.

I added the name of the device to give readers a bit more idea
of which device we're actually documenting here.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20230927151205.70930-7-peter.maydell@linaro.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


  Commit: 096d3ce2316253919cfcb2ac9fead1fd315b2c98
      
https://github.com/qemu/qemu/commit/096d3ce2316253919cfcb2ac9fead1fd315b2c98
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M MAINTAINERS
    M docs/specs/index.rst
    A docs/specs/vmcoreinfo.rst
    R docs/specs/vmcoreinfo.txt

  Log Message:
  -----------
  docs/specs/vmcoreinfo: Convert to rST

Convert docs/specs/vmcoreinfo.txt to rST format.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20230927151205.70930-8-peter.maydell@linaro.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>


  Commit: 912fb3678b8a8469476718d187b62aa8e85d8161
      
https://github.com/qemu/qemu/commit/912fb3678b8a8469476718d187b62aa8e85d8161
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M MAINTAINERS
    M docs/specs/index.rst
    A docs/specs/vmgenid.rst
    R docs/specs/vmgenid.txt

  Log Message:
  -----------
  docs/specs/vmgenid: Convert to rST

Convert docs/specs/vmgenid.txt to rST format.

Reviewed-by: Ani Sinha <anisinha@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20230927151205.70930-9-peter.maydell@linaro.org


  Commit: 662c3eba8f2325b948463ed8ea368f297e9fb81c
      
https://github.com/qemu/qemu/commit/662c3eba8f2325b948463ed8ea368f297e9fb81c
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Make sure that gicv3_internal.h is covered, too

gic_internal.h is already covered by the "ARM cores" section.
Let's adapt the entry with a wildcard to cover gicv3_internal.h, too.

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


  Commit: 7df9a2285761eadbaf3cc6c8850aeb894f91b4f7
      
https://github.com/qemu/qemu/commit/7df9a2285761eadbaf3cc6c8850aeb894f91b4f7
  Author: Philippe Mathieu-Daudé <philmd@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/arm/pxa2xx_gpio.c

  Log Message:
  -----------
  hw/arm/pxa2xx_gpio: Pass CPU using QOM link property

Instead of passing the CPU index and resolving it,
use a QOM link to directly pass the CPU.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231030083706.63685-1-philmd@linaro.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 18736a21417818bf6561fb3ededd64f1f90790c3
      
https://github.com/qemu/qemu/commit/18736a21417818bf6561fb3ededd64f1f90790c3
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/watchdog/trace-events
    M hw/watchdog/wdt_imx2.c

  Log Message:
  -----------
  hw/watchdog/wdt_imx2: Trace MMIO access

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231028122415.14869-2-shentey@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 88a9973e85f4a51a0270c760c03bf6707d8cb1fa
      
https://github.com/qemu/qemu/commit/88a9973e85f4a51a0270c760c03bf6707d8cb1fa
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/watchdog/trace-events
    M hw/watchdog/wdt_imx2.c

  Log Message:
  -----------
  hw/watchdog/wdt_imx2: Trace timer activity

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-id: 20231028122415.14869-3-shentey@gmail.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: bb2fc5b9958f183e63d839a6e6e10cdc4dad0981
      
https://github.com/qemu/qemu/commit/bb2fc5b9958f183e63d839a6e6e10cdc4dad0981
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/misc/imx7_snvs.c
    M hw/misc/trace-events

  Log Message:
  -----------
  hw/misc/imx7_snvs: Trace MMIO access

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231028122415.14869-4-shentey@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 3839aff84cfc6c87189afe8fa0589f2a85dc7b0c
      
https://github.com/qemu/qemu/commit/3839aff84cfc6c87189afe8fa0589f2a85dc7b0c
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/misc/imx6_ccm.c
    M hw/misc/trace-events

  Log Message:
  -----------
  hw/misc/imx6_ccm: Convert DPRINTF to trace events

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231028122415.14869-5-shentey@gmail.com
[PMM: Add "Hz" unit indicator to frequency traces]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: c6e1b31bce523710024bca1b529f2117033003a7
      
https://github.com/qemu/qemu/commit/c6e1b31bce523710024bca1b529f2117033003a7
  Author: Bernhard Beschow <shentey@gmail.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/i2c/pm_smbus.c
    M hw/i2c/trace-events

  Log Message:
  -----------
  hw/i2c/pm_smbus: Convert DPRINTF to trace events

Let the trace messages slightly deviate from the function names
("smb" -> "smbus") being traced in order to avoid conflights with the SMB
protocol.

Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Corey Minyard <cminyard@mvista.com>
Message-id: 20231028122415.14869-6-shentey@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: a6b2c5a04ddae291417d5bfffaa25b13a7d8cd10
      
https://github.com/qemu/qemu/commit/a6b2c5a04ddae291417d5bfffaa25b13a7d8cd10
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M target/arm/cpu.c

  Log Message:
  -----------
  target/arm: Enable FEAT_MOPS insns in user-mode emulation

In user-mode emulation, we need to set the SCTLR_EL1.MSCEn
bit to avoid all the FEAT_MOPS insns UNDEFing.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20231030174000.3792225-2-peter.maydell@linaro.org


  Commit: 63c1b7de0a66e4ff248bdb51a0c3914de4eff034
      
https://github.com/qemu/qemu/commit/63c1b7de0a66e4ff248bdb51a0c3914de4eff034
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M linux-user/elfload.c
    M linux-user/loader.h

  Log Message:
  -----------
  linux-user: Report AArch64 hwcap2 fields above bit 31

The AArch64 ELF hwcap2 field is 64 bits, but our get_elf_hwcap2()
works with uint32_t, so it accidentally fails to report any hwcaps
over bit 31.  Use uint64_t here.

The Arm hwcap2 is only 32 bits (because the ELF format makes these
fields be the size of "long" in the ABI), but since it shares the
prototype declaration for get_elf_hwcap2() it is easier to also
expand it to 64 bits.

The only hwcap fields we implement already that are affected by this
are the HBC and MOPS ones, neither of which were implemented in a
previous release, so this doesn't need backporting to older stable
branches.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231030174000.3792225-3-peter.maydell@linaro.org


  Commit: 854c001f121578c96b023b5db0c5550250505a0e
      
https://github.com/qemu/qemu/commit/854c001f121578c96b023b5db0c5550250505a0e
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M target/arm/tcg/helper-a64.c

  Log Message:
  -----------
  target/arm: Make FEAT_MOPS SET* insns handle Xs == XZR correctly

Most of the registers used by the FEAT_MOPS instructions cannot use
31 as a register field value; this is CONSTRAINED UNPREDICTABLE to
NOP or UNDEF (we UNDEF).  However, it is permitted for the "source
value" register for the memset insns SET* to be 31, which (as usual
for most data-processing insns) means it should be the zero register
XZR. We forgot to handle this case, with the effect that trying to
set memory to zero with a "SET* Xd, Xn, XZR" sets the memory to
the value that happens to be in the low byte of SP.

Handle XZR when getting the SET* data value from the register file.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231030174000.3792225-4-peter.maydell@linaro.org


  Commit: b11293c212c2927fcea1befc50dabec9baba4fcc
      
https://github.com/qemu/qemu/commit/b11293c212c2927fcea1befc50dabec9baba4fcc
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M target/arm/tcg/translate-sve.c
    M tests/tcg/aarch64/Makefile.target
    A tests/tcg/aarch64/sve-str.c

  Log Message:
  -----------
  target/arm: Fix SVE STR increment

The previous change missed updating one of the increments and
one of the MemOps.  Add a test case for all vector lengths.

Cc: qemu-stable@nongnu.org
Fixes: e6dd5e782be ("target/arm: Use tcg_gen_qemu_{ld, st}_i128 in gen_sve_{ld, 
st}r")
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-id: 20231031143215.29764-1-richard.henderson@linaro.org
[PMM: fixed checkpatch nit]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: b80e20dbbfe4b1c609493a591c151407de8ee1bd
      
https://github.com/qemu/qemu/commit/b80e20dbbfe4b1c609493a591c151407de8ee1bd
  Author: Hans-Erik Floryd <hans-erik.floryd@rt-labs.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/char/stm32f2xx_usart.c

  Log Message:
  -----------
  hw/char/stm32f2xx_usart: Extract common IRQ update code to update_irq()

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Hans-Erik Floryd <hans-erik.floryd@rt-labs.com>
Message-id: 20231030151528.1138131-2-hans-erik.floryd@rt-labs.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 2e9cb201a8ad00b8b5eda98260aadabd1fdd0b82
      
https://github.com/qemu/qemu/commit/2e9cb201a8ad00b8b5eda98260aadabd1fdd0b82
  Author: Hans-Erik Floryd <hans-erik.floryd@rt-labs.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/char/stm32f2xx_usart.c

  Log Message:
  -----------
  hw/char/stm32f2xx_usart: Update IRQ when DR is written

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Hans-Erik Floryd <hans-erik.floryd@rt-labs.com>
Message-id: 20231030151528.1138131-3-hans-erik.floryd@rt-labs.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: e9f30b1e7f9e25e73f626596620778b2561f0c2e
      
https://github.com/qemu/qemu/commit/e9f30b1e7f9e25e73f626596620778b2561f0c2e
  Author: Hans-Erik Floryd <hans-erik.floryd@rt-labs.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M include/hw/char/stm32f2xx_usart.h

  Log Message:
  -----------
  hw/char/stm32f2xx_usart: Add more definitions for CR1 register

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Hans-Erik Floryd <hans-erik.floryd@rt-labs.com>
Message-id: 20231030151528.1138131-4-hans-erik.floryd@rt-labs.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 4c09abeae8704970ff03bf2196973f6bf08ab6f9
      
https://github.com/qemu/qemu/commit/4c09abeae8704970ff03bf2196973f6bf08ab6f9
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M target/arm/internals.h
    M target/arm/ptw.c

  Log Message:
  -----------
  target/arm: Correctly propagate stage 1 BTI guarded bit in a two-stage walk

In a two-stage translation, the result of the BTI guarded bit should
be the guarded bit from the first stage of translation, as there is
no BTI guard information in stage two.  Our code tried to do this,
but got it wrong, because we currently have two fields where the GP
bit information might live (ARMCacheAttrs::guarded and
CPUTLBEntryFull::extra::arm::guarded), and we were storing the GP bit
in the latter during the stage 1 walk but trying to copy the former
in combine_cacheattrs().

Remove the duplicated storage, and always use the field in
CPUTLBEntryFull; correctly propagate the stage 1 value to the output
in get_phys_addr_twostage().

Note for stable backports: in v8.0 and earlier the field is named
result->f.guarded, not result->f.extra.arm.guarded.

Cc: qemu-stable@nongnu.org
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1950
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20231031173723.26582-1-peter.maydell@linaro.org


  Commit: 921923583fb2583a277e3b3d6cb8e8e13c622d48
      
https://github.com/qemu/qemu/commit/921923583fb2583a277e3b3d6cb8e8e13c622d48
  Author: Tong Ho <tong.ho@amd.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/misc/Kconfig
    M hw/misc/meson.build
    A hw/misc/xlnx-versal-trng.c
    A include/hw/misc/xlnx-versal-trng.h

  Log Message:
  -----------
  hw/misc: Introduce AMD/Xilix Versal TRNG device

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, in which the generated sequence is required to
   be reproducible after reseeded by the same 384-bit value
   as supplied by guest software.
2) Test mode, in which the generated sequence is required to
   be reproducible ater reseeded by the same 128-bit test
   seed supplied by guest software.
3) TRNG mode, in which non-reproducible sequence is generated
   based on periodic reseed by a suitable entropy source.

This model is only intended for non-real world testing of
guest software, where cryptographically strong PRNG or TRNG
is not needed.

This model supports versions 1 & 2 of the device, with
default to be version 2; the 'hw-version' uint32 property
can be set to 0x0100 to override the default.

Other implemented properties:
- 'forced-prng', uint64
  When set to non-zero, mode 3's entropy source is implemented
  as a deterministic sequence based on the given value and other
  deterministic parameters.
  This option allows the emulation to test guest software using
  mode 3 and to reproduce data-dependent defects.

- 'fips-fault-events', uint32, bit-mask
  bit 3: Triggers the SP800-90B entropy health test fault irq
  bit 1: Triggers the FIPS 140-2 continuous test fault irq

Signed-off-by: Tong Ho <tong.ho@amd.com>
Message-id: 20231031184611.3029156-2-tong.ho@amd.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 3b22376ba48fff06039c90f56372610448fe60e8
      
https://github.com/qemu/qemu/commit/3b22376ba48fff06039c90f56372610448fe60e8
  Author: Tong Ho <tong.ho@amd.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M hw/arm/Kconfig
    M hw/arm/xlnx-versal.c
    M include/hw/arm/xlnx-versal.h

  Log Message:
  -----------
  hw/arm: xlnx-versal-virt: Add AMD/Xilinx TRNG device

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.

Signed-off-by: Tong Ho <tong.ho@amd.com>
Reviewed-by: Francisco Iglesias <frasse.iglesias@gmail.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 20231031184611.3029156-3-tong.ho@amd.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 1c98a821a2b3620c516f3da0d74719ed6f33bced
      
https://github.com/qemu/qemu/commit/1c98a821a2b3620c516f3da0d74719ed6f33bced
  Author: Tong Ho <tong.ho@amd.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M tests/qtest/meson.build
    A tests/qtest/xlnx-versal-trng-test.c

  Log Message:
  -----------
  tests/qtest: Introduce tests for AMD/Xilinx Versal TRNG device

Signed-off-by: Tong Ho <tong.ho@amd.com>
Message-id: 20231031184611.3029156-4-tong.ho@amd.com
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


  Commit: 75b7b25d44a64411ea0ae792d5ebad8ddf22527e
      
https://github.com/qemu/qemu/commit/75b7b25d44a64411ea0ae792d5ebad8ddf22527e
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2023-11-03 (Fri, 03 Nov 2023)

  Changed paths:
    M audio/audio.c
    M backends/dbus-vmstate.c
    M backends/tpm/tpm_emulator.c
    M block/parallels.c
    M block/qcow.c
    M block/vdi.c
    M block/vhdx.c
    M block/vmdk.c
    M block/vpc.c
    M block/vvfat.c
    M docs/devel/migration.rst
    M hw/core/qdev-properties-system.c
    M hw/display/vmware_vga.c
    M hw/i2c/core.c
    M hw/ide/isa.c
    M hw/input/adb.c
    M hw/input/ads7846.c
    M hw/input/stellaris_input.c
    M hw/intc/xics.c
    M hw/ipmi/ipmi_bmc_extern.c
    M hw/ipmi/isa_ipmi_bt.c
    M hw/ipmi/isa_ipmi_kcs.c
    M hw/net/eepro100.c
    M hw/nvram/eeprom93xx.c
    M hw/pci/pci.c
    M hw/ppc/spapr.c
    M hw/ppc/spapr_nvdimm.c
    M hw/s390x/s390-skeys.c
    M hw/s390x/s390-stattrib.c
    M hw/scsi/vhost-scsi.c
    M hw/timer/arm_timer.c
    M hw/virtio/vhost.c
    M hw/virtio/virtio-mem.c
    M include/hw/qdev-properties-system.h
    M include/migration/blocker.h
    M include/migration/misc.h
    M include/migration/vmstate.h
    M migration/exec.c
    M migration/exec.h
    M migration/file.c
    M migration/file.h
    M migration/migration-hmp-cmds.c
    M migration/migration.c
    M migration/migration.h
    M migration/options.c
    M migration/options.h
    M migration/qemu-file.c
    M migration/qemu-file.h
    M migration/ram.c
    M migration/ram.h
    M migration/rdma.c
    M migration/rdma.h
    M migration/savevm.c
    M migration/socket.c
    M migration/socket.h
    M migration/trace-events
    M net/slirp.c
    M qapi/migration.json
    M stubs/migr-blocker.c
    M system/vl.c
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  Merge tag 'migration-20231102-pull-request' of 
https://gitlab.com/juan.quintela/qemu into staging

Migration Pull request (20231102)

Hi

In this pull request:

- migration reboot mode (steve)
  * I disabled the test because our CI don't like programs using so
    much shared memory.  Searching for a fix.
- test for postcopy recover (fabiano)
- MigrateAddress QAPI (het)
- better return path error handling (peter)
- traces for downtime (peter)
- vmstate_register() check for duplicates (juan)
  thomas find better solutions for s390x and ipmi.
  now also works on s390x

Please, apply.

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEGJn/jt6/WMzuA0uC9IfvGFhy1yMFAmVDipMACgkQ9IfvGFhy
# 1yNYnQ/9E5Cywsoqljqa/9FiKBSII2qMrmkfu6JLKqePnsh5pFZiukbudYRuJCCe
# ZTDEmD0NmKRJbDx2xRU1qx/e6gKJy+gz37KP89Buuh/WwZHPboPYtxQpGvCSiH26
# J3i+1+TgaqmkLzcO35wa8tp6gneQclWeAwKgMvdb4cm2pJEhgWRKI62ccyLzxeve
# UCzFQn60t55ETyVZGnRD4YwdTQvGKH+DPlyTuJOLR3DePuvZd8EdH+ypvB4RLAy7
# 3+CuQOxmF5LRXPbpJuAeOsudbmhhHzrO/yL7ZmsiKQTthsJv+SzC1bO94jhQrawZ
# Q7GCii5KpGq0KnRTRKZRGk6XKwxcYRduXMX3R5tXuVmDmCZsjhXzziU8yEdftph8
# 5TJdk1o0Gb043EFu81mrsQYS+9yJqe6sy6m3PTJaec54cAty5ln+c17WOvpAOaSV
# +1phe05ftuVPmQ3KWhbIR/tCmavNLwEZxpVIfyaKJx04bFbtQ9gRpRyURORX4KXc
# s4WXvNirQEohxYBnP4TPvA09xBTW3V08pk/wRDwt0YDXnLiqCltOuxD8r05K8K4B
# MkCLcWj0g7he2tBkF60oz1KSIE0oTB81um9AzLIv5F2YSYLaJM5BIcoC437MR2f4
# MOR7drR1fP5GsRu/SeU5BWvhVq3IvdOxR7G2MLNRJJvl7ZtGXDc=
# =uaqL
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 02 Nov 2023 19:40:03 HKT
# gpg:                using RSA key 1899FF8EDEBF58CCEE034B82F487EF185872D723
# gpg: Good signature from "Juan Quintela <quintela@redhat.com>" [full]
# gpg:                 aka "Juan Quintela <quintela@trasno.org>" [full]
# Primary key fingerprint: 1899 FF8E DEBF 58CC EE03  4B82 F487 EF18 5872 D723

* tag 'migration-20231102-pull-request' of 
https://gitlab.com/juan.quintela/qemu: (40 commits)
  migration: modify test_multifd_tcp_none() to use new QAPI syntax.
  migration: Implement MigrateChannelList to hmp migration flow.
  migration: Implement MigrateChannelList to qmp migration flow.
  migration: modify migration_channels_and_uri_compatible() for new QAPI syntax
  migration: New migrate and migrate-incoming argument 'channels'
  migration: Convert the file backend to the new QAPI syntax
  migration: convert exec backend to accept MigrateAddress.
  migration: convert rdma backend to accept MigrateAddress
  migration: convert socket backend to accept MigrateAddress
  migration: convert migration 'uri' into 'MigrateAddress'
  migration: New QAPI type 'MigrateAddress'
  migration: Change ram_dirty_bitmap_reload() retval to bool
  tests/migration-test: Add a test for postcopy hangs during RECOVER
  migration: Allow network to fail even during recovery
  migration: Refactor error handling in source return path
  tests/qtest: migration: add reboot mode test
  cpr: reboot mode
  cpr: relax vhost migration blockers
  cpr: relax blockdev migration blockers
  migration: per-mode blockers
  ...

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


  Commit: d762bf97931b58839316b68a570eecc6143c9e3e
      
https://github.com/qemu/qemu/commit/d762bf97931b58839316b68a570eecc6143c9e3e
  Author: Stefan Hajnoczi <stefanha@redhat.com>
  Date:   2023-11-03 (Fri, 03 Nov 2023)

  Changed paths:
    M MAINTAINERS
    A docs/specs/edu.rst
    R docs/specs/edu.txt
    M docs/specs/index.rst
    A docs/specs/ivshmem-spec.rst
    R docs/specs/ivshmem-spec.txt
    M docs/specs/pci-ids.rst
    A docs/specs/pvpanic.rst
    R docs/specs/pvpanic.txt
    A docs/specs/standard-vga.rst
    R docs/specs/standard-vga.txt
    A docs/specs/virt-ctlr.rst
    R docs/specs/virt-ctlr.txt
    A docs/specs/vmcoreinfo.rst
    R docs/specs/vmcoreinfo.txt
    A docs/specs/vmgenid.rst
    R docs/specs/vmgenid.txt
    A docs/specs/vmw_pvscsi-spec.rst
    R docs/specs/vmw_pvscsi-spec.txt
    M docs/system/devices/ivshmem.rst
    M hw/arm/Kconfig
    M hw/arm/pxa2xx_gpio.c
    M hw/arm/stellaris.c
    M hw/arm/xlnx-versal.c
    M hw/char/stm32f2xx_usart.c
    M hw/core/qdev-properties.c
    M hw/display/vga-isa.c
    M hw/display/vga-pci.c
    M hw/i2c/pm_smbus.c
    M hw/i2c/trace-events
    M hw/input/Kconfig
    M hw/input/meson.build
    A hw/input/stellaris_gamepad.c
    R hw/input/stellaris_input.c
    M hw/misc/Kconfig
    M hw/misc/imx6_ccm.c
    M hw/misc/imx7_snvs.c
    M hw/misc/meson.build
    M hw/misc/trace-events
    A hw/misc/xlnx-versal-trng.c
    M hw/watchdog/trace-events
    M hw/watchdog/wdt_imx2.c
    M include/hw/arm/xlnx-versal.h
    M include/hw/char/stm32f2xx_usart.h
    R include/hw/input/gamepad.h
    A include/hw/input/stellaris_gamepad.h
    A include/hw/misc/xlnx-versal-trng.h
    M include/hw/qdev-properties.h
    M linux-user/elfload.c
    M linux-user/loader.h
    M target/arm/cpu-features.h
    M target/arm/cpu.c
    M target/arm/internals.h
    M target/arm/ptw.c
    M target/arm/tcg/helper-a64.c
    M target/arm/tcg/translate-sve.c
    M tests/qtest/meson.build
    A tests/qtest/xlnx-versal-trng-test.c
    M tests/tcg/aarch64/Makefile.target
    A tests/tcg/aarch64/sve-str.c

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

target-arm queue:
 * linux-user/elfload: Add missing arm64 hwcap values
 * stellaris-gamepad: Convert to qdev
 * docs/specs: Convert various txt docs to rST
 * MAINTAINERS: Make sure that gicv3_internal.h is covered, too
 * hw/arm/pxa2xx_gpio: Pass CPU using QOM link property
 * hw/watchdog/wdt_imx2: Trace MMIO access and timer activity
 * hw/misc/imx7_snvs: Trace MMIO access
 * hw/misc/imx6_ccm: Convert DPRINTF to trace events
 * hw/i2c/pm_smbus: Convert DPRINTF to trace events
 * target/arm: Enable FEAT_MOPS insns in user-mode emulation
 * linux-user: Report AArch64 hwcap2 fields above bit 31
 * target/arm: Make FEAT_MOPS SET* insns handle Xs == XZR correctly
 * target/arm: Fix SVE STR increment
 * hw/char/stm32f2xx_usart: implement TX interrupts
 * target/arm: Correctly propagate stage 1 BTI guarded bit in a two-stage walk
 * xlnx-versal-virt: Add AMD/Xilinx TRNG device

* tag 'pull-target-arm-20231102' of 
https://git.linaro.org/people/pmaydell/qemu-arm: (33 commits)
  tests/qtest: Introduce tests for AMD/Xilinx Versal TRNG device
  hw/arm: xlnx-versal-virt: Add AMD/Xilinx TRNG device
  hw/misc: Introduce AMD/Xilix Versal TRNG device
  target/arm: Correctly propagate stage 1 BTI guarded bit in a two-stage walk
  hw/char/stm32f2xx_usart: Add more definitions for CR1 register
  hw/char/stm32f2xx_usart: Update IRQ when DR is written
  hw/char/stm32f2xx_usart: Extract common IRQ update code to update_irq()
  target/arm: Fix SVE STR increment
  target/arm: Make FEAT_MOPS SET* insns handle Xs == XZR correctly
  linux-user: Report AArch64 hwcap2 fields above bit 31
  target/arm: Enable FEAT_MOPS insns in user-mode emulation
  hw/i2c/pm_smbus: Convert DPRINTF to trace events
  hw/misc/imx6_ccm: Convert DPRINTF to trace events
  hw/misc/imx7_snvs: Trace MMIO access
  hw/watchdog/wdt_imx2: Trace timer activity
  hw/watchdog/wdt_imx2: Trace MMIO access
  hw/arm/pxa2xx_gpio: Pass CPU using QOM link property
  MAINTAINERS: Make sure that gicv3_internal.h is covered, too
  docs/specs/vmgenid: Convert to rST
  docs/specs/vmcoreinfo: Convert to rST
  ...

Conflicts:
  hw/input/stellaris_input.c
  The qdev conversion in this pull request ("stellaris-gamepad: Convert
  to qdev") eliminates the vmstate_register() call that was converted to
  vmstate_register_any() in the conflicting migration pull request.
  vmstate_register_any() is no longer necessary now that this device has
  been converted to qdev, so take this pull request's version of
  stellaris_gamepad.c over the previous pull request's
  stellaris_input.c (the file was renamed).

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>


Compare: https://github.com/qemu/qemu/compare/4a6a6cb60de8...d762bf97931b



reply via email to

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