qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] f7f2f9: s390-ccw: Getting rid of ulong


From: Richard Henderson
Subject: [Qemu-commits] [qemu/qemu] f7f2f9: s390-ccw: Getting rid of ulong
Date: Thu, 29 Jun 2023 23:17:42 -0700

  Branch: refs/heads/staging
  Home:   https://github.com/qemu/qemu
  Commit: f7f2f96f33774a32dae2c3d183c6f02aa97639fb
      
https://github.com/qemu/qemu/commit/f7f2f96f33774a32dae2c3d183c6f02aa97639fb
  Author: Juan Quintela <quintela@redhat.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M pc-bios/s390-ccw/helper.h
    M pc-bios/s390-ccw/s390-ccw.h
    M pc-bios/s390-ccw/virtio-blkdev.c
    M pc-bios/s390-ccw/virtio-scsi.c
    M pc-bios/s390-ccw/virtio-scsi.h
    M pc-bios/s390-ccw/virtio.c
    M pc-bios/s390-ccw/virtio.h

  Log Message:
  -----------
  s390-ccw: Getting rid of ulong

Any good reason why this still exist?
I can understand u* and __u* to be linux kernel like, but ulong?

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-Id: <20230629104821.194859-2-thuth@redhat.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 0c2a6e124228caf776647050cfbba4faedf950fb
      
https://github.com/qemu/qemu/commit/0c2a6e124228caf776647050cfbba4faedf950fb
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M pc-bios/s390-ccw/cio.h
    M pc-bios/s390-ccw/s390-ccw.h

  Log Message:
  -----------
  pc-bios/s390-ccw: Get rid of the the __u* types

The types starting with double underscores have likely been
introduced into the s390-ccw bios to be able to re-use structs
from the Linux kernel in the past, but the corresponding structs
in cio.h have been changed there a long time ago already to not
use the variants with the double underscores anymore:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/drivers/s390/cio/cio.h?id=cd6b4f27b9bb2a

So it would be good to replace these in the s390-ccw bios now, too.

Message-Id: <20230627114101.122231-1-thuth@redhat.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 442ef32ee5b6059a8f247fb2def9d449578d0a89
      
https://github.com/qemu/qemu/commit/442ef32ee5b6059a8f247fb2def9d449578d0a89
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M pc-bios/s390-ccw/Makefile

  Log Message:
  -----------
  pc-bios/s390-ccw/Makefile: Use -z noexecstack to silence linker warning

Recent versions of ld complain when linking the s390-ccw bios:

 /usr/bin/ld: warning: start.o: missing .note.GNU-stack section implies
              executable stack
 /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in
              a future version of the linker

We can silence the warning by telling the linker to mark the stack
as not executable.

Message-Id: <20230622130822.396793-1-thuth@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: f52420fa4fd9f519dc42c20d2616aba4149adc25
      
https://github.com/qemu/qemu/commit/f52420fa4fd9f519dc42c20d2616aba4149adc25
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M pc-bios/s390-ccw/start.S

  Log Message:
  -----------
  pc-bios/s390-ccw: Fix indentation in start.S

start.S is currently indented with a mixture of spaces and tabs, which
is quite ugly. QEMU coding style says indentation should be 4 spaces,
and this is also what we are using in the assembler files in the
tests/tcg/s390x/ folder already, so let's adjust start.S accordingly.

Reviewed-by: Cédric Le Goater <clg@redhat.com>
Message-Id: <20230627074703.99608-2-thuth@redhat.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 74fe98ee7fb3344dbd085d1fa32c0dc2fc2c831f
      
https://github.com/qemu/qemu/commit/74fe98ee7fb3344dbd085d1fa32c0dc2fc2c831f
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M pc-bios/s390-ccw/start.S

  Log Message:
  -----------
  pc-bios/s390-ccw: Provide space for initial stack frame in start.S

Providing the space of a stack frame is the duty of the caller,
so we should reserve 160 bytes before jumping into the main function.
Otherwise the main() function might write past the stack array.

While we're at it, add a proper STACK_SIZE macro for the stack size
instead of using magic numbers (this is also required for the following
patch).

Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Message-Id: <20230627074703.99608-3-thuth@redhat.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: e31f08dc748bad980f2092be165bd091f9cf3c48
      
