qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 9dd00f: userfaultfd: use 1ULL to build ioctl


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 9dd00f: userfaultfd: use 1ULL to build ioctl masks
Date: Fri, 26 Jan 2024 07:14:08 -0800

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: 9dd00fe2f866c5c64956762303a241178981b89e
      
https://github.com/qemu/qemu/commit/9dd00fe2f866c5c64956762303a241178981b89e
  Author: Paolo Bonzini <pbonzini@redhat.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M migration/postcopy-ram.c
    M subprojects/libvhost-user/libvhost-user.c
    M tests/qtest/migration-test.c

  Log Message:
  -----------
  userfaultfd: use 1ULL to build ioctl masks

There is no need to use the Linux-internal __u64 type, 1ULL is
guaranteed to be wide enough.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Link: https://lore.kernel.org/r/20240117160313.175609-1-pbonzini@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 951e4fa02c35b851325d42b3a1841786df2f90e9
      
https://github.com/qemu/qemu/commit/951e4fa02c35b851325d42b3a1841786df2f90e9
  Author: Markus Armbruster <armbru@redhat.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

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

  Log Message:
  -----------
  migration: Plug memory leak on HMP migrate error path

hmp_migrate() leaks @caps when qmp_migrate() fails.  Plug the leak
with g_autoptr().

Fixes: 967f2de5c9ec (migration: Implement MigrateChannelList to hmp migration 
flow.) v8.2.0-rc0
Fixes: CID 1533125
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Link: https://lore.kernel.org/r/20240117140722.3979657-1-armbru@redhat.com
[peterx: fix CID number as reported by Peter Maydell]
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 6b8cfe3e8287e9c18ad5d58545cd874d9304866a
      
https://github.com/qemu/qemu/commit/6b8cfe3e8287e9c18ad5d58545cd874d9304866a
  Author: Peter Xu <peterx@redhat.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M migration/migration.h

  Log Message:
  -----------
  migration: Make threshold_size an uint64_t

It's always used to compare against another uint64_t.  Make it always clear
that it's never a negative.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240117075848.139045-2-peterx@redhat.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 92c8621833ac1d0bb6f2077b9c43309b17773afa
      
https://github.com/qemu/qemu/commit/92c8621833ac1d0bb6f2077b9c43309b17773afa
  Author: Peter Xu <peterx@redhat.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M migration/ram.c

  Log Message:
  -----------
  migration: Drop unnecessary check in ram's pending_exact()

When the migration frameworks fetches the exact pending sizes, it means
this check:

  remaining_size < s->threshold_size