https://github.com/qemu/qemu/commit/e31f08dc748bad980f2092be165bd091f9cf3c48
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M pc-bios/s390-ccw/main.c
    M pc-bios/s390-ccw/netmain.c
    M pc-bios/s390-ccw/s390-ccw.h
    M pc-bios/s390-ccw/start.S
    M tests/tcg/s390x/head64.S

  Log Message:
  -----------
  pc-bios/s390-ccw: Move the stack array into start.S

The stack array is only referenced from the start-up code (which is
shared between the s390-ccw.img and the s390-netboot.img), but it is
currently declared twice, once in main.c and once in netmain.c.
It makes more sense to declare this in start.S instead - which will
also be helpful in the next patch, since we need to mention the .bss
section in start.S in that patch.

While we're at it, let's also drop the huge alignment of the stack,
since there is no technical requirement for aligning it to page
boundaries.

Message-Id: <20230627074703.99608-4-thuth@redhat.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 7cd50cbe4ca3e2860b31b06ec92c17c54bd82d48
      
https://github.com/qemu/qemu/commit/7cd50cbe4ca3e2860b31b06ec92c17c54bd82d48
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M pc-bios/s390-ccw/start.S

  Log Message:
  -----------
  pc-bios/s390-ccw: Don't use __bss_start with the "larl" instruction