Must have been done already, actually at migration_iteration_run():

    if (must_precopy <= s->threshold_size) {
        qemu_savevm_state_pending_exact(&must_precopy, &can_postcopy);

That should be after one round of ram_state_pending_estimate().  It makes
the 2nd check meaningless and can be dropped.

To say it in another way, when reaching ->state_pending_exact(), we
unconditionally sync dirty bits for precopy.

Then we can drop migrate_get_current() there too.

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


  Commit: bf0d1b29616a03c99ec2b79426de3a884b4ab667
      
https://github.com/qemu/qemu/commit/bf0d1b29616a03c99ec2b79426de3a884b4ab667
  Author: Peter Xu <peterx@redhat.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M scripts/analyze-migration.py

  Log Message:
  -----------
  analyze-migration.py: Remove trick on parsing ramblocks

RAM_SAVE_FLAG_MEM_SIZE contains the total length of ramblock idstr to know
whether scanning of ramblocks is complete.  Drop the trick.

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


  Commit: cd040808a77eb4c649b758625593ce8438d8b4ac
      
https://github.com/qemu/qemu/commit/cd040808a77eb4c649b758625593ce8438d8b4ac
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

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

  Log Message:
  -----------
  tests/qtest/migration: Don't use -cpu max for aarch64

The 'max' cpu is not expected to be stable in terms of features across
QEMU versions, so it should not be expected to migrate.

While the tests currently all pass with -cpu max, that is only because
we're not testing across QEMU versions, which is the more common
use-case for migration.

We've recently introduced compatibility tests that use two different
QEMU versions and the tests are now failing for aarch64. The next
patch adds those tests to CI, so we cannot use the 'max' cpu
anymore. Replace it with the 'neoverse-n1', which has a fixed set of
features.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240118164951.30350-2-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: cbbfa8f5fe9fd5259f8d9f50aa177eef2760d1fd
      
https://github.com/qemu/qemu/commit/cbbfa8f5fe9fd5259f8d9f50aa177eef2760d1fd
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M .gitlab-ci.d/buildtest.yml

  Log Message:
  -----------
  ci: Add a migration compatibility test job

The migration tests have support for being passed two QEMU binaries to
test migration compatibility.

Add a CI job that builds the lastest release of QEMU and another job
that uses that version plus an already present build of the current
version and run the migration tests with the two, both as source and
destination. I.e.:

 old QEMU (n-1) -> current QEMU (development tree)
 current QEMU (development tree) -> old QEMU (n-1)

The purpose of this CI job is to ensure the code we're about to merge
will not cause a migration compatibility problem when migrating the
next release (which will contain that code) to/from the previous
release.

The version of migration-test used will be the one matching the older
QEMU. That way we can avoid special-casing new tests that wouldn't be
compatible with the older QEMU.

Note: for user forks, the version tags need to be pushed to gitlab
otherwise it won't be able to checkout a different version.

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


  Commit: 17e8f5919ec009182b256c8b195c4ed064067f78
      
https://github.com/qemu/qemu/commit/17e8f5919ec009182b256c8b195c4ed064067f78
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M .gitlab-ci.d/buildtest.yml

  Log Message:
  -----------
  ci: Disable migration compatibility tests for aarch64

Until 9.0 is out, we need to keep the aarch64 job disabled because the
tests always use the n-1 version of migration-test. That happens to be
broken for aarch64 in 8.2. Once 9.0 is out, it will become the n-1
version and it will bring the fixed tests.

We can revert this patch when 9.0 releases.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240118164951.30350-4-farosas@suse.de
[peterx: use _SKIPPED rather than _OPTIONAL]
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 347ceb8971c3367a14487d4ffa872997cfc34315
      
https://github.com/qemu/qemu/commit/347ceb8971c3367a14487d4ffa872997cfc34315
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M migration/yank_functions.c

  Log Message:
  -----------
  migration/yank: Use channel features

Stop using outside knowledge about the io channels when registering
yank functions. Query for features instead.

The yank method for all channels used with migration code currently is
to call the qio_channel_shutdown() function, so query for
QIO_CHANNEL_FEATURE_SHUTDOWN. We could add a separate feature in the
future for indicating whether a channel supports yanking, but that
seems overkill at the moment.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20230911171320.24372-9-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 0c165b7f0b8849cccb602b0527eda22bb1d6c6ea
      
https://github.com/qemu/qemu/commit/0c165b7f0b8849cccb602b0527eda22bb1d6c6ea
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Fix use-after-free of migration state object

We're currently allowing the process_incoming_migration_bh bottom-half
to run without holding a reference to the 'current_migration' object,
which leads to a segmentation fault if the BH is still live after
migration_shutdown() has dropped the last reference to
current_migration.

In my system the bug manifests as migrate_multifd() returning true
when it shouldn't and multifd_load_shutdown() calling
multifd_recv_terminate_threads() which crashes due to an uninitialized
multifd_recv_state.

Fix the issue by holding a reference to the object when scheduling the
BH and dropping it before returning from the BH. The same is already
done for the cleanup_bh at migrate_fd_cleanup_schedule().

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1969
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240119233922.32588-2-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 66acde527dffc7ea362cbb814f4867f925b5bcbb
      
https://github.com/qemu/qemu/commit/66acde527dffc7ea362cbb814f4867f925b5bcbb
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Take reference to migration state around bg_migration_vm_start_bh

We need to hold a reference to the current_migration object around
async calls to avoid it been freed while still in use.

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


  Commit: b561ebba68caed92a79966938abfba7648c4b423
      
https://github.com/qemu/qemu/commit/b561ebba68caed92a79966938abfba7648c4b423
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M migration/savevm.c

  Log Message:
  -----------
  migration: Reference migration state around loadvm_postcopy_handle_run_bh

We need to hold a reference to the current_migration object around
async calls to avoid it been freed while still in use. Even on this
load-side function, we might still use the MigrationState, e.g to
check for capabilities.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240119233922.32588-4-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 22f2bef97956e4b64cb71ba823a74203d6861511
      
https://github.com/qemu/qemu/commit/22f2bef97956e4b64cb71ba823a74203d6861511
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M migration/migration.c

  Log Message:
  -----------
  migration: Add a wrapper to qemu_bh_schedule

Wrap qemu_bh_schedule() to ensure we always hold a reference to the
current_migration object.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240119233922.32588-5-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: d8b25e7867010623f457e50a34e07cbfff275aeb
      
https://github.com/qemu/qemu/commit/d8b25e7867010623f457e50a34e07cbfff275aeb
  Author: Fabiano Rosas <farosas@suse.de>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

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

  Log Message:
  -----------
  migration: Centralize BH creation and dispatch

Now that the migration state reference counting is correct, further
wrap the bottom half dispatch process to avoid future issues.

Move BH creation and scheduling together and wrap the dispatch with an
intermediary function that will ensure we always keep the ref/unref
balanced.

Also move the responsibility of deleting the BH into the wrapper and
remove the now unnecessary pointers.

Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20240119233922.32588-6-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: 24b0c2ec956ca225282f81470f7c26f5bb844885
      
https://github.com/qemu/qemu/commit/24b0c2ec956ca225282f81470f7c26f5bb844885
  Author: Het Gala <het.gala@nutanix.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M qapi/migration.json

  Log Message:
  -----------
  Make 'uri' optional for migrate QAPI

'uri' argument should be optional, as 'uri' and 'channels'
arguments are mutally exclusive in nature.

Fixes: 074dbce5fcce (migration: New migrate and migrate-incoming argument 
'channels')
Signed-off-by: Het Gala <het.gala@nutanix.com>
Link: https://lore.kernel.org/r/20240123064219.40514-1-het.gala@nutanix.com
Signed-off-by: Peter Xu <peterx@redhat.com>


  Commit: f64b953fa013685c2fa5953f958f050c0a2fb4dd
      
https://github.com/qemu/qemu/commit/f64b953fa013685c2fa5953f958f050c0a2fb4dd
  Author: Cédric Le Goater <clg@kaod.org>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M tests/avocado/machine_aspeed.py

  Log Message:
  -----------
  tests/avocado/machine_aspeed.py: Update buildroot images to 2023.11

Compared to mainline buildroot, these images have some customization :

- Linux version is bumped to 6.6.3 and built with a custom config
- U-Boot is switched to the one provided by OpenBMC for more support
- defconfigs extra tools for dev

See branch [1] for more details.

There are a few changes since last update, commit ed1f5ff84209. Images
all have a password now and I2C devices have been updated in the Linux
ast2600-evb device tree [2]. Do the necessary adjustements.

[1] https://github.com/legoater/buildroot/commits/aspeed-2023.11
[2] 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9deb10cf160e

Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: 59e82ddc6327c24fd5ca0478d9d5da3353b3f8dc
      
https://github.com/qemu/qemu/commit/59e82ddc6327c24fd5ca0478d9d5da3353b3f8dc
  Author: Philippe Mathieu-Daudé <philmd@linaro.org>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M hw/arm/aspeed.c

  Log Message:
  -----------
  hw/arm/aspeed: Remove dead code

Remove copy/paste typo from commit 6c323aba40 ("hw/arm/aspeed:
Adding new machine Tiogapass in QEMU").

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: 2ec7c31fc4b7f37ee75873c532cbd3165a6baa02
      
https://github.com/qemu/qemu/commit/2ec7c31fc4b7f37ee75873c532cbd3165a6baa02
  Author: Philippe Mathieu-Daudé <philmd@linaro.org>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M hw/arm/aspeed.c

  Log Message:
  -----------
  hw/arm/aspeed: Set default CPU count using aspeed_soc_num_cpus()

Since commit b7f1a0cb76 ("arm/aspeed: Compute the number
of CPUs from the SoC definition") Aspeed machines use the
aspeed_soc_num_cpus() helper to set the number of CPUs.

Use it for the ast1030-evb (commit 356b230ed1 "aspeed/soc:
Add AST1030 support") and supermicrox11-bmc (commit 40a38df55e
"hw/arm/aspeed: Add board model for Supermicro X11 BMC") machines.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: 21240c40f19e8d0cf95c45d9d5affa4684200a76
      
https://github.com/qemu/qemu/commit/21240c40f19e8d0cf95c45d9d5affa4684200a76
  Author: Philippe Mathieu-Daudé <philmd@linaro.org>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M hw/arm/aspeed.c

  Log Message:
  -----------
  hw/arm/aspeed: Init CPU defaults in a common helper

Rework aspeed_soc_num_cpus() as a new init_cpus_defaults()
helper to reduce code duplication.

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: 9591fdc2aa27666ef46e98563d4e6024f29d33bd
      
https://github.com/qemu/qemu/commit/9591fdc2aa27666ef46e98563d4e6024f29d33bd
  Author: Philippe Mathieu-Daudé <philmd@linaro.org>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M hw/arm/aspeed_ast10x0.c
    M hw/arm/aspeed_ast2400.c
    M hw/arm/aspeed_ast2600.c
    M hw/arm/aspeed_soc_common.c
    M include/hw/arm/aspeed_soc.h

  Log Message:
  -----------
  hw/arm/aspeed: Introduce aspeed_soc_cpu_type() helper

In order to alter AspeedSoCClass::cpu_type in the next
commit, introduce the aspeed_soc_cpu_type() helper to
retrieve the per-SoC CPU type from AspeedSoCClass.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: 56091421e61e67c64bc7c26e2b5d2d21950f7576
      
https://github.com/qemu/qemu/commit/56091421e61e67c64bc7c26e2b5d2d21950f7576
  Author: Philippe Mathieu-Daudé <philmd@linaro.org>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M hw/arm/aspeed.c
    M hw/arm/aspeed_ast10x0.c
    M hw/arm/aspeed_ast2400.c
    M hw/arm/aspeed_ast2600.c
    M hw/arm/aspeed_soc_common.c
    M include/hw/arm/aspeed_soc.h

  Log Message:
  -----------
  hw/arm/aspeed: Check for CPU types in machine_run_board_init()

Aspeed SoCs use a single CPU type (set as AspeedSoCClass::cpu_type).
Convert it to a NULL-terminated array (of a single non-NULL element).

Set MachineClass::valid_cpu_types[] to use the common machine code
to provide hints when the requested CPU is invalid (see commit
e702cbc19e ("machine: Improve is_cpu_type_supported()").

Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: 4696d966936bab2d6762c279d08b0f334f3b7636
      
https://github.com/qemu/qemu/commit/4696d966936bab2d6762c279d08b0f334f3b7636
  Author: Ninad Palsule <ninad@linux.ibm.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M hw/Kconfig
    A hw/fsi/Kconfig
    A hw/fsi/lbus.c
    A hw/fsi/meson.build
    A hw/fsi/trace-events
    A hw/fsi/trace.h
    M hw/meson.build
    A include/hw/fsi/lbus.h
    M meson.build

  Log Message:
  -----------
  hw/fsi: Introduce IBM's Local bus

This is a part of patchset where IBM's Flexible Service Interface is
introduced.

The LBUS is modelled to maintain mapped memory for the devices. The
memory is mapped after CFAM config, peek table and FSI slave registers.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
[ clg: - removed lbus_add_device() bc unused
       - removed lbus_create_device() bc used only once
       - removed "address" property
       - updated meson.build to build fsi dir
       - included an empty hw/fsi/trace-events ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: bd6827adb1583dc5987ced55e9496db4e5943caf
      
https://github.com/qemu/qemu/commit/bd6827adb1583dc5987ced55e9496db4e5943caf
  Author: Ninad Palsule <ninad@linux.ibm.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M hw/fsi/lbus.c
    M hw/fsi/trace-events
    M include/hw/fsi/lbus.h

  Log Message:
  -----------
  hw/fsi: Introduce IBM's scratchpad device

This is a part of patchset where IBM's Flexible Service Interface is
introduced.

The scratchpad provides a set of non-functional registers. The firmware
is free to use them, hardware does not support any special management
support. The scratchpad registers can be read or written from LBUS
slave. The scratch pad is managed under FSI CFAM state.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
[ clg: - moved object FSIScratchPad under FSICFAMState
       - moved FSIScratchPad code under cfam.c ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: 15c2e286a87ba0330c21959dfc133dcbbb109ca5
      
https://github.com/qemu/qemu/commit/15c2e286a87ba0330c21959dfc133dcbbb109ca5
  Author: Ninad Palsule <ninad@linux.ibm.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    A hw/fsi/fsi.c
    M hw/fsi/meson.build
    A include/hw/fsi/fsi.h

  Log Message:
  -----------
  hw/fsi: Introduce IBM's FSI Bus

This is a part of patchset where FSI bus is introduced.

The FSI bus is a simple bus where FSI master is attached.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
[ clg: - removed include/hw/fsi/engine-scratchpad.h and
         hw/fsi/engine-scratchpad.c
       - dropped FSI_SCRATCHPAD
       - included FSIBus definition
       - dropped hw/fsi/trace-events changes ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: bd22ac3307f06ea90d58341d3e5716700868a0ea
      
https://github.com/qemu/qemu/commit/bd22ac3307f06ea90d58341d3e5716700868a0ea
  Author: Ninad Palsule <ninad@linux.ibm.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M hw/fsi/fsi.c
    M hw/fsi/trace-events
    M include/hw/fsi/fsi.h

  Log Message:
  -----------
  hw/fsi: Introduce IBM's fsi-slave model

This is a part of patchset where IBM's Flexible Service Interface is
introduced.

The FSI slave: The slave is the terminal point of the FSI bus for
FSI symbols addressed to it. Slaves can be cascaded off of one
another. The slave's configuration registers appear in address space
of the CFAM to which it is attached.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: 6bd84d5531753e41b726d4bf14299d39453f8892
      
https://github.com/qemu/qemu/commit/6bd84d5531753e41b726d4bf14299d39453f8892
  Author: Ninad Palsule <ninad@linux.ibm.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    A hw/fsi/cfam.c
    M hw/fsi/meson.build
    M hw/fsi/trace-events
    A include/hw/fsi/cfam.h

  Log Message:
  -----------
  hw/fsi: Introduce IBM's cfam

This is a part of patchset where IBM's Flexible Service Interface is
introduced.

The Common FRU Access Macro (CFAM), an address space containing
various "engines" that drive accesses on busses internal and external
to the POWER chip. Examples include the SBEFIFO and I2C masters. The
engines hang off of an internal Local Bus (LBUS) which is described
by the CFAM configuration block.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
[ clg: - moved object FSIScratchPad under FSICFAMState
       - moved FSIScratchPad code under cfam.c
       - introduced fsi_cfam_instance_init()
       - reworked fsi_cfam_realize() ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: 7d3122bb97f6c4d04c474648d4a47201f3279662
      
https://github.com/qemu/qemu/commit/7d3122bb97f6c4d04c474648d4a47201f3279662
  Author: Ninad Palsule <ninad@linux.ibm.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    A hw/fsi/fsi-master.c
    M hw/fsi/meson.build
    M hw/fsi/trace-events
    A include/hw/fsi/fsi-master.h

  Log Message:
  -----------
  hw/fsi: Introduce IBM's FSI master

This is a part of patchset where IBM's Flexible Service Interface is
introduced.

This commit models the FSI master. CFAM is hanging out of FSI master which is a 
bus controller.

The FSI master: A controller in the platform service processor (e.g.
BMC) driving CFAM engine accesses into the POWER chip. At the
hardware level FSI is a bit-based protocol supporting synchronous and
DMA-driven accesses of engines in a CFAM.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
[ clg: - move FSICFAMState object under FSIMasterState
       - introduced fsi_master_init()
       - reworked fsi_master_realize()
       - dropped FSIBus definition ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: 59b3572c01a3645ea09e1277ce1fc04da0b25b70
      
https://github.com/qemu/qemu/commit/59b3572c01a3645ea09e1277ce1fc04da0b25b70
  Author: Ninad Palsule <ninad@linux.ibm.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M hw/arm/Kconfig
    M hw/fsi/Kconfig
    A hw/fsi/aspeed_apb2opb.c
    M hw/fsi/meson.build
    M hw/fsi/trace-events
    A include/hw/fsi/aspeed_apb2opb.h

  Log Message:
  -----------
  hw/fsi: Aspeed APB2OPB & On-chip peripheral bus

This is a part of patchset where IBM's Flexible Service Interface is
introduced.

An APB-to-OPB bridge enabling access to the OPB from the ARM core in
the AST2600. Hardware limitations prevent the OPB from being directly
mapped into APB, so all accesses are indirect through the bridge.

The On-Chip Peripheral Bus (OPB): A low-speed bus typically found in
POWER processors. This now makes an appearance in the ASPEED SoC due
to tight integration of the FSI master IP with the OPB, mainly the
existence of an MMIO-mapping of the CFAM address straight onto a
sub-region of the OPB address space.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
[ clg: - moved FSIMasterState under AspeedAPB2OPBState
       - modified fsi_opb_fsi_master_address() and
         fsi_opb_opb2fsi_address()
       - instroduced fsi_aspeed_apb2opb_init()
       - reworked fsi_aspeed_apb2opb_realize()
       - removed FSIMasterState object and fsi_opb_realize()
       - simplified OPBus ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: dba014f180538db363a3e228d5976c20e899c510
      
https://github.com/qemu/qemu/commit/dba014f180538db363a3e228d5976c20e899c510
  Author: Ninad Palsule <ninad@linux.ibm.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M hw/arm/aspeed_ast2600.c
    M include/hw/arm/aspeed_soc.h

  Log Message:
  -----------
  hw/arm: Hook up FSI module in AST2600

This patchset introduces IBM's Flexible Service Interface(FSI).

Time for some fun with inter-processor buses. FSI allows a service
processor access to the internal buses of a host POWER processor to
perform configuration or debugging.

FSI has long existed in POWER processes and so comes with some baggage,
including how it has been integrated into the ASPEED SoC.

Working backwards from the POWER processor, the fundamental pieces of
interest for the implementation are:

1. The Common FRU Access Macro (CFAM), an address space containing
   various "engines" that drive accesses on buses internal and external
   to the POWER chip. Examples include the SBEFIFO and I2C masters. The
   engines hang off of an internal Local Bus (LBUS) which is described
   by the CFAM configuration block.

2. The FSI slave: The slave is the terminal point of the FSI bus for
   FSI symbols addressed to it. Slaves can be cascaded off of one
   another. The slave's configuration registers appear in address space
   of the CFAM to which it is attached.

3. The FSI master: A controller in the platform service processor (e.g.
   BMC) driving CFAM engine accesses into the POWER chip. At the
   hardware level FSI is a bit-based protocol supporting synchronous and
   DMA-driven accesses of engines in a CFAM.

4. The On-Chip Peripheral Bus (OPB): A low-speed bus typically found in
   POWER processors. This now makes an appearance in the ASPEED SoC due
   to tight integration of the FSI master IP with the OPB, mainly the
   existence of an MMIO-mapping of the CFAM address straight onto a
   sub-region of the OPB address space.

5. An APB-to-OPB bridge enabling access to the OPB from the ARM core in
   the AST2600. Hardware limitations prevent the OPB from being directly
   mapped into APB, so all accesses are indirect through the bridge.

The implementation appears as following in the qemu device tree:

    (qemu) info qtree
    bus: main-system-bus
      type System
      ...
      dev: aspeed.apb2opb, id ""
        gpio-out "sysbus-irq" 1
        mmio 000000001e79b000/0000000000001000
        bus: opb.1
          type opb
          dev: fsi.master, id ""
            bus: fsi.bus.1
              type fsi.bus
              dev: cfam.config, id ""
              dev: cfam, id ""
                bus: fsi.lbus.1
                  type lbus
                  dev: scratchpad, id ""
                    address = 0 (0x0)
        bus: opb.0
          type opb
          dev: fsi.master, id ""
            bus: fsi.bus.0
              type fsi.bus
              dev: cfam.config, id ""
              dev: cfam, id ""
                bus: fsi.lbus.0
                  type lbus
                  dev: scratchpad, id ""
                    address = 0 (0x0)

The LBUS is modelled to maintain the qdev bus hierarchy and to take
advantage of the object model to automatically generate the CFAM
configuration block. The configuration block presents engines in the
order they are attached to the CFAM's LBUS. Engine implementations
should subclass the LBusDevice and set the 'config' member of
LBusDeviceClass to match the engine's type.

CFAM designs offer a lot of flexibility, for instance it is possible for
a CFAM to be simultaneously driven from multiple FSI links. The modeling
is not so complete; it's assumed that each CFAM is attached to a single
FSI slave (as a consequence the CFAM subclasses the FSI slave).

As for FSI, its symbols and wire-protocol are not modelled at all. This
is not necessary to get FSI off the ground thanks to the mapping of the
CFAM address space onto the OPB address space - the models follow this
directly and map the CFAM memory region into the OPB's memory region.
Future work includes supporting more advanced accesses that drive the
FSI master directly rather than indirectly via the CFAM mapping, which
will require implementing the FSI state machine and methods for each of
the FSI symbols on the slave. Further down the track we can also look at
supporting the bitbanged SoftFSI drivers in Linux by extending the FSI
slave model to resolve sequences of GPIO IRQs into FSI symbols, and
calling the associated symbol method on the slave to map the access onto
the CFAM.

Testing:
    Tested by reading cfam config address 0 on rainier machine type.

    root@p10bmc:~# pdbg -a getcfam 0x0
    p0: 0x0 = 0xc0022d15

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: 418ec914617c6318ad10a1f736482d0ca20208cc
      
https://github.com/qemu/qemu/commit/418ec914617c6318ad10a1f736482d0ca20208cc
  Author: Ninad Palsule <ninad@linux.ibm.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    A tests/qtest/aspeed-fsi-test.c
    M tests/qtest/meson.build

  Log Message:
  -----------
  hw/fsi: Added qtest

Added basic qtests for FSI model.

Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Acked-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: c9dc3e75575d0960b14b54a07fb311597657e1fa
      
https://github.com/qemu/qemu/commit/c9dc3e75575d0960b14b54a07fb311597657e1fa
  Author: Ninad Palsule <ninad@linux.ibm.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    A docs/specs/fsi.rst
    M docs/specs/index.rst

  Log Message:
  -----------
  hw/fsi: Added FSI documentation

Documentation for IBM FSI model.

Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
[ clg : - Removed source file list
        - Fixed aspeed machine reference ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: b40769f4b49d15485ffaaa7acade3e3593ee6daa
      
https://github.com/qemu/qemu/commit/b40769f4b49d15485ffaaa7acade3e3593ee6daa
  Author: Ninad Palsule <ninad@linux.ibm.com>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  hw/fsi: Update MAINTAINER list

Added maintainer for IBM FSI model

Signed-off-by: Ninad Palsule <ninad@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>


  Commit: cb12c2e33132db422ea9ae33077527d7d468a784
      
https://github.com/qemu/qemu/commit/cb12c2e33132db422ea9ae33077527d7d468a784
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M .gitlab-ci.d/buildtest.yml
    M migration/migration-hmp-cmds.c
    M migration/migration.c
    M migration/migration.h
    M migration/postcopy-ram.c
    M migration/ram.c
    M migration/savevm.c
    M migration/yank_functions.c
    M qapi/migration.json
    M scripts/analyze-migration.py
    M subprojects/libvhost-user/libvhost-user.c
    M tests/qtest/migration-test.c

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

Migration pull for 9.0

- Fabiano's patchset to fix migration state references in BHs
- Fabiano's new 'n-1' migration test for CI
- Het's fix on making "uri" optional in QMP migrate cmd
- Markus's HMP leak fix reported by Coverity
- Paolo's cleanup on uffd to replace u64 usage
- Peter's small migration cleanup series all over the places

# -----BEGIN PGP SIGNATURE-----
#
# iIgEABYKADAWIQS5GE3CDMRX2s990ak7X8zN86vXBgUCZbMyOBIccGV0ZXJ4QHJl
# ZGhhdC5jb20ACgkQO1/MzfOr1wYwOwEAumBykqExu4uf/JAIoZM4QHH1q0bmrunf
# uYGSxA4K48cA/j0syZ5O3c4aZVLrMiFJ9NKIsiT/RIWpmhZrf8dX8YYK
# =50bu
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 26 Jan 2024 04:16:56 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-20240126-pull-request' of https://gitlab.com/peterx/qemu:
  Make 'uri' optional for migrate QAPI
  migration: Centralize BH creation and dispatch
  migration: Add a wrapper to qemu_bh_schedule
  migration: Reference migration state around loadvm_postcopy_handle_run_bh
  migration: Take reference to migration state around bg_migration_vm_start_bh
  migration: Fix use-after-free of migration state object
  migration/yank: Use channel features
  ci: Disable migration compatibility tests for aarch64
  ci: Add a migration compatibility test job
  tests/qtest/migration: Don't use -cpu max for aarch64
  analyze-migration.py: Remove trick on parsing ramblocks
  migration: Drop unnecessary check in ram's pending_exact()
  migration: Make threshold_size an uint64_t
  migration: Plug memory leak on HMP migrate error path
  userfaultfd: use 1ULL to build ioctl masks

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


  Commit: 627bb5cd9f3603e6673599dfd0eb869a57df8026
      
https://github.com/qemu/qemu/commit/627bb5cd9f3603e6673599dfd0eb869a57df8026
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2024-01-26 (Fri, 26 Jan 2024)

  Changed paths:
    M MAINTAINERS
    A docs/specs/fsi.rst
    M docs/specs/index.rst
    M hw/Kconfig
    M hw/arm/Kconfig
    M hw/arm/aspeed.c
    M hw/arm/aspeed_ast10x0.c
    M hw/arm/aspeed_ast2400.c
    M hw/arm/aspeed_ast2600.c
    M hw/arm/aspeed_soc_common.c
    A hw/fsi/Kconfig
    A hw/fsi/aspeed_apb2opb.c
    A hw/fsi/cfam.c
    A hw/fsi/fsi-master.c
    A hw/fsi/fsi.c
    A hw/fsi/lbus.c
    A hw/fsi/meson.build
    A hw/fsi/trace-events
    A hw/fsi/trace.h
    M hw/meson.build
    M include/hw/arm/aspeed_soc.h
    A include/hw/fsi/aspeed_apb2opb.h
    A include/hw/fsi/cfam.h
    A include/hw/fsi/fsi-master.h
    A include/hw/fsi/fsi.h
    A include/hw/fsi/lbus.h
    M meson.build
    M tests/avocado/machine_aspeed.py
    A tests/qtest/aspeed-fsi-test.c
    M tests/qtest/meson.build

  Log Message:
  -----------
  Merge tag 'pull-aspeed-20240126' of https://github.com/legoater/qemu into 
staging

aspeed queue:

* Update of buildroot images to 2023.11 (6.6.3 kernel)
* Check of the valid CPU type supported by aspeed machines
* Simplified models for the IBM's FSI bus and the Aspeed
  controller bridge

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmWzs/gACgkQUaNDx8/7
# 7KG1gxAAytzstakrGd8hiD4qUemlPwH4IUaIgWIOG9PLYOXKvfDOEFNSVc61cM8n
# YdzOVeY+MDoGx66tfE7TdQmFuT7ROuBfIerAsEw2pLq1c7Q22X8vh2IiHZ4VAZ17
# Bg8y4hpi0qgqcxW6Su+Gdv6yjEcZXYE6q1Kwp0wT5/I83nPilIJS+P/6k33dSz2H
# FHcryH2DtPmOeFF0HAs1SeZzW24acIcS7ADGXICxbxWnQUuVbSSSWIX5lJiGTwz+
# jbZjU8S1vXQdvFIf+qd61BZFVSlXk/e4KAnu9Wuwoj6f9TAd2wUqnT+V4NMnZXZ2
# BzU09JPYtJBgetKunpT3/0WgH5XRBsZdD1tGpZnyg9K+EtrOWZ0uCgt56YuzK3+R
# s45rGzCSK3Vf5gsgSFJfjHuSKCOPD9RpOsykxVL2fHYR/sr0XzReEN0pf9LHtVA+
# CmjfBFdHE0YgswOz3LEUDyNvF2zkIyM1TEUFznCusD0Trmfte+ukaXtK4pd/VLmw
# qCMbMtiGaU5YstFiVCVSxDoBJFjgCpryKYjH6rOCIF66n/ZJ81gd7RQxfMwfh6mj
# QHoxTYRUYonYvgK3vHu8A3EfYBwtHueRTdElpVs5tZUnOv/MyMnjOsSPojk4luHb
# qEIbQ+SOYira5FMOf9G4H7o2tLw9/rNeIwbt/akRoxVcW0bX+tQ=
# =QrJD
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 26 Jan 2024 13:30:32 GMT
# gpg:                using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
# gpg: Good signature from "Cédric Le Goater <clg@kaod.org>" [undefined]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: A0F6 6548 F048 95EB FE6B  0B60 51A3 43C7 CFFB ECA1

* tag 'pull-aspeed-20240126' of https://github.com/legoater/qemu:
  hw/fsi: Update MAINTAINER list
  hw/fsi: Added FSI documentation
  hw/fsi: Added qtest
  hw/arm: Hook up FSI module in AST2600
  hw/fsi: Aspeed APB2OPB & On-chip peripheral bus
  hw/fsi: Introduce IBM's FSI master
  hw/fsi: Introduce IBM's cfam
  hw/fsi: Introduce IBM's fsi-slave model
  hw/fsi: Introduce IBM's FSI Bus
  hw/fsi: Introduce IBM's scratchpad device
  hw/fsi: Introduce IBM's Local bus
  hw/arm/aspeed: Check for CPU types in machine_run_board_init()
  hw/arm/aspeed: Introduce aspeed_soc_cpu_type() helper
  hw/arm/aspeed: Init CPU defaults in a common helper
  hw/arm/aspeed: Set default CPU count using aspeed_soc_num_cpus()
  hw/arm/aspeed: Remove dead code
  tests/avocado/machine_aspeed.py: Update buildroot images to 2023.11

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


Compare: https://github.com/qemu/qemu/compare/b9c4a2018aa9...627bb5cd9f36



reply via email to

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