start.S currently cannot be compiled with Clang 16 and binutils 2.40:

 ld: start.o(.text+0x8): misaligned symbol `__bss_start' (0xc1e5) for
     relocation R_390_PC32DBL

According to the built-in linker script of ld, the symbol __bss_start
can actually point *before* the .bss section and does not need to have
any alignment, so in certain situations (like when using the internal
assembler of Clang), the __bss_start symbol can indeed be unaligned
and thus it is not suitable for being used with the "larl" instruction
that needs an address that is at least aligned to halfwords.
The problem went unnoticed so far since binutils <= 2.39 did not
check the alignment, but starting with binutils 2.40, such unaligned
addresses are now refused.

Fix it by loading the address indirectly instead.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=2216662
Reported-by: Miroslav Rezanina <mrezanin@redhat.com>
Suggested-by:  Andreas Krebbel <andreas.krebbel@de.ibm.com>
Message-Id: <20230629104821.194859-8-thuth@redhat.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: b806bc8d9cc16172f0cf2c9e42ca1d75b72f6555
      
https://github.com/qemu/qemu/commit/b806bc8d9cc16172f0cf2c9e42ca1d75b72f6555
  Author: Thomas Huth <thuth@redhat.com>
  Date:   2023-06-29 (Thu, 29 Jun 2023)

  Changed paths:
    M pc-bios/s390-ccw.img
    M pc-bios/s390-netboot.img

  Log Message:
  -----------
  pc-bios: Update the s390 bios images with the recent changes

The startup code of the bios has slightly been changed, apart
from that, there should not be any functional changes this time.

Signed-off-by: Thomas Huth <thuth@redhat.com>


  Commit: 6574232fff6a810e1882c98aa7dcf23d6afe9a31
      
https://github.com/qemu/qemu/commit/6574232fff6a810e1882c98aa7dcf23d6afe9a31
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M migration/options.c
    M migration/options.h
    M qapi/migration.json

  Log Message:
  -----------
  migration: Add switchover ack capability

Migration downtime estimation is calculated based on bandwidth and
remaining migration data. This assumes that loading of migration data in
the destination takes a negligible amount of time and that downtime
depends only on network speed.

While this may be true for RAM, it's not necessarily true for other
migrated devices. For example, loading the data of a VFIO device in the
destination might require from the device to allocate resources, prepare
internal data structures and so on. These operations can take a
significant amount of time which can increase migration downtime.

This patch adds a new capability "switchover ack" that prevents the
source from stopping the VM and completing the migration until an ACK
is received from the destination that it's OK to do so.

This can be used by migrated devices in various ways to reduce downtime.
For example, a device can send initial precopy metadata to pre-allocate
resources in the destination and use this capability to make sure that
the pre-allocation is completed before the source VM is stopped, so it
will have full effect.

This new capability relies on the return path capability to communicate
from the destination back to the source.

The actual implementation of the capability will be added in the
following patches.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Acked-by: Markus Armbruster <armbru@redhat.com>
Tested-by: YangHang Liu <yanghliu@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: 1b4adb10f89802e41f730b3d2b5d85a551c6bce5
      
https://github.com/qemu/qemu/commit/1b4adb10f89802e41f730b3d2b5d85a551c6bce5
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

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

  Log Message:
  -----------
  migration: Implement switchover ack logic

Implement switchover ack logic. This prevents the source from stopping
the VM and completing the migration until an ACK is received from the
destination that it's OK to do so.

To achieve this, a new SaveVMHandlers handler switchover_ack_needed()
and a new return path message MIG_RP_MSG_SWITCHOVER_ACK are added.

The switchover_ack_needed() handler is called during migration setup in
the destination to check if switchover ack is used by the migrated
device.

When switchover is approved by all migrated devices in the destination
that support this capability, the MIG_RP_MSG_SWITCHOVER_ACK return path
message is sent to the source to notify it that it's OK to do
switchover.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Tested-by: YangHang Liu <yanghliu@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: 538ef4fe2f724f230834b72898138618637761f1
      
https://github.com/qemu/qemu/commit/538ef4fe2f724f230834b72898138618637761f1
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M migration/options.c

  Log Message:
  -----------
  migration: Enable switchover ack capability

Now that switchover ack logic has been implemented, enable the
capability.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Tested-by: YangHang Liu <yanghliu@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: 7e6a5c730be49bd113a552cd2c4e4b91abfdd4fb
      
https://github.com/qemu/qemu/commit/7e6a5c730be49bd113a552cd2c4e4b91abfdd4fb
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

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

  Log Message:
  -----------
  tests: Add migration switchover ack capability test

Add migration switchover ack capability test. The test runs without
devices that support this capability, but is still useful to make sure
it didn't break anything.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Tested-by: YangHang Liu <yanghliu@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: cf53efbbda2e45aad2f54b797f2ebfa001aad629
      
https://github.com/qemu/qemu/commit/cf53efbbda2e45aad2f54b797f2ebfa001aad629
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M hw/vfio/migration.c

  Log Message:
  -----------
  vfio/migration: Refactor vfio_save_block() to return saved data size

Refactor vfio_save_block() to return the size of saved data on success
and -errno on error.

This will be used in next patch to implement VFIO migration pre-copy
support.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Tested-by: YangHang Liu <yanghliu@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: 6cd1fe11598a304b8d22203365f4fc39172ec9b2
      
https://github.com/qemu/qemu/commit/6cd1fe11598a304b8d22203365f4fc39172ec9b2
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

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

  Log Message:
  -----------
  vfio/migration: Store VFIO migration flags in VFIOMigration

VFIO migration flags are queried once in vfio_migration_init(). Store
them in VFIOMigration so they can be used later to check the device's
migration capabilities without re-querying them.

This will be used in the next patch to check if the device supports
precopy migration.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: YangHang Liu <yanghliu@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: eda7362af9595a9c6b1f1fefdd94b5ef711c250c
      
https://github.com/qemu/qemu/commit/eda7362af9595a9c6b1f1fefdd94b5ef711c250c
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M docs/devel/vfio-migration.rst
    M hw/vfio/common.c
    M hw/vfio/migration.c
    M hw/vfio/trace-events
    M include/hw/vfio/vfio-common.h

  Log Message:
  -----------
  vfio/migration: Add VFIO migration pre-copy support

Pre-copy support allows the VFIO device data to be transferred while the
VM is running. This helps to accommodate VFIO devices that have a large
amount of data that needs to be transferred, and it can reduce migration
downtime.

Pre-copy support is optional in VFIO migration protocol v2.
Implement pre-copy of VFIO migration protocol v2 and use it for devices
that support it. Full description of it can be found in the following
Linux commit: 4db52602a607 ("vfio: Extend the device migration protocol
with PRE_COPY").

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: YangHang Liu <yanghliu@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: 745c42912a04306e8c7765dd4cc1574a92de4446
      
https://github.com/qemu/qemu/commit/745c42912a04306e8c7765dd4cc1574a92de4446
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M docs/devel/vfio-migration.rst
    M hw/vfio/migration.c
    M include/hw/vfio/vfio-common.h

  Log Message:
  -----------
  vfio/migration: Add support for switchover ack capability

Loading of a VFIO device's data can take a substantial amount of time as
the device may need to allocate resources, prepare internal data
structures, etc. This can increase migration downtime, especially for
VFIO devices with a lot of resources.

To solve this, VFIO migration uAPI defines "initial bytes" as part of
its precopy data stream. Initial bytes can be used in various ways to
improve VFIO migration performance. For example, it can be used to
transfer device metadata to pre-allocate resources in the destination.
However, for this to work we need to make sure that all initial bytes
are sent and loaded in the destination before the source VM is stopped.

Use migration switchover ack capability to make sure a VFIO device's
initial bytes are sent and loaded in the destination before the source
stops the VM and attempts to complete the migration.
This can significantly reduce migration downtime for some devices.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Tested-by: YangHang Liu <yanghliu@redhat.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: 634f38f0f73f12b86a53195782b26506c107a418
      
https://github.com/qemu/qemu/commit/634f38f0f73f12b86a53195782b26506c107a418
  Author: Alex Williamson <alex.williamson@redhat.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M hw/s390x/s390-pci-vfio.c
    M hw/vfio/common.c
    M include/hw/vfio/vfio-common.h

  Log Message:
  -----------
  vfio: Implement a common device info helper

A common helper implementing the realloc algorithm for handling
capabilities.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Robin Voetter <robin@streamhpc.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: f6b30c1984f7db16aa971d7f300e2191e5b730b6
      
https://github.com/qemu/qemu/commit/f6b30c1984f7db16aa971d7f300e2191e5b730b6
  Author: Alex Williamson <alex.williamson@redhat.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M hw/vfio/pci-quirks.c

  Log Message:
  -----------
  hw/vfio/pci-quirks: Support alternate offset for GPUDirect Cliques

NVIDIA Turing and newer GPUs implement the MSI-X capability at the offset
previously reserved for use by hypervisors to implement the GPUDirect
Cliques capability.  A revised specification provides an alternate
location.  Add a config space walk to the quirk to check for conflicts,
allowing us to fall back to the new location or generate an error at the
quirk setup rather than when the real conflicting capability is added
should there be no available location.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: c17408892319712c12357e5d1c6b305499c58c2a
      
https://github.com/qemu/qemu/commit/c17408892319712c12357e5d1c6b305499c58c2a
  Author: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M hw/vfio/pci.c

  Log Message:
  -----------
  vfio/pci: Call vfio_prepare_kvm_msi_virq_batch() in MSI retry path

When vfio_enable_vectors() returns with less than requested nr_vectors
we retry with what kernel reported back. But the retry path doesn't
call vfio_prepare_kvm_msi_virq_batch() and this results in,

qemu-system-aarch64: vfio: Error: Failed to enable 4 MSI vectors, retry with 1
qemu-system-aarch64: ../hw/vfio/pci.c:602: vfio_commit_kvm_msi_virq_batch: 
Assertion `vdev->defer_kvm_irq_routing' failed

Fixes: dc580d51f7dd ("vfio: defer to commit kvm irq routing when enable 
msi/msix")
Reviewed-by: Longpeng <longpeng2@huawei.com>
Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: 808642a2f6407157f8cfb48ba6c2d28efd038d62
      
https://github.com/qemu/qemu/commit/808642a2f6407157f8cfb48ba6c2d28efd038d62
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M hw/vfio/migration.c
    M include/hw/vfio/vfio-common.h
    M migration/migration.c
    M migration/migration.h
    M migration/savevm.c
    M migration/target.c

  Log Message:
  -----------
  vfio/migration: Reset bytes_transferred properly

Currently, VFIO bytes_transferred is not reset properly:
1. bytes_transferred is not reset after a VM snapshot (so a migration
   following a snapshot will report incorrect value).
2. bytes_transferred is a single counter for all VFIO devices, however
   upon migration failure it is reset multiple times, by each VFIO
   device.

Fix it by introducing a new function vfio_reset_bytes_transferred() and
calling it during migration and snapshot start.

Remove existing bytes_transferred reset in VFIO migration state
notifier, which is not needed anymore.

Fixes: 3710586caa5d ("qapi: Add VFIO devices migration stats in Migration 
stats")
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: 8bbcb64a71d84627b0171a205a5f3586eaa1e081
      
https://github.com/qemu/qemu/commit/8bbcb64a71d84627b0171a205a5f3586eaa1e081
  Author: Avihai Horon <avihaih@nvidia.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M hw/vfio/common.c
    M hw/vfio/migration.c
    M hw/vfio/pci.c
    M hw/vfio/trace-events
    M include/hw/vfio/vfio-common.h

  Log Message:
  -----------
  vfio/migration: Make VFIO migration non-experimental

The major parts of VFIO migration are supported today in QEMU. This
includes basic VFIO migration, device dirty page tracking and precopy
support.

Thus, at this point in time, it seems appropriate to make VFIO migration
non-experimental: remove the x prefix from enable_migration property,
change it to ON_OFF_AUTO and let the default value be AUTO.

In addition, make the following adjustments:
1. When enable_migration is ON and migration is not supported, fail VFIO
   device realization.
2. When enable_migration is AUTO (i.e., not explicitly enabled), require
   device dirty tracking support. This is because device dirty tracking
   is currently the only method to do dirty page tracking, which is
   essential for migrating in a reasonable downtime. Setting
   enable_migration to ON will not require device dirty tracking.
3. Make migration error and blocker messages more elaborate.
4. Remove error prints in vfio_migration_query_flags().
5. Rename trace_vfio_migration_probe() to
   trace_vfio_migration_realize().

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: 2696da621e237b3ecfbf63085ea0603f439fb863
      
https://github.com/qemu/qemu/commit/2696da621e237b3ecfbf63085ea0603f439fb863
  Author: Alex Williamson <alex.williamson@redhat.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M MAINTAINERS

  Log Message:
  -----------
  MAINTAINERS: Promote Cédric to VFIO co-maintainer

Cédric has stepped up involvement in vfio, reviewing and managing
patches, as well as pull requests.  This work deserves gratitude and
punishment with a promotion to co-maintainer ;)

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Acked-by: Cédric Le Goater <clg@redhat.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: 357bd7932a136613d700ee8bc83e9165f059d1f7
      
https://github.com/qemu/qemu/commit/357bd7932a136613d700ee8bc83e9165f059d1f7
  Author: Zhenzhong Duan <zhenzhong.duan@intel.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M hw/vfio/pci.c

  Log Message:
  -----------
  vfio/pci: Fix a segfault in vfio_realize

The kvm irqchip notifier is only registered if the device supports
INTx, however it's unconditionally removed in vfio realize error
path. If the assigned device does not support INTx, this will cause
QEMU to crash when vfio realize fails. Change it to conditionally
remove the notifier only if the notify hook is setup.

Before fix:
(qemu) device_add vfio-pci,host=81:11.1,id=vfio1,bus=root1,xres=1
Connection closed by foreign host.

After fix:
(qemu) device_add vfio-pci,host=81:11.1,id=vfio1,bus=root1,xres=1
Error: vfio 0000:81:11.1: xres and yres properties require display=on
(qemu)

Fixes: c5478fea27ac ("vfio/pci: Respond to KVM irqchip change notifier")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: 0cc889c8826cefa5b80110d31a62273b56aa1832
      
https://github.com/qemu/qemu/commit/0cc889c8826cefa5b80110d31a62273b56aa1832
  Author: Zhenzhong Duan <zhenzhong.duan@intel.com>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M hw/vfio/pci.c

  Log Message:
  -----------
  vfio/pci: Free leaked timer in vfio_realize error path

When vfio_realize fails, the mmap_timer used for INTx optimization
isn't freed. As this timer isn't activated yet, the potential impact
is just a piece of leaked memory.

Fixes: ea486926b07d ("vfio-pci: Update slow path INTx algorithm timer related")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Signed-off-by: Cédric Le Goater <clg@redhat.com>


  Commit: f7884164cbe3743c3bd2acc9daf877497fdb5fa3
      
https://github.com/qemu/qemu/commit/f7884164cbe3743c3bd2acc9daf877497fdb5fa3
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M pc-bios/s390-ccw.img
    M pc-bios/s390-ccw/Makefile
    M pc-bios/s390-ccw/cio.h
    M pc-bios/s390-ccw/helper.h
    M pc-bios/s390-ccw/main.c
    M pc-bios/s390-ccw/netmain.c
    M pc-bios/s390-ccw/s390-ccw.h
    M pc-bios/s390-ccw/start.S
    M pc-bios/s390-ccw/virtio-blkdev.c
    M pc-bios/s390-ccw/virtio-scsi.c
    M pc-bios/s390-ccw/virtio-scsi.h
    M pc-bios/s390-ccw/virtio.c
    M pc-bios/s390-ccw/virtio.h
    M pc-bios/s390-netboot.img
    M tests/tcg/s390x/head64.S

  Log Message:
  -----------
  Merge tag 'pull-request-2023-06-29' of https://gitlab.com/thuth/qemu into 
staging

* Fix a compilation issue in the s390-ccw bios with Clang + binutils 2.40
* Create an initial stack frame for the main() function of the s390-ccw bios
* Clean up type definitions in the s390-ccw bios

# -----BEGIN PGP SIGNATURE-----
#
# iQJFBAABCAAvFiEEJ7iIR+7gJQEY8+q5LtnXdP5wLbUFAmSd1MwRHHRodXRoQHJl
# ZGhhdC5jb20ACgkQLtnXdP5wLbUNAg//aO7pkzKPIUXG/g8PSzzgjYu9bDTketrQ
# P08wk1jj9CQMLN6dcnVnmzPhC4EqyrZqMYvRH4qFPLJmi0m+Jq3fEEkVzKbI3baO
# 0qQX6DNJVLn6qcgvZ8+ZjkLmuWn/lN4+MH92vdUgpkCcj5y7FB4FjoaG+Z0yZxsS
# YI6gG8D/i6fnq0zsKGMzmzHCswmN4s9qnY9a4nLV0YeMnrZJjUmUUKomWv0FP5jM
# qtLf6pRtgR4u/WD9ktwjISlOn7AKQeCYgZcMu1kBnrSWDjhLytUrv8h2JqRxGOap
# nRtdFzTvgeWKJbCX9v+XLb1bqzFj/LLgoCRzUOqV1CdBKf3JycIXyLMpTJ1+kV4J
# NnzCjnfq/LSDwwCjeg3cRBUFjGkuHBZwQzBh5m4xXBqae07UhMGpWBmhIh7qgPy2
# RXox0xK8Ot/vhYxtNojOiEW0Wp4KJElB9Wxn1Vz0kX4OXRcxHu9CDazZXTKBuBGA
# YWZ9HbsquvwNMV5pgCuXzVWW3FCzrhGgtVYREwYyBIInJaEGCWKCyMAuDXb4fkWL
# eS0Mryp3AMaJ6CidK2ELWygMkKA8xDF8pKm5jgQWRhs5jirydi1B4hPeGFsm1vUI
# TYs08XuC9p66O2Ffn2Sc/uAXbe/FQ7Ce6EbGUUetpafo9FxPhbP28hPUhkcHt68Y
# tmGzqAuwgxc=
# =oWSq
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 29 Jun 2023 09:00:28 PM CEST
# gpg:                using RSA key 27B88847EEE0250118F3EAB92ED9D774FE702DB5
# gpg:                issuer "thuth@redhat.com"
# gpg: Good signature from "Thomas Huth <th.huth@gmx.de>" [undefined]
# gpg:                 aka "Thomas Huth <thuth@redhat.com>" [undefined]
# gpg:                 aka "Thomas Huth <th.huth@posteo.de>" [unknown]
# gpg:                 aka "Thomas Huth <huth@tuxfamily.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: 27B8 8847 EEE0 2501 18F3  EAB9 2ED9 D774 FE70 2DB5

* tag 'pull-request-2023-06-29' of https://gitlab.com/thuth/qemu:
  pc-bios: Update the s390 bios images with the recent changes
  pc-bios/s390-ccw: Don't use __bss_start with the "larl" instruction
  pc-bios/s390-ccw: Move the stack array into start.S
  pc-bios/s390-ccw: Provide space for initial stack frame in start.S
  pc-bios/s390-ccw: Fix indentation in start.S
  pc-bios/s390-ccw/Makefile: Use -z noexecstack to silence linker warning
  pc-bios/s390-ccw: Get rid of the the __u* types
  s390-ccw: Getting rid of ulong

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


  Commit: 408015a97dbe48a9dde8c0d2526c9312691952e7
      
https://github.com/qemu/qemu/commit/408015a97dbe48a9dde8c0d2526c9312691952e7
  Author: Richard Henderson <richard.henderson@linaro.org>
  Date:   2023-06-30 (Fri, 30 Jun 2023)

  Changed paths:
    M MAINTAINERS
    M docs/devel/vfio-migration.rst
    M hw/s390x/s390-pci-vfio.c
    M hw/vfio/common.c
    M hw/vfio/migration.c
    M hw/vfio/pci-quirks.c
    M hw/vfio/pci.c
    M hw/vfio/trace-events
    M include/hw/vfio/vfio-common.h
    M include/migration/register.h
    M migration/migration.c
    M migration/migration.h
    M migration/options.c
    M migration/options.h
    M migration/savevm.c
    M migration/savevm.h
    M migration/target.c
    M migration/trace-events
    M qapi/migration.json
    M tests/qtest/migration-test.c

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

vfio queue:

* migration: New switchover ack to reduce downtime
* VFIO migration pre-copy support
* Removal of the VFIO migration experimental flag
* Alternate offset for GPUDirect Cliques
* Misc fixes

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEEoPZlSPBIlev+awtgUaNDx8/77KEFAmSeVHYACgkQUaNDx8/7
# 7KHeZw/+LRe9QQpx8hU//vKBvLet2QvI3WUaXGHiHbblbRT6HhiHjWHB2/8j6jji
# QhAGJ6w9yoKODyY0kGpVFEnkmXOKyqwWssBheV219ntZs09pFGxZr/ldUhT22aBN
# kH8mHU9BZ3J+zF/kKphpcIC1sPxVu/DlrtnJu5vDGuRAOu8+3kFV217JC1yGs1Vh
# n+KOho8a8oP9qxtzfvQ9iZ4dpBOOKpE9vscS12wJAlen93AGB6esR7VaLxDjExRP
# yL1pguQ8ZZ1gEXXbXO62djKo3IViobtD08KmCXTzQ6TVquLleJzqgjp+A0THnYAe
# J9Rlja7LpsO9MYSxmRE9WcQccC+sAGn/t/ufB0tL8zR43FvfhbF5H0PzBBY0H7YA
# JlzN+fgrKEEHJwMhXANNvSddhWCwvrkjNxo/80u3ySYMQR1Hav/tsXYBlk16e5nS
# fmtrFGTwhsVdy1Q6ZqEOyTni1eiYt5stEQMZFODdUNj6b9FugSZ0BK+2WN/M0CzU
# 6mKmJQgZAG/nBoRJm/XCO5OKQ6wm/4tm6F4HSH5EJ6mDT+DqETAk4GRUWTbYa2/G
# yAAOlhTMu8Xc/NhMeJ7Z99dyq0SM8pi/XpVEIv7p9yBak8ix60iCWZtDE8vlDv3M
# UfMVMTAvTS30kbS6FDN2Yyl6l8/ETdcwVIN4l02ipGzpMCtn9EQ=
# =dKUj
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 30 Jun 2023 06:05:10 AM CEST
# 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-vfio-20230630' of https://github.com/legoater/qemu:
  vfio/pci: Free leaked timer in vfio_realize error path
  vfio/pci: Fix a segfault in vfio_realize
  MAINTAINERS: Promote Cédric to VFIO co-maintainer
  vfio/migration: Make VFIO migration non-experimental
  vfio/migration: Reset bytes_transferred properly
  vfio/pci: Call vfio_prepare_kvm_msi_virq_batch() in MSI retry path
  hw/vfio/pci-quirks: Support alternate offset for GPUDirect Cliques
  vfio: Implement a common device info helper
  vfio/migration: Add support for switchover ack capability
  vfio/migration: Add VFIO migration pre-copy support
  vfio/migration: Store VFIO migration flags in VFIOMigration
  vfio/migration: Refactor vfio_save_block() to return saved data size
  tests: Add migration switchover ack capability test
  migration: Enable switchover ack capability
  migration: Implement switchover ack logic
  migration: Add switchover ack capability

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>


Compare: https://github.com/qemu/qemu/compare/3b746a43ebf3...408015a97dbe



reply via email to

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