[pve-devel] [PATCH qemu 1/2] update submodule and patches to QEMU 9.2.0

Fiona Ebner f.ebner at proxmox.com
Mon Jan 20 17:01:32 CET 2025


Notable changes:

* Commit 07bea2d35f ("block-backend: Remove deadcode") removed
  blk_op_{,un}block_all() which was used by PVE async savevm code.
  Fixed by switching to using bdrv_op_{,un}block_all().

* Drop patches that are already part of upstream.

Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
 ...d-support-for-sync-bitmap-mode-never.patch |  30 ++--
 ...-support-for-conditional-and-always-.patch |   2 +-
 ...check-for-bitmap-mode-without-bitmap.patch |   4 +-
 ...-to-bdrv_dirty_bitmap_merge_internal.patch |   2 +-
 .../0006-mirror-move-some-checks-to-qmp.patch |   6 +-
 ...race-with-clients-disconnecting-earl.patch |   2 +-
 ...al-deadlock-when-draining-during-tr.patch} |   0
 ...as-Internal-cdbs-have-16-byte-length.patch |  69 ---------
 ...orkaround-Windows-not-handling-name.patch} |   4 +-
 ...o-net-Add-queues-before-loading-them.patch |  81 -----------
 ...ix-size-check-in-dhclient-workaround.patch |  36 -----
 ...k-file-change-locking-default-to-off.patch |   2 +-
 ...djust-network-script-path-to-etc-kvm.patch |   6 +-
 ...he-CPU-model-to-kvm64-32-instead-of-.patch |   4 +-
 ...ui-spice-default-to-pve-certificates.patch |   2 +-
 ...erfs-no-default-logfile-if-daemonize.patch |   2 +-
 ...lock-rbd-disable-rbd_cache_writethro.patch |   2 +-
 ...PVE-Up-glusterfs-allow-partial-reads.patch |  12 +-
 ...virtio-balloon-improve-query-balloon.patch |  12 +-
 .../0014-PVE-qapi-modify-query-machines.patch |   6 +-
 .../0015-PVE-qapi-modify-spice-query.patch    |   4 +-
 ...nnel-implementation-for-savevm-async.patch |   4 +-
 ...async-for-background-state-snapshots.patch |  50 ++++---
 ...add-optional-buffer-size-to-QEMUFile.patch |   8 +-
 ...-Add-dummy-id-command-line-parameter.patch |   8 +-
 ...t-target-i386-disable-LINT0-after-re.patch |   2 +-
 ...le-posix-make-locking-optiono-on-cre.patch |   8 +-
 ...sed-balloon-qemu-4-0-config-size-fal.patch |   4 +-
 ...E-Allow-version-code-in-machine-type.patch |  16 +--
 ...e-bcs-bitmap-initialization-to-job-c.patch |   2 +-
 ...VE-Backup-add-vma-backup-format-code.patch |   6 +-
 ...-Backup-add-backup-dump-block-driver.patch |   2 +-
 ...ckup-Proxmox-backup-patches-for-QEMU.patch |  16 +--
 ...estore-new-command-to-restore-from-p.patch |   4 +-
 ...k-driver-to-map-backup-archives-into.patch |  20 +--
 ...ct-stderr-to-journal-when-daemonized.patch |   6 +-
 ...igrate-dirty-bitmap-state-via-savevm.patch |  22 +--
 ...PVE-block-stream-increase-chunk-size.patch |   2 +-
 .../0038-block-add-alloc-track-driver.patch   |   2 +-
 ...-rbd-workaround-for-ceph-issue-53784.patch |   2 +-
 ...-fix-handling-of-holes-in-.bdrv_co_b.patch |   2 +-
 ...k-rbd-implement-bdrv_co_block_status.patch |   2 +-
 ...0044-PVE-backup-add-fleecing-option.patch} |   2 +-
 ...e-allow-specifying-minimum-cluster-s.patch | 133 ------------------
 ...e-error-when-copy-before-write-fail.patch} |   6 +-
 ...um-cluster-size-to-performance-optio.patch | 106 --------------
 ...p-fixup-error-handling-for-fleecing.patch} |   0
 ...-out-setting-up-snapshot-access-for.patch} |   0
 ...evice-name-in-device-info-structure.patch} |   0
 ...e-device-name-in-error-when-setting.patch} |   0
 ...-version-deprecation-for-Proxmox-VE.patch} |   8 +-
 debian/patches/series                         |  23 ++-
 qemu                                          |   2 +-
 53 files changed, 172 insertions(+), 584 deletions(-)
 rename debian/patches/extra/{0003-ide-avoid-potential-deadlock-when-draining-during-tr.patch => 0002-ide-avoid-potential-deadlock-when-draining-during-tr.patch} (100%)
 delete mode 100644 debian/patches/extra/0002-scsi-megasas-Internal-cdbs-have-16-byte-length.patch
 rename debian/patches/extra/{0004-Revert-x86-acpi-workaround-Windows-not-handling-name.patch => 0003-Revert-x86-acpi-workaround-Windows-not-handling-name.patch} (95%)
 delete mode 100644 debian/patches/extra/0005-virtio-net-Add-queues-before-loading-them.patch
 delete mode 100644 debian/patches/extra/0006-virtio-net-Fix-size-check-in-dhclient-workaround.patch
 rename debian/patches/pve/{0046-PVE-backup-add-fleecing-option.patch => 0044-PVE-backup-add-fleecing-option.patch} (99%)
 delete mode 100644 debian/patches/pve/0044-copy-before-write-allow-specifying-minimum-cluster-s.patch
 rename debian/patches/pve/{0047-PVE-backup-improve-error-when-copy-before-write-fail.patch => 0045-PVE-backup-improve-error-when-copy-before-write-fail.patch} (96%)
 delete mode 100644 debian/patches/pve/0045-backup-add-minimum-cluster-size-to-performance-optio.patch
 rename debian/patches/pve/{0048-PVE-backup-fixup-error-handling-for-fleecing.patch => 0046-PVE-backup-fixup-error-handling-for-fleecing.patch} (100%)
 rename debian/patches/pve/{0049-PVE-backup-factor-out-setting-up-snapshot-access-for.patch => 0047-PVE-backup-factor-out-setting-up-snapshot-access-for.patch} (100%)
 rename debian/patches/pve/{0050-PVE-backup-save-device-name-in-device-info-structure.patch => 0048-PVE-backup-save-device-name-in-device-info-structure.patch} (100%)
 rename debian/patches/pve/{0051-PVE-backup-include-device-name-in-error-when-setting.patch => 0049-PVE-backup-include-device-name-in-error-when-setting.patch} (100%)
 rename debian/patches/pve/{0052-adapt-machine-version-deprecation-for-Proxmox-VE.patch => 0050-adapt-machine-version-deprecation-for-Proxmox-VE.patch} (97%)

diff --git a/debian/patches/bitmap-mirror/0001-drive-mirror-add-support-for-sync-bitmap-mode-never.patch b/debian/patches/bitmap-mirror/0001-drive-mirror-add-support-for-sync-bitmap-mode-never.patch
index ddf26e4..ad1fc5d 100644
--- a/debian/patches/bitmap-mirror/0001-drive-mirror-add-support-for-sync-bitmap-mode-never.patch
+++ b/debian/patches/bitmap-mirror/0001-drive-mirror-add-support-for-sync-bitmap-mode-never.patch
@@ -38,7 +38,7 @@ Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
  5 files changed, 142 insertions(+), 28 deletions(-)
 
 diff --git a/block/mirror.c b/block/mirror.c
-index 61f0a717b7..83a88562c5 100644
+index 2afe700b4d..c3d4be9b15 100644
 --- a/block/mirror.c
 +++ b/block/mirror.c
 @@ -51,7 +51,7 @@ typedef struct MirrorBlockJob {
@@ -258,10 +258,10 @@ index 61f0a717b7..83a88562c5 100644
                       base_read_only, errp);
      if (!job) {
 diff --git a/blockdev.c b/blockdev.c
-index 835064ed03..9b10e3917c 100644
+index 6740663fda..38fa63155c 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -2778,6 +2778,9 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
+@@ -2781,6 +2781,9 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
                                     BlockDriverState *target,
                                     const char *replaces,
                                     enum MirrorSyncMode sync,
@@ -271,7 +271,7 @@ index 835064ed03..9b10e3917c 100644
                                     BlockMirrorBackingMode backing_mode,
                                     bool zero_target,
                                     bool has_speed, int64_t speed,
-@@ -2796,6 +2799,7 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
+@@ -2799,6 +2802,7 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
  {
      BlockDriverState *unfiltered_bs;
      int job_flags = JOB_DEFAULT;
@@ -279,7 +279,7 @@ index 835064ed03..9b10e3917c 100644
  
      GLOBAL_STATE_CODE();
      GRAPH_RDLOCK_GUARD_MAINLOOP();
-@@ -2850,6 +2854,29 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
+@@ -2853,6 +2857,29 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
          sync = MIRROR_SYNC_MODE_FULL;
      }
  
@@ -309,7 +309,7 @@ index 835064ed03..9b10e3917c 100644
      if (!replaces) {
          /* We want to mirror from @bs, but keep implicit filters on top */
          unfiltered_bs = bdrv_skip_implicit_filters(bs);
-@@ -2891,8 +2918,8 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
+@@ -2894,8 +2921,8 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
       * and will allow to check whether the node still exist at mirror completion
       */
      mirror_start(job_id, bs, target,
@@ -320,7 +320,7 @@ index 835064ed03..9b10e3917c 100644
                   on_source_error, on_target_error, unmap, filter_node_name,
                   copy_mode, errp);
  }
-@@ -3036,6 +3063,8 @@ void qmp_drive_mirror(DriveMirror *arg, Error **errp)
+@@ -3039,6 +3066,8 @@ void qmp_drive_mirror(DriveMirror *arg, Error **errp)
  
      blockdev_mirror_common(arg->job_id, bs, target_bs,
                             arg->replaces, arg->sync,
@@ -329,7 +329,7 @@ index 835064ed03..9b10e3917c 100644
                             backing_mode, zero_target,
                             arg->has_speed, arg->speed,
                             arg->has_granularity, arg->granularity,
-@@ -3055,6 +3084,8 @@ void qmp_blockdev_mirror(const char *job_id,
+@@ -3058,6 +3087,8 @@ void qmp_blockdev_mirror(const char *job_id,
                           const char *device, const char *target,
                           const char *replaces,
                           MirrorSyncMode sync,
@@ -338,7 +338,7 @@ index 835064ed03..9b10e3917c 100644
                           bool has_speed, int64_t speed,
                           bool has_granularity, uint32_t granularity,
                           bool has_buf_size, int64_t buf_size,
-@@ -3095,7 +3126,8 @@ void qmp_blockdev_mirror(const char *job_id,
+@@ -3098,7 +3129,8 @@ void qmp_blockdev_mirror(const char *job_id,
      }
  
      blockdev_mirror_common(job_id, bs, target_bs,
@@ -364,10 +364,10 @@ index eb2d92a226..f0c642b194 100644
                    BlockdevOnError on_source_error,
                    BlockdevOnError on_target_error,
 diff --git a/qapi/block-core.json b/qapi/block-core.json
-index aa40d44f1d..c2a337cc04 100644
+index fd3bcc1c17..48ba32049f 100644
 --- a/qapi/block-core.json
 +++ b/qapi/block-core.json
-@@ -2174,6 +2174,15 @@
+@@ -2178,6 +2178,15 @@
  #     destination (all the disk, only the sectors allocated in the
  #     topmost image, or only new I/O).
  #
@@ -383,7 +383,7 @@ index aa40d44f1d..c2a337cc04 100644
  # @granularity: granularity of the dirty bitmap, default is 64K if the
  #     image format doesn't have clusters, 4K if the clusters are
  #     smaller than that, else the cluster size.  Must be a power of 2
-@@ -2216,7 +2225,9 @@
+@@ -2220,7 +2229,9 @@
  { 'struct': 'DriveMirror',
    'data': { '*job-id': 'str', 'device': 'str', 'target': 'str',
              '*format': 'str', '*node-name': 'str', '*replaces': 'str',
@@ -394,7 +394,7 @@ index aa40d44f1d..c2a337cc04 100644
              '*speed': 'int', '*granularity': 'uint32',
              '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
              '*on-target-error': 'BlockdevOnError',
-@@ -2496,6 +2507,15 @@
+@@ -2499,6 +2510,15 @@
  #     destination (all the disk, only the sectors allocated in the
  #     topmost image, or only new I/O).
  #
@@ -410,7 +410,7 @@ index aa40d44f1d..c2a337cc04 100644
  # @granularity: granularity of the dirty bitmap, default is 64K if the
  #     image format doesn't have clusters, 4K if the clusters are
  #     smaller than that, else the cluster size.  Must be a power of 2
-@@ -2544,7 +2564,8 @@
+@@ -2547,7 +2567,8 @@
  { 'command': 'blockdev-mirror',
    'data': { '*job-id': 'str', 'device': 'str', 'target': 'str',
              '*replaces': 'str',
@@ -421,7 +421,7 @@ index aa40d44f1d..c2a337cc04 100644
              '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
              '*on-target-error': 'BlockdevOnError',
 diff --git a/tests/unit/test-block-iothread.c b/tests/unit/test-block-iothread.c
-index 3766d5de6b..afa44cbd34 100644
+index 20ed54f570..4f50a99334 100644
 --- a/tests/unit/test-block-iothread.c
 +++ b/tests/unit/test-block-iothread.c
 @@ -755,8 +755,8 @@ static void test_propagate_mirror(void)
diff --git a/debian/patches/bitmap-mirror/0002-drive-mirror-add-support-for-conditional-and-always-.patch b/debian/patches/bitmap-mirror/0002-drive-mirror-add-support-for-conditional-and-always-.patch
index 7bce3ec..226c3e7 100644
--- a/debian/patches/bitmap-mirror/0002-drive-mirror-add-support-for-conditional-and-always-.patch
+++ b/debian/patches/bitmap-mirror/0002-drive-mirror-add-support-for-conditional-and-always-.patch
@@ -24,7 +24,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 18 insertions(+), 6 deletions(-)
 
 diff --git a/block/mirror.c b/block/mirror.c
-index 83a88562c5..fc439ea936 100644
+index c3d4be9b15..7b6f7c0068 100644
 --- a/block/mirror.c
 +++ b/block/mirror.c
 @@ -694,8 +694,6 @@ static int mirror_exit_common(Job *job)
diff --git a/debian/patches/bitmap-mirror/0003-mirror-add-check-for-bitmap-mode-without-bitmap.patch b/debian/patches/bitmap-mirror/0003-mirror-add-check-for-bitmap-mode-without-bitmap.patch
index d82c415..065519f 100644
--- a/debian/patches/bitmap-mirror/0003-mirror-add-check-for-bitmap-mode-without-bitmap.patch
+++ b/debian/patches/bitmap-mirror/0003-mirror-add-check-for-bitmap-mode-without-bitmap.patch
@@ -16,10 +16,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 3 insertions(+)
 
 diff --git a/blockdev.c b/blockdev.c
-index 9b10e3917c..c3fa897289 100644
+index 38fa63155c..204cf6fad1 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -2875,6 +2875,9 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
+@@ -2878,6 +2878,9 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
          if (bdrv_dirty_bitmap_check(bitmap, BDRV_BITMAP_ALLOW_RO, errp)) {
              return;
          }
diff --git a/debian/patches/bitmap-mirror/0004-mirror-switch-to-bdrv_dirty_bitmap_merge_internal.patch b/debian/patches/bitmap-mirror/0004-mirror-switch-to-bdrv_dirty_bitmap_merge_internal.patch
index dee6c7e..71f22b6 100644
--- a/debian/patches/bitmap-mirror/0004-mirror-switch-to-bdrv_dirty_bitmap_merge_internal.patch
+++ b/debian/patches/bitmap-mirror/0004-mirror-switch-to-bdrv_dirty_bitmap_merge_internal.patch
@@ -16,7 +16,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 4 insertions(+), 7 deletions(-)
 
 diff --git a/block/mirror.c b/block/mirror.c
-index fc439ea936..cde5d710fd 100644
+index 7b6f7c0068..2b1c07095d 100644
 --- a/block/mirror.c
 +++ b/block/mirror.c
 @@ -809,8 +809,8 @@ static int mirror_exit_common(Job *job)
diff --git a/debian/patches/bitmap-mirror/0006-mirror-move-some-checks-to-qmp.patch b/debian/patches/bitmap-mirror/0006-mirror-move-some-checks-to-qmp.patch
index f0165d5..b34956a 100644
--- a/debian/patches/bitmap-mirror/0006-mirror-move-some-checks-to-qmp.patch
+++ b/debian/patches/bitmap-mirror/0006-mirror-move-some-checks-to-qmp.patch
@@ -21,7 +21,7 @@ Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
  3 files changed, 70 insertions(+), 59 deletions(-)
 
 diff --git a/block/mirror.c b/block/mirror.c
-index cde5d710fd..e20f50e5fb 100644
+index 2b1c07095d..f5787b380c 100644
 --- a/block/mirror.c
 +++ b/block/mirror.c
 @@ -1763,31 +1763,13 @@ static BlockJob *mirror_start_job(
@@ -62,10 +62,10 @@ index cde5d710fd..e20f50e5fb 100644
  
          if (bitmap_mode != BITMAP_SYNC_MODE_NEVER) {
 diff --git a/blockdev.c b/blockdev.c
-index c3fa897289..9cbd166674 100644
+index 204cf6fad1..79d47b1920 100644
 --- a/blockdev.c
 +++ b/blockdev.c
-@@ -2854,7 +2854,36 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
+@@ -2857,7 +2857,36 @@ static void blockdev_mirror_common(const char *job_id, BlockDriverState *bs,
          sync = MIRROR_SYNC_MODE_FULL;
      }
  
diff --git a/debian/patches/extra/0001-monitor-qmp-fix-race-with-clients-disconnecting-earl.patch b/debian/patches/extra/0001-monitor-qmp-fix-race-with-clients-disconnecting-earl.patch
index e0be888..8954481 100644
--- a/debian/patches/extra/0001-monitor-qmp-fix-race-with-clients-disconnecting-earl.patch
+++ b/debian/patches/extra/0001-monitor-qmp-fix-race-with-clients-disconnecting-earl.patch
@@ -78,7 +78,7 @@ index cb628f681d..93dbd62fc2 100644
  
  /**
 diff --git a/monitor/monitor.c b/monitor/monitor.c
-index db52a9c7ef..2d63959351 100644
+index 56786c0ccc..30071d0c8a 100644
 --- a/monitor/monitor.c
 +++ b/monitor/monitor.c
 @@ -116,6 +116,21 @@ bool monitor_cur_is_qmp(void)
diff --git a/debian/patches/extra/0003-ide-avoid-potential-deadlock-when-draining-during-tr.patch b/debian/patches/extra/0002-ide-avoid-potential-deadlock-when-draining-during-tr.patch
similarity index 100%
rename from debian/patches/extra/0003-ide-avoid-potential-deadlock-when-draining-during-tr.patch
rename to debian/patches/extra/0002-ide-avoid-potential-deadlock-when-draining-during-tr.patch
diff --git a/debian/patches/extra/0002-scsi-megasas-Internal-cdbs-have-16-byte-length.patch b/debian/patches/extra/0002-scsi-megasas-Internal-cdbs-have-16-byte-length.patch
deleted file mode 100644
index a8a6662..0000000
--- a/debian/patches/extra/0002-scsi-megasas-Internal-cdbs-have-16-byte-length.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Guenter Roeck <linux at roeck-us.net>
-Date: Tue, 28 Feb 2023 09:11:29 -0800
-Subject: [PATCH] scsi: megasas: Internal cdbs have 16-byte length
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Host drivers do not necessarily set cdb_len in megasas io commands.
-With commits 6d1511cea0 ("scsi: Reject commands if the CDB length
-exceeds buf_len") and fe9d8927e2 ("scsi: Add buf_len parameter to
-scsi_req_new()"), this results in failures to boot Linux from affected
-SCSI drives because cdb_len is set to 0 by the host driver.
-Set the cdb length to its actual size to solve the problem.
-
-Signed-off-by: Guenter Roeck <linux at roeck-us.net>
-Reviewed-by: Philippe Mathieu-Daudé <philmd at linaro.org>
-(picked-up from https://lists.nongnu.org/archive/html/qemu-devel/2023-02/msg08653.html)
-Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
----
- hw/scsi/megasas.c | 14 ++------------
- 1 file changed, 2 insertions(+), 12 deletions(-)
-
-diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c
-index 2d0c607177..97e51733af 100644
---- a/hw/scsi/megasas.c
-+++ b/hw/scsi/megasas.c
-@@ -1781,7 +1781,7 @@ static int megasas_handle_io(MegasasState *s, MegasasCmd *cmd, int frame_cmd)
-     uint8_t cdb[16];
-     int len;
-     struct SCSIDevice *sdev = NULL;
--    int target_id, lun_id, cdb_len;
-+    int target_id, lun_id;
- 
-     lba_count = le32_to_cpu(cmd->frame->io.header.data_len);
-     lba_start_lo = le32_to_cpu(cmd->frame->io.lba_lo);
-@@ -1790,7 +1790,6 @@ static int megasas_handle_io(MegasasState *s, MegasasCmd *cmd, int frame_cmd)
- 
-     target_id = cmd->frame->header.target_id;
-     lun_id = cmd->frame->header.lun_id;
--    cdb_len = cmd->frame->header.cdb_len;
- 
-     if (target_id < MFI_MAX_LD && lun_id == 0) {
-         sdev = scsi_device_find(&s->bus, 0, target_id, lun_id);
-@@ -1805,15 +1804,6 @@ static int megasas_handle_io(MegasasState *s, MegasasCmd *cmd, int frame_cmd)
-         return MFI_STAT_DEVICE_NOT_FOUND;
-     }
- 
--    if (cdb_len > 16) {
--        trace_megasas_scsi_invalid_cdb_len(
--            mfi_frame_desc(frame_cmd), 1, target_id, lun_id, cdb_len);
--        megasas_write_sense(cmd, SENSE_CODE(INVALID_OPCODE));
--        cmd->frame->header.scsi_status = CHECK_CONDITION;
--        s->event_count++;
--        return MFI_STAT_SCSI_DONE_WITH_ERROR;
--    }
--
-     cmd->iov_size = lba_count * sdev->blocksize;
-     if (megasas_map_sgl(s, cmd, &cmd->frame->io.sgl)) {
-         megasas_write_sense(cmd, SENSE_CODE(TARGET_FAILURE));
-@@ -1824,7 +1814,7 @@ static int megasas_handle_io(MegasasState *s, MegasasCmd *cmd, int frame_cmd)
- 
-     megasas_encode_lba(cdb, lba_start, lba_count, is_write);
-     cmd->req = scsi_req_new(sdev, cmd->index,
--                            lun_id, cdb, cdb_len, cmd);
-+                            lun_id, cdb, sizeof(cdb), cmd);
-     if (!cmd->req) {
-         trace_megasas_scsi_req_alloc_failed(
-             mfi_frame_desc(frame_cmd), target_id, lun_id);
diff --git a/debian/patches/extra/0004-Revert-x86-acpi-workaround-Windows-not-handling-name.patch b/debian/patches/extra/0003-Revert-x86-acpi-workaround-Windows-not-handling-name.patch
similarity index 95%
rename from debian/patches/extra/0004-Revert-x86-acpi-workaround-Windows-not-handling-name.patch
rename to debian/patches/extra/0003-Revert-x86-acpi-workaround-Windows-not-handling-name.patch
index 99b9499..5d903da 100644
--- a/debian/patches/extra/0004-Revert-x86-acpi-workaround-Windows-not-handling-name.patch
+++ b/debian/patches/extra/0003-Revert-x86-acpi-workaround-Windows-not-handling-name.patch
@@ -24,10 +24,10 @@ Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
  1 file changed, 2 insertions(+), 6 deletions(-)
 
 diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
-index 5d4bd2b710..67194bb705 100644
+index 9fcc2897b8..45a3392d04 100644
 --- a/hw/i386/acpi-build.c
 +++ b/hw/i386/acpi-build.c
-@@ -346,13 +346,9 @@ Aml *aml_pci_device_dsm(void)
+@@ -345,13 +345,9 @@ Aml *aml_pci_device_dsm(void)
      {
          Aml *params = aml_local(0);
          Aml *pkg = aml_package(2);
diff --git a/debian/patches/extra/0005-virtio-net-Add-queues-before-loading-them.patch b/debian/patches/extra/0005-virtio-net-Add-queues-before-loading-them.patch
deleted file mode 100644
index 7369a49..0000000
--- a/debian/patches/extra/0005-virtio-net-Add-queues-before-loading-them.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Akihiko Odaki <akihiko.odaki at daynix.com>
-Date: Tue, 22 Oct 2024 15:49:01 +0900
-Subject: [PATCH] virtio-net: Add queues before loading them
-
-Call virtio_net_set_multiqueue() to add queues before loading their
-states. Otherwise the loaded queues will not have handlers and elements
-in them will not be processed.
-
-Cc: qemu-stable at nongnu.org
-Fixes: 8c49756825da ("virtio-net: Add only one queue pair when realizing")
-Reported-by: Laurent Vivier <lvivier at redhat.com>
-Signed-off-by: Akihiko Odaki <akihiko.odaki at daynix.com>
-Acked-by: Michael S. Tsirkin <mst at redhat.com>
-(picked from https://lore.kernel.org/qemu-devel/20241022-load-v1-1-99df0bff7939@daynix.com/)
-Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
----
- hw/net/virtio-net.c        | 10 ++++++++++
- hw/virtio/virtio.c         |  7 +++++++
- include/hw/virtio/virtio.h |  2 ++
- 3 files changed, 19 insertions(+)
-
-diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
-index ed33a32877..90d05f94d4 100644
---- a/hw/net/virtio-net.c
-+++ b/hw/net/virtio-net.c
-@@ -3032,6 +3032,15 @@ static void virtio_net_set_multiqueue(VirtIONet *n, int multiqueue)
-     virtio_net_set_queue_pairs(n);
- }
- 
-+static int virtio_net_pre_load_queues(VirtIODevice *vdev)
-+{
-+    virtio_net_set_multiqueue(VIRTIO_NET(vdev),
-+                              virtio_has_feature(vdev->guest_features, VIRTIO_NET_F_RSS) ||
-+                              virtio_has_feature(vdev->guest_features, VIRTIO_NET_F_MQ));
-+
-+    return 0;
-+}
-+
- static int virtio_net_post_load_device(void *opaque, int version_id)
- {
-     VirtIONet *n = opaque;
-@@ -4010,6 +4019,7 @@ static void virtio_net_class_init(ObjectClass *klass, void *data)
-     vdc->guest_notifier_mask = virtio_net_guest_notifier_mask;
-     vdc->guest_notifier_pending = virtio_net_guest_notifier_pending;
-     vdc->legacy_features |= (0x1 << VIRTIO_NET_F_GSO);
-+    vdc->pre_load_queues = virtio_net_pre_load_queues;
-     vdc->post_load = virtio_net_post_load_virtio;
-     vdc->vmsd = &vmstate_virtio_net_device;
-     vdc->primary_unplug_pending = primary_unplug_pending;
-diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
-index 9e10cbc058..10f24a58dd 100644
---- a/hw/virtio/virtio.c
-+++ b/hw/virtio/virtio.c
-@@ -3251,6 +3251,13 @@ virtio_load(VirtIODevice *vdev, QEMUFile *f, int version_id)
-         config_len--;
-     }
- 
-+    if (vdc->pre_load_queues) {
-+        ret = vdc->pre_load_queues(vdev);
-+        if (ret) {
-+            return ret;
-+        }
-+    }
-+
-     num = qemu_get_be32(f);
- 
-     if (num > VIRTIO_QUEUE_MAX) {
-diff --git a/include/hw/virtio/virtio.h b/include/hw/virtio/virtio.h
-index 0fcbc5c0c6..953dfca27c 100644
---- a/include/hw/virtio/virtio.h
-+++ b/include/hw/virtio/virtio.h
-@@ -210,6 +210,8 @@ struct VirtioDeviceClass {
-     void (*guest_notifier_mask)(VirtIODevice *vdev, int n, bool mask);
-     int (*start_ioeventfd)(VirtIODevice *vdev);
-     void (*stop_ioeventfd)(VirtIODevice *vdev);
-+    /* Called before loading queues. Useful to add queues before loading. */
-+    int (*pre_load_queues)(VirtIODevice *vdev);
-     /* Saving and loading of a device; trying to deprecate save/load
-      * use vmsd for new devices.
-      */
diff --git a/debian/patches/extra/0006-virtio-net-Fix-size-check-in-dhclient-workaround.patch b/debian/patches/extra/0006-virtio-net-Fix-size-check-in-dhclient-workaround.patch
deleted file mode 100644
index 29df2c1..0000000
--- a/debian/patches/extra/0006-virtio-net-Fix-size-check-in-dhclient-workaround.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Akihiko Odaki <akihiko.odaki at daynix.com>
-Date: Fri, 22 Nov 2024 14:03:08 +0900
-Subject: [PATCH] virtio-net: Fix size check in dhclient workaround
-
-work_around_broken_dhclient() accesses IP and UDP headers to detect
-relevant packets and to calculate checksums, but it didn't check if
-the packet has size sufficient to accommodate them, causing out-of-bound
-access hazards. Fix this by correcting the size requirement.
-
-Fixes: 1d41b0c1ec66 ("Work around dhclient brokenness")
-Cc: qemu-stable at nongnu.org
-Signed-off-by: Akihiko Odaki <akihiko.odaki at daynix.com>
-(picked from https://lore.kernel.org/qemu-devel/20241122-queue-v3-2-f2ff03b8dbfd@daynix.com/#t)
-Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
----
- hw/net/virtio-net.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
-index 90d05f94d4..c1fe457359 100644
---- a/hw/net/virtio-net.c
-+++ b/hw/net/virtio-net.c
-@@ -1692,8 +1692,11 @@ static void virtio_net_hdr_swap(VirtIODevice *vdev, struct virtio_net_hdr *hdr)
- static void work_around_broken_dhclient(struct virtio_net_hdr *hdr,
-                                         uint8_t *buf, size_t size)
- {
-+    size_t csum_size = ETH_HLEN + sizeof(struct ip_header) +
-+                       sizeof(struct udp_header);
-+
-     if ((hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) && /* missing csum */
--        (size > 27 && size < 1500) && /* normal sized MTU */
-+        (size >= csum_size && size < 1500) && /* normal sized MTU */
-         (buf[12] == 0x08 && buf[13] == 0x00) && /* ethertype == IPv4 */
-         (buf[23] == 17) && /* ip.protocol == UDP */
-         (buf[34] == 0 && buf[35] == 67)) { /* udp.srcport == bootps */
diff --git a/debian/patches/pve/0001-PVE-Config-block-file-change-locking-default-to-off.patch b/debian/patches/pve/0001-PVE-Config-block-file-change-locking-default-to-off.patch
index 0e5a7d3..72bd38d 100644
--- a/debian/patches/pve/0001-PVE-Config-block-file-change-locking-default-to-off.patch
+++ b/debian/patches/pve/0001-PVE-Config-block-file-change-locking-default-to-off.patch
@@ -14,7 +14,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/block/file-posix.c b/block/file-posix.c
-index ff928b5e85..99e5bea1cc 100644
+index 90fa54352c..e2ea071315 100644
 --- a/block/file-posix.c
 +++ b/block/file-posix.c
 @@ -564,7 +564,7 @@ static QemuOptsList raw_runtime_opts = {
diff --git a/debian/patches/pve/0002-PVE-Config-Adjust-network-script-path-to-etc-kvm.patch b/debian/patches/pve/0002-PVE-Config-Adjust-network-script-path-to-etc-kvm.patch
index 69efd94..426c6e6 100644
--- a/debian/patches/pve/0002-PVE-Config-Adjust-network-script-path-to-etc-kvm.patch
+++ b/debian/patches/pve/0002-PVE-Config-Adjust-network-script-path-to-etc-kvm.patch
@@ -9,12 +9,12 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/include/net/net.h b/include/net/net.h
-index c8f679761b..35a1338e40 100644
+index cdd5b109b0..653a37e9d1 100644
 --- a/include/net/net.h
 +++ b/include/net/net.h
-@@ -309,8 +309,8 @@ void netdev_add(QemuOpts *opts, Error **errp);
+@@ -305,8 +305,8 @@ void netdev_add(QemuOpts *opts, Error **errp);
+ 
  int net_hub_id_for_client(NetClientState *nc, int *id);
- NetClientState *net_hub_port_find(int hub_id);
  
 -#define DEFAULT_NETWORK_SCRIPT CONFIG_SYSCONFDIR "/qemu-ifup"
 -#define DEFAULT_NETWORK_DOWN_SCRIPT CONFIG_SYSCONFDIR "/qemu-ifdown"
diff --git a/debian/patches/pve/0003-PVE-Config-set-the-CPU-model-to-kvm64-32-instead-of-.patch b/debian/patches/pve/0003-PVE-Config-set-the-CPU-model-to-kvm64-32-instead-of-.patch
index 74d94eb..516eb16 100644
--- a/debian/patches/pve/0003-PVE-Config-set-the-CPU-model-to-kvm64-32-instead-of-.patch
+++ b/debian/patches/pve/0003-PVE-Config-set-the-CPU-model-to-kvm64-32-instead-of-.patch
@@ -10,10 +10,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/target/i386/cpu.h b/target/i386/cpu.h
-index fa027cc206..da7ef0cbe6 100644
+index 4c239a6970..be09263fb0 100644
 --- a/target/i386/cpu.h
 +++ b/target/i386/cpu.h
-@@ -2418,9 +2418,9 @@ uint64_t cpu_get_tsc(CPUX86State *env);
+@@ -2475,9 +2475,9 @@ uint64_t cpu_get_tsc(CPUX86State *env);
  #define CPU_RESOLVING_TYPE TYPE_X86_CPU
  
  #ifdef TARGET_X86_64
diff --git a/debian/patches/pve/0004-PVE-Config-ui-spice-default-to-pve-certificates.patch b/debian/patches/pve/0004-PVE-Config-ui-spice-default-to-pve-certificates.patch
index d555c48..b57ad9c 100644
--- a/debian/patches/pve/0004-PVE-Config-ui-spice-default-to-pve-certificates.patch
+++ b/debian/patches/pve/0004-PVE-Config-ui-spice-default-to-pve-certificates.patch
@@ -9,7 +9,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 9 insertions(+), 6 deletions(-)
 
 diff --git a/ui/spice-core.c b/ui/spice-core.c
-index 15be640286..ea20e6153c 100644
+index bd9dbe03f1..a7ecaad9c7 100644
 --- a/ui/spice-core.c
 +++ b/ui/spice-core.c
 @@ -690,32 +690,35 @@ static void qemu_spice_init(void)
diff --git a/debian/patches/pve/0005-PVE-Config-glusterfs-no-default-logfile-if-daemonize.patch b/debian/patches/pve/0005-PVE-Config-glusterfs-no-default-logfile-if-daemonize.patch
index 6d4cc69..e957d0e 100644
--- a/debian/patches/pve/0005-PVE-Config-glusterfs-no-default-logfile-if-daemonize.patch
+++ b/debian/patches/pve/0005-PVE-Config-glusterfs-no-default-logfile-if-daemonize.patch
@@ -9,7 +9,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 11 insertions(+), 4 deletions(-)
 
 diff --git a/block/gluster.c b/block/gluster.c
-index f8b415f381..02bde39d94 100644
+index e9c038042b..c8457a5014 100644
 --- a/block/gluster.c
 +++ b/block/gluster.c
 @@ -42,7 +42,7 @@
diff --git a/debian/patches/pve/0006-PVE-Config-rbd-block-rbd-disable-rbd_cache_writethro.patch b/debian/patches/pve/0006-PVE-Config-rbd-block-rbd-disable-rbd_cache_writethro.patch
index 3b31de2..7156d52 100644
--- a/debian/patches/pve/0006-PVE-Config-rbd-block-rbd-disable-rbd_cache_writethro.patch
+++ b/debian/patches/pve/0006-PVE-Config-rbd-block-rbd-disable-rbd_cache_writethro.patch
@@ -18,7 +18,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 2 insertions(+)
 
 diff --git a/block/rbd.c b/block/rbd.c
-index 9c0fd0cb3f..101ee59d6e 100644
+index 04ed0e242e..728bce3b1e 100644
 --- a/block/rbd.c
 +++ b/block/rbd.c
 @@ -963,6 +963,8 @@ static int qemu_rbd_connect(rados_t *cluster, rados_ioctx_t *io_ctx,
diff --git a/debian/patches/pve/0007-PVE-Up-glusterfs-allow-partial-reads.patch b/debian/patches/pve/0007-PVE-Up-glusterfs-allow-partial-reads.patch
index ddcaa1f..55967ce 100644
--- a/debian/patches/pve/0007-PVE-Up-glusterfs-allow-partial-reads.patch
+++ b/debian/patches/pve/0007-PVE-Up-glusterfs-allow-partial-reads.patch
@@ -16,7 +16,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 9 insertions(+), 1 deletion(-)
 
 diff --git a/block/gluster.c b/block/gluster.c
-index 02bde39d94..36c00088cc 100644
+index c8457a5014..c3a9555591 100644
 --- a/block/gluster.c
 +++ b/block/gluster.c
 @@ -57,6 +57,7 @@ typedef struct GlusterAIOCB {
@@ -27,7 +27,7 @@ index 02bde39d94..36c00088cc 100644
  } GlusterAIOCB;
  
  typedef struct BDRVGlusterState {
-@@ -749,8 +750,10 @@ static void gluster_finish_aiocb(struct glfs_fd *fd, ssize_t ret,
+@@ -746,8 +747,10 @@ static void gluster_finish_aiocb(struct glfs_fd *fd, ssize_t ret,
          acb->ret = 0; /* Success */
      } else if (ret < 0) {
          acb->ret = -errno; /* Read/Write failed */
@@ -39,7 +39,7 @@ index 02bde39d94..36c00088cc 100644
      }
  
      aio_co_schedule(acb->aio_context, acb->coroutine);
-@@ -1019,6 +1022,7 @@ static coroutine_fn int qemu_gluster_co_pwrite_zeroes(BlockDriverState *bs,
+@@ -1018,6 +1021,7 @@ static coroutine_fn int qemu_gluster_co_pwrite_zeroes(BlockDriverState *bs,
      acb.ret = 0;
      acb.coroutine = qemu_coroutine_self();
      acb.aio_context = bdrv_get_aio_context(bs);
@@ -47,7 +47,7 @@ index 02bde39d94..36c00088cc 100644
  
      ret = glfs_zerofill_async(s->fd, offset, bytes, gluster_finish_aiocb, &acb);
      if (ret < 0) {
-@@ -1199,9 +1203,11 @@ static coroutine_fn int qemu_gluster_co_rw(BlockDriverState *bs,
+@@ -1198,9 +1202,11 @@ static coroutine_fn int qemu_gluster_co_rw(BlockDriverState *bs,
      acb.aio_context = bdrv_get_aio_context(bs);
  
      if (write) {
@@ -59,7 +59,7 @@ index 02bde39d94..36c00088cc 100644
          ret = glfs_preadv_async(s->fd, qiov->iov, qiov->niov, offset, 0,
                                  gluster_finish_aiocb, &acb);
      }
-@@ -1264,6 +1270,7 @@ static coroutine_fn int qemu_gluster_co_flush_to_disk(BlockDriverState *bs)
+@@ -1263,6 +1269,7 @@ static coroutine_fn int qemu_gluster_co_flush_to_disk(BlockDriverState *bs)
      acb.ret = 0;
      acb.coroutine = qemu_coroutine_self();
      acb.aio_context = bdrv_get_aio_context(bs);
@@ -67,7 +67,7 @@ index 02bde39d94..36c00088cc 100644
  
      ret = glfs_fsync_async(s->fd, gluster_finish_aiocb, &acb);
      if (ret < 0) {
-@@ -1312,6 +1319,7 @@ static coroutine_fn int qemu_gluster_co_pdiscard(BlockDriverState *bs,
+@@ -1311,6 +1318,7 @@ static coroutine_fn int qemu_gluster_co_pdiscard(BlockDriverState *bs,
      acb.ret = 0;
      acb.coroutine = qemu_coroutine_self();
      acb.aio_context = bdrv_get_aio_context(bs);
diff --git a/debian/patches/pve/0013-PVE-virtio-balloon-improve-query-balloon.patch b/debian/patches/pve/0013-PVE-virtio-balloon-improve-query-balloon.patch
index 6face40..bb826a1 100644
--- a/debian/patches/pve/0013-PVE-virtio-balloon-improve-query-balloon.patch
+++ b/debian/patches/pve/0013-PVE-virtio-balloon-improve-query-balloon.patch
@@ -59,10 +59,10 @@ index 8701f00cc7..3b4c5ef403 100644
      qapi_free_BalloonInfo(info);
  }
 diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
-index 609e39a821..8cb6dfcac3 100644
+index afd2ad6dd6..c724218c17 100644
 --- a/hw/virtio/virtio-balloon.c
 +++ b/hw/virtio/virtio-balloon.c
-@@ -781,8 +781,37 @@ static uint64_t virtio_balloon_get_features(VirtIODevice *vdev, uint64_t f,
+@@ -795,8 +795,37 @@ static uint64_t virtio_balloon_get_features(VirtIODevice *vdev, uint64_t f,
  static void virtio_balloon_stat(void *opaque, BalloonInfo *info)
  {
      VirtIOBalloon *dev = opaque;
@@ -103,10 +103,10 @@ index 609e39a821..8cb6dfcac3 100644
  
  static void virtio_balloon_to_target(void *opaque, ram_addr_t target)
 diff --git a/qapi/machine.json b/qapi/machine.json
-index d4317435e7..db8ed2e357 100644
+index a6b8795b09..9f7ed0eaa0 100644
 --- a/qapi/machine.json
 +++ b/qapi/machine.json
-@@ -1164,9 +1164,29 @@
+@@ -1163,9 +1163,29 @@
  # @actual: the logical size of the VM in bytes Formula used:
  #     logical_vm_size = vm_ram_size - balloon_size
  #
@@ -138,10 +138,10 @@ index d4317435e7..db8ed2e357 100644
  ##
  # @query-balloon:
 diff --git a/qapi/pragma.json b/qapi/pragma.json
-index 59fbe74b8c..be8fa304c5 100644
+index 023a2ef7bc..6aaa9cb975 100644
 --- a/qapi/pragma.json
 +++ b/qapi/pragma.json
-@@ -90,6 +90,7 @@
+@@ -81,6 +81,7 @@
      'member-name-exceptions': [     # visible in:
          'ACPISlotType',             # query-acpi-ospm-status
          'AcpiTableOptions',         # -acpitable
diff --git a/debian/patches/pve/0014-PVE-qapi-modify-query-machines.patch b/debian/patches/pve/0014-PVE-qapi-modify-query-machines.patch
index 274665d..9ff9090 100644
--- a/debian/patches/pve/0014-PVE-qapi-modify-query-machines.patch
+++ b/debian/patches/pve/0014-PVE-qapi-modify-query-machines.patch
@@ -30,10 +30,10 @@ index 130217da8f..52a6d74820 100644
              info->default_cpu_type = g_strdup(mc->default_cpu_type);
          }
 diff --git a/qapi/machine.json b/qapi/machine.json
-index db8ed2e357..0c703316f5 100644
+index 9f7ed0eaa0..16366b774a 100644
 --- a/qapi/machine.json
 +++ b/qapi/machine.json
-@@ -168,6 +168,8 @@
+@@ -167,6 +167,8 @@
  #
  # @is-default: whether the machine is default
  #
@@ -42,7 +42,7 @@ index db8ed2e357..0c703316f5 100644
  # @cpu-max: maximum number of CPUs supported by the machine type
  #     (since 1.5)
  #
-@@ -200,7 +202,7 @@
+@@ -199,7 +201,7 @@
  ##
  { 'struct': 'MachineInfo',
    'data': { 'name': 'str', '*alias': 'str',
diff --git a/debian/patches/pve/0015-PVE-qapi-modify-spice-query.patch b/debian/patches/pve/0015-PVE-qapi-modify-spice-query.patch
index ade3910..1e4319e 100644
--- a/debian/patches/pve/0015-PVE-qapi-modify-spice-query.patch
+++ b/debian/patches/pve/0015-PVE-qapi-modify-spice-query.patch
@@ -14,7 +14,7 @@ Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
  2 files changed, 7 insertions(+)
 
 diff --git a/qapi/ui.json b/qapi/ui.json
-index 8c8464faac..cebda37f8f 100644
+index 460a26b981..42b911bda3 100644
 --- a/qapi/ui.json
 +++ b/qapi/ui.json
 @@ -312,11 +312,14 @@
@@ -33,7 +33,7 @@ index 8c8464faac..cebda37f8f 100644
    'if': 'CONFIG_SPICE' }
  
 diff --git a/ui/spice-core.c b/ui/spice-core.c
-index ea20e6153c..55a15fba8b 100644
+index a7ecaad9c7..fecf002d50 100644
 --- a/ui/spice-core.c
 +++ b/ui/spice-core.c
 @@ -548,6 +548,10 @@ static SpiceInfo *qmp_query_spice_real(Error **errp)
diff --git a/debian/patches/pve/0016-PVE-add-IOChannel-implementation-for-savevm-async.patch b/debian/patches/pve/0016-PVE-add-IOChannel-implementation-for-savevm-async.patch
index fb825fa..31cd174 100644
--- a/debian/patches/pve/0016-PVE-add-IOChannel-implementation-for-savevm-async.patch
+++ b/debian/patches/pve/0016-PVE-add-IOChannel-implementation-for-savevm-async.patch
@@ -271,7 +271,7 @@ index 0000000000..17ae2cb261
 +
 +#endif /* QIO_CHANNEL_SAVEVM_ASYNC_H */
 diff --git a/migration/meson.build b/migration/meson.build
-index 5ce2acb41e..020127d901 100644
+index d53cf3417a..b00d58064d 100644
 --- a/migration/meson.build
 +++ b/migration/meson.build
 @@ -13,6 +13,7 @@ system_ss.add(files(
@@ -279,6 +279,6 @@ index 5ce2acb41e..020127d901 100644
    'channel.c',
    'channel-block.c',
 +  'channel-savevm-async.c',
+   'cpu-throttle.c',
    'dirtyrate.c',
    'exec.c',
-   'fd.c',
diff --git a/debian/patches/pve/0017-PVE-add-savevm-async-for-background-state-snapshots.patch b/debian/patches/pve/0017-PVE-add-savevm-async-for-background-state-snapshots.patch
index 4e9c6bf..9117f50 100644
--- a/debian/patches/pve/0017-PVE-add-savevm-async-for-background-state-snapshots.patch
+++ b/debian/patches/pve/0017-PVE-add-savevm-async-for-background-state-snapshots.patch
@@ -37,13 +37,13 @@ Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
  include/migration/snapshot.h |   2 +
  include/monitor/hmp.h        |   3 +
  migration/meson.build        |   1 +
- migration/savevm-async.c     | 549 +++++++++++++++++++++++++++++++++++
+ migration/savevm-async.c     | 567 +++++++++++++++++++++++++++++++++++
  monitor/hmp-cmds.c           |  38 +++
  qapi/migration.json          |  34 +++
  qapi/misc.json               |  18 ++
  qemu-options.hx              |  12 +
  system/vl.c                  |  10 +
- 11 files changed, 697 insertions(+)
+ 11 files changed, 715 insertions(+)
  create mode 100644 migration/savevm-async.c
 
 diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
@@ -128,10 +128,10 @@ index ae116d9804..2596cc2426 100644
  void coroutine_fn hmp_screendump(Monitor *mon, const QDict *qdict);
  void hmp_chardev_add(Monitor *mon, const QDict *qdict);
 diff --git a/migration/meson.build b/migration/meson.build
-index 020127d901..4b0c4f0f51 100644
+index b00d58064d..075b013971 100644
 --- a/migration/meson.build
 +++ b/migration/meson.build
-@@ -27,6 +27,7 @@ system_ss.add(files(
+@@ -29,6 +29,7 @@ system_ss.add(files(
    'options.c',
    'postcopy-ram.c',
    'savevm.c',
@@ -141,10 +141,10 @@ index 020127d901..4b0c4f0f51 100644
    'threadinfo.c',
 diff --git a/migration/savevm-async.c b/migration/savevm-async.c
 new file mode 100644
-index 0000000000..4c90209188
+index 0000000000..ea8cdf1b00
 --- /dev/null
 +++ b/migration/savevm-async.c
-@@ -0,0 +1,549 @@
+@@ -0,0 +1,567 @@
 +#include "qemu/osdep.h"
 +#include "migration/channel-savevm-async.h"
 +#include "migration/migration.h"
@@ -261,6 +261,7 @@ index 0000000000..4c90209188
 +    }
 +
 +    if (snap_state.target) {
++        BlockDriverState *target_bs = blk_bs(snap_state.target);
 +        if (!savevm_aborted()) {
 +            /* try to truncate, but ignore errors (will fail on block devices).
 +            * note1: bdrv_read() need whole blocks, so we need to round up
@@ -269,7 +270,9 @@ index 0000000000..4c90209188
 +            size_t size = QEMU_ALIGN_UP(snap_state.bs_pos, BDRV_SECTOR_SIZE*2);
 +            blk_truncate(snap_state.target, size, false, PREALLOC_MODE_OFF, 0, NULL);
 +        }
-+        blk_op_unblock_all(snap_state.target, snap_state.blocker);
++        if (target_bs) {
++            bdrv_op_unblock_all(target_bs, snap_state.blocker);
++        }
 +        error_free(snap_state.blocker);
 +        snap_state.blocker = NULL;
 +        blk_unref(snap_state.target);
@@ -480,6 +483,7 @@ index 0000000000..4c90209188
 +    Error *local_err = NULL;
 +    MigrationState *ms = migrate_get_current();
 +    AioContext *iohandler_ctx = iohandler_get_aio_context();
++    BlockDriverState *target_bs = NULL;
 +    int ret = 0;
 +
 +    int bdrv_oflags = BDRV_O_RDWR | BDRV_O_RESIZE | BDRV_O_NO_FLUSH;
@@ -525,6 +529,11 @@ index 0000000000..4c90209188
 +        error_setg(errp, "failed to open '%s'", statefile);
 +        goto restart;
 +    }
++    target_bs = blk_bs(snap_state.target);
++    if (!target_bs) {
++        error_setg(errp, "failed to open '%s' - no block driver state", statefile);
++        goto restart;
++    }
 +
 +    QIOChannel *ioc = QIO_CHANNEL(qio_channel_savevm_async_new(snap_state.target,
 +                                                               &snap_state.bs_pos));
@@ -547,7 +556,7 @@ index 0000000000..4c90209188
 +    ms->to_dst_file = snap_state.file;
 +
 +    error_setg(&snap_state.blocker, "block device is in use by savevm");
-+    blk_op_block_all(snap_state.target, snap_state.blocker);
++    bdrv_op_block_all(target_bs, snap_state.blocker);
 +
 +    snap_state.state = SAVE_STATE_ACTIVE;
 +    snap_state.finalize_bh = qemu_bh_new(process_savevm_finalize, &snap_state);
@@ -643,6 +652,7 @@ index 0000000000..4c90209188
 +int load_snapshot_from_blockdev(const char *filename, Error **errp)
 +{
 +    BlockBackend *be;
++    BlockDriverState *bs = NULL;
 +    Error *local_err = NULL;
 +    Error *blocker = NULL;
 +
@@ -657,8 +667,14 @@ index 0000000000..4c90209188
 +        goto the_end;
 +    }
 +
++    bs = blk_bs(be);
++    if (!bs) {
++        error_setg(errp, "Could not open VM state file - missing block driver state");
++        goto the_end;
++    }
++
 +    error_setg(&blocker, "block device is in use by load state");
-+    blk_op_block_all(be, blocker);
++    bdrv_op_block_all(bs, blocker);
 +
 +    /* restore the VM state */
 +    f = qemu_file_new_input(QIO_CHANNEL(qio_channel_savevm_async_new(be, &bs_pos)));
@@ -688,7 +704,9 @@ index 0000000000..4c90209188
 +
 + the_end:
 +    if (be) {
-+        blk_op_unblock_all(be, blocker);
++        if (bs) {
++            bdrv_op_unblock_all(bs, blocker);
++        }
 +        error_free(blocker);
 +        blk_unref(be);
 +    }
@@ -748,7 +766,7 @@ index f601d06ab8..874084565f 100644
 +    }
 +}
 diff --git a/qapi/migration.json b/qapi/migration.json
-index 7324571e92..d6e94a7c41 100644
+index a605dc26db..927b1e1c7d 100644
 --- a/qapi/migration.json
 +++ b/qapi/migration.json
 @@ -276,6 +276,40 @@
@@ -822,10 +840,10 @@ index 559b66f201..7959e89c1e 100644
  # @CommandLineParameterType:
  #
 diff --git a/qemu-options.hx b/qemu-options.hx
-index d94e2cbbae..07730f9e65 100644
+index dacc9790a4..c05f411599 100644
 --- a/qemu-options.hx
 +++ b/qemu-options.hx
-@@ -4805,6 +4805,18 @@ SRST
+@@ -4764,6 +4764,18 @@ SRST
      Start right away with a saved state (``loadvm`` in monitor)
  ERST
  
@@ -845,7 +863,7 @@ index d94e2cbbae..07730f9e65 100644
  DEF("daemonize", 0, QEMU_OPTION_daemonize, \
      "-daemonize      daemonize QEMU after initializing\n", QEMU_ARCH_ALL)
 diff --git a/system/vl.c b/system/vl.c
-index 01b8b8e77a..d6bbdc906e 100644
+index 2f855d83fb..39d451bb41 100644
 --- a/system/vl.c
 +++ b/system/vl.c
 @@ -164,6 +164,7 @@ static const char *accelerators;
@@ -856,7 +874,7 @@ index 01b8b8e77a..d6bbdc906e 100644
  static QTAILQ_HEAD(, ObjectOption) object_opts = QTAILQ_HEAD_INITIALIZER(object_opts);
  static QTAILQ_HEAD(, DeviceOption) device_opts = QTAILQ_HEAD_INITIALIZER(device_opts);
  static int display_remote;
-@@ -2727,6 +2728,12 @@ void qmp_x_exit_preconfig(Error **errp)
+@@ -2725,6 +2726,12 @@ void qmp_x_exit_preconfig(Error **errp)
          RunState state = autostart ? RUN_STATE_RUNNING : runstate_get();
          load_snapshot(loadvm, NULL, false, NULL, &error_fatal);
          load_snapshot_resume(state);
@@ -869,7 +887,7 @@ index 01b8b8e77a..d6bbdc906e 100644
      }
      if (replay_mode != REPLAY_MODE_NONE) {
          replay_vmstate_init();
-@@ -3275,6 +3282,9 @@ void qemu_init(int argc, char **argv)
+@@ -3262,6 +3269,9 @@ void qemu_init(int argc, char **argv)
              case QEMU_OPTION_loadvm:
                  loadvm = optarg;
                  break;
diff --git a/debian/patches/pve/0018-PVE-add-optional-buffer-size-to-QEMUFile.patch b/debian/patches/pve/0018-PVE-add-optional-buffer-size-to-QEMUFile.patch
index 67d6ba8..59ff034 100644
--- a/debian/patches/pve/0018-PVE-add-optional-buffer-size-to-QEMUFile.patch
+++ b/debian/patches/pve/0018-PVE-add-optional-buffer-size-to-QEMUFile.patch
@@ -184,10 +184,10 @@ index 11c2120edd..edf3c5d147 100644
  
  /*
 diff --git a/migration/savevm-async.c b/migration/savevm-async.c
-index 4c90209188..eb562d3dcf 100644
+index ea8cdf1b00..7623d13df9 100644
 --- a/migration/savevm-async.c
 +++ b/migration/savevm-async.c
-@@ -381,7 +381,7 @@ void qmp_savevm_start(const char *statefile, Error **errp)
+@@ -390,7 +390,7 @@ void qmp_savevm_start(const char *statefile, Error **errp)
  
      QIOChannel *ioc = QIO_CHANNEL(qio_channel_savevm_async_new(snap_state.target,
                                                                 &snap_state.bs_pos));
@@ -196,8 +196,8 @@ index 4c90209188..eb562d3dcf 100644
  
      if (!snap_state.file) {
          error_setg(errp, "failed to open '%s'", statefile);
-@@ -514,7 +514,8 @@ int load_snapshot_from_blockdev(const char *filename, Error **errp)
-     blk_op_block_all(be, blocker);
+@@ -530,7 +530,8 @@ int load_snapshot_from_blockdev(const char *filename, Error **errp)
+     bdrv_op_block_all(bs, blocker);
  
      /* restore the VM state */
 -    f = qemu_file_new_input(QIO_CHANNEL(qio_channel_savevm_async_new(be, &bs_pos)));
diff --git a/debian/patches/pve/0020-PVE-Add-dummy-id-command-line-parameter.patch b/debian/patches/pve/0020-PVE-Add-dummy-id-command-line-parameter.patch
index d69cfab..1145940 100644
--- a/debian/patches/pve/0020-PVE-Add-dummy-id-command-line-parameter.patch
+++ b/debian/patches/pve/0020-PVE-Add-dummy-id-command-line-parameter.patch
@@ -14,7 +14,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  2 files changed, 11 insertions(+)
 
 diff --git a/qemu-options.hx b/qemu-options.hx
-index 07730f9e65..7fdc944965 100644
+index c05f411599..0732077a0e 100644
 --- a/qemu-options.hx
 +++ b/qemu-options.hx
 @@ -1239,6 +1239,9 @@ legacy PC, they are not recommended for modern configurations.
@@ -28,10 +28,10 @@ index 07730f9e65..7fdc944965 100644
      "-fda/-fdb file  use 'file' as floppy disk 0/1 image\n", QEMU_ARCH_ALL)
  DEF("fdb", HAS_ARG, QEMU_OPTION_fdb, "", QEMU_ARCH_ALL)
 diff --git a/system/vl.c b/system/vl.c
-index d6bbdc906e..200468a753 100644
+index 39d451bb41..e7cae51f13 100644
 --- a/system/vl.c
 +++ b/system/vl.c
-@@ -2764,6 +2764,7 @@ void qemu_init(int argc, char **argv)
+@@ -2762,6 +2762,7 @@ void qemu_init(int argc, char **argv)
      MachineClass *machine_class;
      bool userconfig = true;
      FILE *vmstate_dump_file = NULL;
@@ -39,7 +39,7 @@ index d6bbdc906e..200468a753 100644
  
      qemu_add_opts(&qemu_drive_opts);
      qemu_add_drive_opts(&qemu_legacy_drive_opts);
-@@ -3387,6 +3388,13 @@ void qemu_init(int argc, char **argv)
+@@ -3374,6 +3375,13 @@ void qemu_init(int argc, char **argv)
                  machine_parse_property_opt(qemu_find_opts("smp-opts"),
                                             "smp", optarg);
                  break;
diff --git a/debian/patches/pve/0021-PVE-Config-Revert-target-i386-disable-LINT0-after-re.patch b/debian/patches/pve/0021-PVE-Config-Revert-target-i386-disable-LINT0-after-re.patch
index 016810d..b353e47 100644
--- a/debian/patches/pve/0021-PVE-Config-Revert-target-i386-disable-LINT0-after-re.patch
+++ b/debian/patches/pve/0021-PVE-Config-Revert-target-i386-disable-LINT0-after-re.patch
@@ -11,7 +11,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 9 insertions(+)
 
 diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c
-index c13cdd7994..fd5808cdc0 100644
+index 62f3bbf203..89e0c7d995 100644
 --- a/hw/intc/apic_common.c
 +++ b/hw/intc/apic_common.c
 @@ -263,6 +263,15 @@ static void apic_reset_common(DeviceState *dev)
diff --git a/debian/patches/pve/0022-PVE-Up-Config-file-posix-make-locking-optiono-on-cre.patch b/debian/patches/pve/0022-PVE-Up-Config-file-posix-make-locking-optiono-on-cre.patch
index ec053d8..bb1b37e 100644
--- a/debian/patches/pve/0022-PVE-Up-Config-file-posix-make-locking-optiono-on-cre.patch
+++ b/debian/patches/pve/0022-PVE-Up-Config-file-posix-make-locking-optiono-on-cre.patch
@@ -13,7 +13,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  2 files changed, 46 insertions(+), 20 deletions(-)
 
 diff --git a/block/file-posix.c b/block/file-posix.c
-index 99e5bea1cc..6a4f6a25e6 100644
+index e2ea071315..4c3dc56c8e 100644
 --- a/block/file-posix.c
 +++ b/block/file-posix.c
 @@ -2884,6 +2884,7 @@ raw_co_create(BlockdevCreateOptions *options, Error **errp)
@@ -119,10 +119,10 @@ index 99e5bea1cc..6a4f6a25e6 100644
      };
      return raw_co_create(&options, errp);
 diff --git a/qapi/block-core.json b/qapi/block-core.json
-index c2a337cc04..1cb6f04db3 100644
+index 48ba32049f..321d1fd0e1 100644
 --- a/qapi/block-core.json
 +++ b/qapi/block-core.json
-@@ -4959,6 +4959,10 @@
+@@ -4974,6 +4974,10 @@
  # @extent-size-hint: Extent size hint to add to the image file; 0 for
  #     not adding an extent size hint (default: 1 MB, since 5.1)
  #
@@ -133,7 +133,7 @@ index c2a337cc04..1cb6f04db3 100644
  # Since: 2.12
  ##
  { 'struct': 'BlockdevCreateOptionsFile',
-@@ -4966,7 +4970,8 @@
+@@ -4981,7 +4985,8 @@
              'size':                 'size',
              '*preallocation':       'PreallocMode',
              '*nocow':               'bool',
diff --git a/debian/patches/pve/0024-PVE-Compat-4.0-used-balloon-qemu-4-0-config-size-fal.patch b/debian/patches/pve/0024-PVE-Compat-4.0-used-balloon-qemu-4-0-config-size-fal.patch
index 74bc24e..acc6583 100644
--- a/debian/patches/pve/0024-PVE-Compat-4.0-used-balloon-qemu-4-0-config-size-fal.patch
+++ b/debian/patches/pve/0024-PVE-Compat-4.0-used-balloon-qemu-4-0-config-size-fal.patch
@@ -26,10 +26,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/hw/core/machine.c b/hw/core/machine.c
-index 27dcda0248..7a13e9f014 100644
+index f29fe95964..2c327fc36a 100644
 --- a/hw/core/machine.c
 +++ b/hw/core/machine.c
-@@ -173,7 +173,8 @@ GlobalProperty hw_compat_4_0[] = {
+@@ -180,7 +180,8 @@ GlobalProperty hw_compat_4_0[] = {
      { "virtio-vga",     "edid", "false" },
      { "virtio-gpu-device", "edid", "false" },
      { "virtio-device", "use-started", "false" },
diff --git a/debian/patches/pve/0025-PVE-Allow-version-code-in-machine-type.patch b/debian/patches/pve/0025-PVE-Allow-version-code-in-machine-type.patch
index 70c1d15..10a6bc1 100644
--- a/debian/patches/pve/0025-PVE-Allow-version-code-in-machine-type.patch
+++ b/debian/patches/pve/0025-PVE-Allow-version-code-in-machine-type.patch
@@ -37,23 +37,23 @@ index 52a6d74820..362128842d 100644
  
          if (mc->default_cpu_type) {
 diff --git a/include/hw/boards.h b/include/hw/boards.h
-index 48ff6d8b93..5cddeb7fcb 100644
+index 36fbb9b59d..d1741ea121 100644
 --- a/include/hw/boards.h
 +++ b/include/hw/boards.h
-@@ -252,6 +252,8 @@ struct MachineClass {
+@@ -268,6 +268,8 @@ struct MachineClass {
      const char *desc;
      const char *deprecation_reason;
  
 +    const char *pve_version;
 +
      void (*init)(MachineState *state);
-     void (*reset)(MachineState *state, ShutdownCause reason);
+     void (*reset)(MachineState *state, ResetType type);
      void (*wakeup)(MachineState *state);
 diff --git a/qapi/machine.json b/qapi/machine.json
-index 0c703316f5..dc46a3e93f 100644
+index 16366b774a..12cfd3f260 100644
 --- a/qapi/machine.json
 +++ b/qapi/machine.json
-@@ -190,6 +190,8 @@
+@@ -189,6 +189,8 @@
  #
  # @acpi: machine type supports ACPI (since 8.0)
  #
@@ -62,7 +62,7 @@ index 0c703316f5..dc46a3e93f 100644
  # @compat-props: The machine type's compatibility properties.  Only
  #     present when query-machines argument @compat-props is true.
  #     (since 9.1)
-@@ -206,6 +208,7 @@
+@@ -205,6 +207,7 @@
              'hotpluggable-cpus': 'bool',  'numa-mem-supported': 'bool',
              'deprecated': 'bool', '*default-cpu-type': 'str',
              '*default-ram-id': 'str', 'acpi': 'bool',
@@ -71,7 +71,7 @@ index 0c703316f5..dc46a3e93f 100644
                                 'features': ['unstable'] } } }
  
 diff --git a/system/vl.c b/system/vl.c
-index 200468a753..0dbdba6421 100644
+index e7cae51f13..3f4916ac5a 100644
 --- a/system/vl.c
 +++ b/system/vl.c
 @@ -1675,6 +1675,7 @@ static MachineClass *select_machine(QDict *qdict, Error **errp)
@@ -94,7 +94,7 @@ index 200468a753..0dbdba6421 100644
      return machine_class;
  }
  
-@@ -3329,12 +3334,31 @@ void qemu_init(int argc, char **argv)
+@@ -3316,12 +3321,31 @@ void qemu_init(int argc, char **argv)
              case QEMU_OPTION_machine:
                  {
                      bool help;
diff --git a/debian/patches/pve/0026-block-backup-move-bcs-bitmap-initialization-to-job-c.patch b/debian/patches/pve/0026-block-backup-move-bcs-bitmap-initialization-to-job-c.patch
index df0672f..efdfe39 100644
--- a/debian/patches/pve/0026-block-backup-move-bcs-bitmap-initialization-to-job-c.patch
+++ b/debian/patches/pve/0026-block-backup-move-bcs-bitmap-initialization-to-job-c.patch
@@ -25,7 +25,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/block/backup.c b/block/backup.c
-index 3dd2e229d2..eba5b11493 100644
+index a1292c01ec..2e38b30d67 100644
 --- a/block/backup.c
 +++ b/block/backup.c
 @@ -237,8 +237,8 @@ static void backup_init_bcs_bitmap(BackupBlockJob *job)
diff --git a/debian/patches/pve/0027-PVE-Backup-add-vma-backup-format-code.patch b/debian/patches/pve/0027-PVE-Backup-add-vma-backup-format-code.patch
index e679ec6..addc323 100644
--- a/debian/patches/pve/0027-PVE-Backup-add-vma-backup-format-code.patch
+++ b/debian/patches/pve/0027-PVE-Backup-add-vma-backup-format-code.patch
@@ -39,10 +39,10 @@ index 6a60b5d6b9..652c8cbdb7 100644
  system_ss.add(files('block-ram-registrar.c'))
  
 diff --git a/meson.build b/meson.build
-index aa7ea85d0b..7eee5b4249 100644
+index 147097c652..b9b673c271 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -2012,6 +2012,8 @@ endif
+@@ -2129,6 +2129,8 @@ endif
  
  has_gettid = cc.has_function('gettid')
  
@@ -51,7 +51,7 @@ index aa7ea85d0b..7eee5b4249 100644
  # libselinux
  selinux = dependency('libselinux',
                       required: get_option('selinux'),
-@@ -4097,6 +4099,9 @@ if have_tools
+@@ -4344,6 +4346,9 @@ if have_tools
                 dependencies: [blockdev, qemuutil, selinux],
                 install: true)
  
diff --git a/debian/patches/pve/0028-PVE-Backup-add-backup-dump-block-driver.patch b/debian/patches/pve/0028-PVE-Backup-add-backup-dump-block-driver.patch
index 39bb0c3..b0cfb58 100644
--- a/debian/patches/pve/0028-PVE-Backup-add-backup-dump-block-driver.patch
+++ b/debian/patches/pve/0028-PVE-Backup-add-backup-dump-block-driver.patch
@@ -199,7 +199,7 @@ index 0000000000..e46abf1070
 +    return bs;
 +}
 diff --git a/block/backup.c b/block/backup.c
-index eba5b11493..1963e47ab9 100644
+index 2e38b30d67..fe69723ada 100644
 --- a/block/backup.c
 +++ b/block/backup.c
 @@ -29,28 +29,6 @@
diff --git a/debian/patches/pve/0030-PVE-Backup-Proxmox-backup-patches-for-QEMU.patch b/debian/patches/pve/0030-PVE-Backup-Proxmox-backup-patches-for-QEMU.patch
index 7ed6dd2..0180f85 100644
--- a/debian/patches/pve/0030-PVE-Backup-Proxmox-backup-patches-for-QEMU.patch
+++ b/debian/patches/pve/0030-PVE-Backup-Proxmox-backup-patches-for-QEMU.patch
@@ -167,7 +167,7 @@ index bdf2eb50b6..439a7a14c8 100644
 +    hmp_handle_error(mon, error);
 +}
 diff --git a/blockdev.c b/blockdev.c
-index 9cbd166674..8080c47fa6 100644
+index 79d47b1920..3f67eb413d 100644
 --- a/blockdev.c
 +++ b/blockdev.c
 @@ -37,6 +37,7 @@
@@ -265,10 +265,10 @@ index 2596cc2426..9dda91d65a 100644
  void hmp_device_add(Monitor *mon, const QDict *qdict);
  void hmp_device_del(Monitor *mon, const QDict *qdict);
 diff --git a/meson.build b/meson.build
-index 7eee5b4249..979c452f74 100644
+index b9b673c271..f6fb9b4fd8 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -2013,6 +2013,7 @@ endif
+@@ -2130,6 +2130,7 @@ endif
  has_gettid = cc.has_function('gettid')
  
  libuuid = cc.find_library('uuid', required: true)
@@ -1683,7 +1683,7 @@ index 0000000000..9f83ecb310
 +    return ret;
 +}
 diff --git a/qapi/block-core.json b/qapi/block-core.json
-index 1cb6f04db3..ac83c3495d 100644
+index 321d1fd0e1..68caf30084 100644
 --- a/qapi/block-core.json
 +++ b/qapi/block-core.json
 @@ -851,6 +851,239 @@
@@ -1927,10 +1927,10 @@ index 1cb6f04db3..ac83c3495d 100644
  # @BlockDeviceTimedStats:
  #
 diff --git a/qapi/common.json b/qapi/common.json
-index 7558ce5430..5c00bddeb7 100644
+index 6ffc7a3789..9c6c671ece 100644
 --- a/qapi/common.json
 +++ b/qapi/common.json
-@@ -200,3 +200,17 @@
+@@ -212,3 +212,17 @@
  ##
  { 'struct': 'HumanReadableText',
    'data': { 'human-readable-text': 'str' } }
@@ -1949,7 +1949,7 @@ index 7558ce5430..5c00bddeb7 100644
 +##
 +{ 'struct': 'UuidInfo', 'data': {'UUID': 'str'} }
 diff --git a/qapi/machine.json b/qapi/machine.json
-index dc46a3e93f..bd58d58fc5 100644
+index 12cfd3f260..a8abdb42a3 100644
 --- a/qapi/machine.json
 +++ b/qapi/machine.json
 @@ -4,6 +4,8 @@
@@ -1961,7 +1961,7 @@ index dc46a3e93f..bd58d58fc5 100644
  ##
  # = Machines
  ##
-@@ -303,20 +305,6 @@
+@@ -302,20 +304,6 @@
  ##
  { 'command': 'query-target', 'returns': 'TargetInfo' }
  
diff --git a/debian/patches/pve/0031-PVE-Backup-pbs-restore-new-command-to-restore-from-p.patch b/debian/patches/pve/0031-PVE-Backup-pbs-restore-new-command-to-restore-from-p.patch
index 5d6f956..0aefed3 100644
--- a/debian/patches/pve/0031-PVE-Backup-pbs-restore-new-command-to-restore-from-p.patch
+++ b/debian/patches/pve/0031-PVE-Backup-pbs-restore-new-command-to-restore-from-p.patch
@@ -14,10 +14,10 @@ Signed-off-by: Wolfgang Bumiller <w.bumiller at proxmox.com>
  create mode 100644 pbs-restore.c
 
 diff --git a/meson.build b/meson.build
-index 979c452f74..426f382178 100644
+index f6fb9b4fd8..f666d0f028 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -4103,6 +4103,10 @@ if have_tools
+@@ -4350,6 +4350,10 @@ if have_tools
    vma = executable('vma', files('vma.c', 'vma-reader.c') + genh,
                     dependencies: [authz, block, crypto, io, qemuutil, qom], install: true)
  
diff --git a/debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch b/debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch
index 95b82a2..eaac4e5 100644
--- a/debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch
+++ b/debian/patches/pve/0032-PVE-Add-PBS-block-driver-to-map-backup-archives-into.patch
@@ -348,23 +348,23 @@ index 0000000000..2d5e28ce8f
 +
 +block_init(bdrv_pbs_init);
 diff --git a/meson.build b/meson.build
-index 426f382178..7e6130cfdf 100644
+index f666d0f028..4c85736ec3 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -4559,7 +4559,7 @@ summary_info += {'zstd support':      zstd}
- summary_info += {'Query Processing Library support': qpl}
+@@ -4815,7 +4815,7 @@ summary_info += {'Query Processing Library support': qpl}
  summary_info += {'UADK Library support': uadk}
+ summary_info += {'qatzip support':    qatzip}
  summary_info += {'NUMA host support': numa}
 -summary_info += {'capstone':          capstone}
 +summary_info += {'PBS bdrv support':  config_host.has_key('CONFIG_PBS_BDRV')}
  summary_info += {'libpmem support':   libpmem}
  summary_info += {'libdaxctl support': libdaxctl}
- summary_info += {'libudev':           libudev}
+ summary_info += {'libcbor support':   libcbor}
 diff --git a/qapi/block-core.json b/qapi/block-core.json
-index ac83c3495d..fe0eefcea6 100644
+index 68caf30084..d45e8975a7 100644
 --- a/qapi/block-core.json
 +++ b/qapi/block-core.json
-@@ -3457,6 +3457,7 @@
+@@ -3466,6 +3466,7 @@
              'parallels', 'preallocate', 'qcow', 'qcow2', 'qed', 'quorum',
              'raw', 'rbd',
              { 'name': 'replication', 'if': 'CONFIG_REPLICATION' },
@@ -372,7 +372,7 @@ index ac83c3495d..fe0eefcea6 100644
              'ssh', 'throttle', 'vdi', 'vhdx',
              { 'name': 'virtio-blk-vfio-pci', 'if': 'CONFIG_BLKIO' },
              { 'name': 'virtio-blk-vhost-user', 'if': 'CONFIG_BLKIO' },
-@@ -3543,6 +3544,33 @@
+@@ -3552,6 +3553,33 @@
  { 'struct': 'BlockdevOptionsNull',
    'data': { '*size': 'int', '*latency-ns': 'uint64', '*read-zeroes': 'bool' } }
  
@@ -406,7 +406,7 @@ index ac83c3495d..fe0eefcea6 100644
  ##
  # @BlockdevOptionsNVMe:
  #
-@@ -4978,6 +5006,7 @@
+@@ -4993,6 +5021,7 @@
        'nfs':        'BlockdevOptionsNfs',
        'null-aio':   'BlockdevOptionsNull',
        'null-co':    'BlockdevOptionsNull',
@@ -415,10 +415,10 @@ index ac83c3495d..fe0eefcea6 100644
        'nvme-io_uring': { 'type': 'BlockdevOptionsNvmeIoUring',
                           'if': 'CONFIG_BLKIO' },
 diff --git a/qapi/pragma.json b/qapi/pragma.json
-index be8fa304c5..7ff46bd128 100644
+index 6aaa9cb975..e9c595c4ba 100644
 --- a/qapi/pragma.json
 +++ b/qapi/pragma.json
-@@ -100,6 +100,7 @@
+@@ -91,6 +91,7 @@
          'BlockInfo',                # query-block
          'BlockdevAioOptions',       # blockdev-add, -blockdev
          'BlockdevDriver',           # blockdev-add, query-blockstats, ...
diff --git a/debian/patches/pve/0033-PVE-redirect-stderr-to-journal-when-daemonized.patch b/debian/patches/pve/0033-PVE-redirect-stderr-to-journal-when-daemonized.patch
index a4b4cdf..4f88337 100644
--- a/debian/patches/pve/0033-PVE-redirect-stderr-to-journal-when-daemonized.patch
+++ b/debian/patches/pve/0033-PVE-redirect-stderr-to-journal-when-daemonized.patch
@@ -14,10 +14,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  2 files changed, 7 insertions(+), 3 deletions(-)
 
 diff --git a/meson.build b/meson.build
-index 7e6130cfdf..984f858bdc 100644
+index 4c85736ec3..57f666d722 100644
 --- a/meson.build
 +++ b/meson.build
-@@ -2013,6 +2013,7 @@ endif
+@@ -2130,6 +2130,7 @@ endif
  has_gettid = cc.has_function('gettid')
  
  libuuid = cc.find_library('uuid', required: true)
@@ -25,7 +25,7 @@ index 7e6130cfdf..984f858bdc 100644
  libproxmox_backup_qemu = cc.find_library('proxmox_backup_qemu', required: true)
  
  # libselinux
-@@ -3597,7 +3598,7 @@ if have_block
+@@ -3744,7 +3745,7 @@ if have_block
    if host_os == 'windows'
      system_ss.add(files('os-win32.c'))
    else
diff --git a/debian/patches/pve/0034-PVE-Migrate-dirty-bitmap-state-via-savevm.patch b/debian/patches/pve/0034-PVE-Migrate-dirty-bitmap-state-via-savevm.patch
index 6377a09..cbd90cc 100644
--- a/debian/patches/pve/0034-PVE-Migrate-dirty-bitmap-state-via-savevm.patch
+++ b/debian/patches/pve/0034-PVE-Migrate-dirty-bitmap-state-via-savevm.patch
@@ -26,19 +26,19 @@ Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
  create mode 100644 migration/pbs-state.c
 
 diff --git a/include/migration/misc.h b/include/migration/misc.h
-index bfadc5613b..e2e51fcf6b 100644
+index 804eb23c06..c75b146ae6 100644
 --- a/include/migration/misc.h
 +++ b/include/migration/misc.h
-@@ -111,4 +111,7 @@ bool migration_in_bg_snapshot(void);
- /* migration/block-dirty-bitmap.c */
- void dirty_bitmap_mig_init(void);
+@@ -106,4 +106,7 @@ bool migration_incoming_postcopy_advised(void);
+ /* True if background snapshot is active */
+ bool migration_in_bg_snapshot(void);
  
 +/* migration/pbs-state.c */
 +void pbs_state_mig_init(void);
 +
  #endif
 diff --git a/migration/meson.build b/migration/meson.build
-index 4b0c4f0f51..d039797132 100644
+index 075b013971..eca57cb2a3 100644
 --- a/migration/meson.build
 +++ b/migration/meson.build
 @@ -8,6 +8,7 @@ migration_files = files(
@@ -49,7 +49,7 @@ index 4b0c4f0f51..d039797132 100644
  
  system_ss.add(files(
    'block-dirty-bitmap.c',
-@@ -25,6 +26,7 @@ system_ss.add(files(
+@@ -27,6 +28,7 @@ system_ss.add(files(
    'multifd-zlib.c',
    'multifd-zero-page.c',
    'options.c',
@@ -58,13 +58,13 @@ index 4b0c4f0f51..d039797132 100644
    'savevm.c',
    'savevm-async.c',
 diff --git a/migration/migration.c b/migration/migration.c
-index ae2be31557..fab4c20ee4 100644
+index 8c5bd0a75c..491d9aa017 100644
 --- a/migration/migration.c
 +++ b/migration/migration.c
-@@ -263,6 +263,7 @@ void migration_object_init(void)
+@@ -266,6 +266,7 @@ void migration_object_init(void)
  
-     ram_mig_init();
-     dirty_bitmap_mig_init();
+     /* Initialize cpu throttle timers */
+     cpu_throttle_init();
 +    pbs_state_mig_init();
  }
  
@@ -192,7 +192,7 @@ index 9f83ecb310..57477f7f2a 100644
      ret->pbs_masterkey = true;
      ret->backup_max_workers = true;
 diff --git a/qapi/block-core.json b/qapi/block-core.json
-index fe0eefcea6..521a1914e8 100644
+index d45e8975a7..9795247c1f 100644
 --- a/qapi/block-core.json
 +++ b/qapi/block-core.json
 @@ -1004,6 +1004,11 @@
diff --git a/debian/patches/pve/0037-PVE-block-stream-increase-chunk-size.patch b/debian/patches/pve/0037-PVE-block-stream-increase-chunk-size.patch
index 5663dcc..32fd8ca 100644
--- a/debian/patches/pve/0037-PVE-block-stream-increase-chunk-size.patch
+++ b/debian/patches/pve/0037-PVE-block-stream-increase-chunk-size.patch
@@ -11,7 +11,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/block/stream.c b/block/stream.c
-index 7031eef12b..d2da83ae7c 100644
+index 9076203193..1d1c65f061 100644
 --- a/block/stream.c
 +++ b/block/stream.c
 @@ -27,7 +27,7 @@ enum {
diff --git a/debian/patches/pve/0038-block-add-alloc-track-driver.patch b/debian/patches/pve/0038-block-add-alloc-track-driver.patch
index a398c56..6d1056b 100644
--- a/debian/patches/pve/0038-block-add-alloc-track-driver.patch
+++ b/debian/patches/pve/0038-block-add-alloc-track-driver.patch
@@ -425,7 +425,7 @@ index e178047ec9..7ef7250d31 100644
    'backup.c',
    'backup-dump.c',
 diff --git a/block/stream.c b/block/stream.c
-index d2da83ae7c..f941cba14e 100644
+index 1d1c65f061..d499c8883f 100644
 --- a/block/stream.c
 +++ b/block/stream.c
 @@ -120,6 +120,40 @@ static int stream_prepare(Job *job)
diff --git a/debian/patches/pve/0039-Revert-block-rbd-workaround-for-ceph-issue-53784.patch b/debian/patches/pve/0039-Revert-block-rbd-workaround-for-ceph-issue-53784.patch
index c773c6c..0c4243a 100644
--- a/debian/patches/pve/0039-Revert-block-rbd-workaround-for-ceph-issue-53784.patch
+++ b/debian/patches/pve/0039-Revert-block-rbd-workaround-for-ceph-issue-53784.patch
@@ -13,7 +13,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 2 insertions(+), 40 deletions(-)
 
 diff --git a/block/rbd.c b/block/rbd.c
-index 101ee59d6e..4ad3b1a7b1 100644
+index 728bce3b1e..6c9a8e0add 100644
 --- a/block/rbd.c
 +++ b/block/rbd.c
 @@ -1515,7 +1515,6 @@ static int coroutine_fn qemu_rbd_co_block_status(BlockDriverState *bs,
diff --git a/debian/patches/pve/0040-Revert-block-rbd-fix-handling-of-holes-in-.bdrv_co_b.patch b/debian/patches/pve/0040-Revert-block-rbd-fix-handling-of-holes-in-.bdrv_co_b.patch
index dfe5895..95158ce 100644
--- a/debian/patches/pve/0040-Revert-block-rbd-fix-handling-of-holes-in-.bdrv_co_b.patch
+++ b/debian/patches/pve/0040-Revert-block-rbd-fix-handling-of-holes-in-.bdrv_co_b.patch
@@ -14,7 +14,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 5 insertions(+), 5 deletions(-)
 
 diff --git a/block/rbd.c b/block/rbd.c
-index 4ad3b1a7b1..e341745255 100644
+index 6c9a8e0add..6f5fe90f3a 100644
 --- a/block/rbd.c
 +++ b/block/rbd.c
 @@ -1474,11 +1474,11 @@ static int qemu_rbd_diff_iterate_cb(uint64_t offs, size_t len,
diff --git a/debian/patches/pve/0041-Revert-block-rbd-implement-bdrv_co_block_status.patch b/debian/patches/pve/0041-Revert-block-rbd-implement-bdrv_co_block_status.patch
index 596649e..ed8bc16 100644
--- a/debian/patches/pve/0041-Revert-block-rbd-implement-bdrv_co_block_status.patch
+++ b/debian/patches/pve/0041-Revert-block-rbd-implement-bdrv_co_block_status.patch
@@ -24,7 +24,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
  1 file changed, 112 deletions(-)
 
 diff --git a/block/rbd.c b/block/rbd.c
-index e341745255..436d3d7811 100644
+index 6f5fe90f3a..24e820d056 100644
 --- a/block/rbd.c
 +++ b/block/rbd.c
 @@ -108,12 +108,6 @@ typedef struct RBDTask {
diff --git a/debian/patches/pve/0046-PVE-backup-add-fleecing-option.patch b/debian/patches/pve/0044-PVE-backup-add-fleecing-option.patch
similarity index 99%
rename from debian/patches/pve/0046-PVE-backup-add-fleecing-option.patch
rename to debian/patches/pve/0044-PVE-backup-add-fleecing-option.patch
index 3a70297..aa43103 100644
--- a/debian/patches/pve/0046-PVE-backup-add-fleecing-option.patch
+++ b/debian/patches/pve/0044-PVE-backup-add-fleecing-option.patch
@@ -294,7 +294,7 @@ index 57477f7f2a..0f098000dd 100644
      return ret;
  }
 diff --git a/qapi/block-core.json b/qapi/block-core.json
-index 653df22046..9f25c398ec 100644
+index 9795247c1f..c581f1f238 100644
 --- a/qapi/block-core.json
 +++ b/qapi/block-core.json
 @@ -948,6 +948,10 @@
diff --git a/debian/patches/pve/0044-copy-before-write-allow-specifying-minimum-cluster-s.patch b/debian/patches/pve/0044-copy-before-write-allow-specifying-minimum-cluster-s.patch
deleted file mode 100644
index 3c13f8c..0000000
--- a/debian/patches/pve/0044-copy-before-write-allow-specifying-minimum-cluster-s.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Fiona Ebner <f.ebner at proxmox.com>
-Date: Thu, 11 Apr 2024 11:29:26 +0200
-Subject: [PATCH] copy-before-write: allow specifying minimum cluster size
-
-Useful to make discard-source work in the context of backup fleecing
-when the fleecing image has a larger granularity than the backup
-target.
-
-Copy-before-write operations will use at least this granularity and in
-particular, discard requests to the source node will too. If the
-granularity is too small, they will just be aligned down in
-cbw_co_pdiscard_snapshot() and thus effectively ignored.
-
-The QAPI uses uint32 so the value will be non-negative, but still fit
-into a uint64_t.
-
-Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
-Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
----
- block/block-copy.c         | 17 +++++++++++++----
- block/copy-before-write.c  |  3 ++-
- include/block/block-copy.h |  1 +
- qapi/block-core.json       |  8 +++++++-
- 4 files changed, 23 insertions(+), 6 deletions(-)
-
-diff --git a/block/block-copy.c b/block/block-copy.c
-index cc618e4561..12d662e9d4 100644
---- a/block/block-copy.c
-+++ b/block/block-copy.c
-@@ -310,6 +310,7 @@ void block_copy_set_copy_opts(BlockCopyState *s, bool use_copy_range,
- }
- 
- static int64_t block_copy_calculate_cluster_size(BlockDriverState *target,
-+                                                 int64_t min_cluster_size,
-                                                  Error **errp)
- {
-     int ret;
-@@ -335,7 +336,7 @@ static int64_t block_copy_calculate_cluster_size(BlockDriverState *target,
-                     "used. If the actual block size of the target exceeds "
-                     "this default, the backup may be unusable",
-                     BLOCK_COPY_CLUSTER_SIZE_DEFAULT);
--        return BLOCK_COPY_CLUSTER_SIZE_DEFAULT;
-+        return MAX(min_cluster_size, BLOCK_COPY_CLUSTER_SIZE_DEFAULT);
-     } else if (ret < 0 && !target_does_cow) {
-         error_setg_errno(errp, -ret,
-             "Couldn't determine the cluster size of the target image, "
-@@ -345,16 +346,18 @@ static int64_t block_copy_calculate_cluster_size(BlockDriverState *target,
-         return ret;
-     } else if (ret < 0 && target_does_cow) {
-         /* Not fatal; just trudge on ahead. */
--        return BLOCK_COPY_CLUSTER_SIZE_DEFAULT;
-+        return MAX(min_cluster_size, BLOCK_COPY_CLUSTER_SIZE_DEFAULT);
-     }
- 
--    return MAX(BLOCK_COPY_CLUSTER_SIZE_DEFAULT, bdi.cluster_size);
-+    return MAX(min_cluster_size,
-+               MAX(BLOCK_COPY_CLUSTER_SIZE_DEFAULT, bdi.cluster_size));
- }
- 
- BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target,
-                                      BlockDriverState *copy_bitmap_bs,
-                                      const BdrvDirtyBitmap *bitmap,
-                                      bool discard_source,
-+                                     int64_t min_cluster_size,
-                                      Error **errp)
- {
-     ERRP_GUARD();
-@@ -365,7 +368,13 @@ BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target,
- 
-     GLOBAL_STATE_CODE();
- 
--    cluster_size = block_copy_calculate_cluster_size(target->bs, errp);
-+    if (min_cluster_size && !is_power_of_2(min_cluster_size)) {
-+        error_setg(errp, "min-cluster-size needs to be a power of 2");
-+        return NULL;
-+    }
-+
-+    cluster_size = block_copy_calculate_cluster_size(target->bs,
-+                                                     min_cluster_size, errp);
-     if (cluster_size < 0) {
-         return NULL;
-     }
-diff --git a/block/copy-before-write.c b/block/copy-before-write.c
-index 28f6a096cd..ef4e666303 100644
---- a/block/copy-before-write.c
-+++ b/block/copy-before-write.c
-@@ -478,7 +478,8 @@ static int cbw_open(BlockDriverState *bs, QDict *options, int flags,
- 
-     s->discard_source = flags & BDRV_O_CBW_DISCARD_SOURCE;
-     s->bcs = block_copy_state_new(bs->file, s->target, bs, bitmap,
--                                  flags & BDRV_O_CBW_DISCARD_SOURCE, errp);
-+                                  flags & BDRV_O_CBW_DISCARD_SOURCE,
-+                                  opts->min_cluster_size, errp);
-     if (!s->bcs) {
-         error_prepend(errp, "Cannot create block-copy-state: ");
-         return -EINVAL;
-diff --git a/include/block/block-copy.h b/include/block/block-copy.h
-index bdc703bacd..77857c6c68 100644
---- a/include/block/block-copy.h
-+++ b/include/block/block-copy.h
-@@ -28,6 +28,7 @@ BlockCopyState *block_copy_state_new(BdrvChild *source, BdrvChild *target,
-                                      BlockDriverState *copy_bitmap_bs,
-                                      const BdrvDirtyBitmap *bitmap,
-                                      bool discard_source,
-+                                     int64_t min_cluster_size,
-                                      Error **errp);
- 
- /* Function should be called prior any actual copy request */
-diff --git a/qapi/block-core.json b/qapi/block-core.json
-index 521a1914e8..171846deb1 100644
---- a/qapi/block-core.json
-+++ b/qapi/block-core.json
-@@ -4927,12 +4927,18 @@
- #     @on-cbw-error parameter will decide how this failure is handled.
- #     Default 0.  (Since 7.1)
- #
-+# @min-cluster-size: Minimum size of blocks used by copy-before-write
-+#     operations.  Has to be a power of 2.  No effect if smaller than
-+#     the maximum of the target's cluster size and 64 KiB.  Default 0.
-+#     (Since 8.1)
-+#
- # Since: 6.2
- ##
- { 'struct': 'BlockdevOptionsCbw',
-   'base': 'BlockdevOptionsGenericFormat',
-   'data': { 'target': 'BlockdevRef', '*bitmap': 'BlockDirtyBitmap',
--            '*on-cbw-error': 'OnCbwError', '*cbw-timeout': 'uint32' } }
-+            '*on-cbw-error': 'OnCbwError', '*cbw-timeout': 'uint32',
-+            '*min-cluster-size': 'uint32' } }
- 
- ##
- # @BlockdevOptions:
diff --git a/debian/patches/pve/0047-PVE-backup-improve-error-when-copy-before-write-fail.patch b/debian/patches/pve/0045-PVE-backup-improve-error-when-copy-before-write-fail.patch
similarity index 96%
rename from debian/patches/pve/0047-PVE-backup-improve-error-when-copy-before-write-fail.patch
rename to debian/patches/pve/0045-PVE-backup-improve-error-when-copy-before-write-fail.patch
index a7e8986..8c51a39 100644
--- a/debian/patches/pve/0047-PVE-backup-improve-error-when-copy-before-write-fail.patch
+++ b/debian/patches/pve/0045-PVE-backup-improve-error-when-copy-before-write-fail.patch
@@ -21,7 +21,7 @@ Tested-by: Friedrich Weber <f.weber at proxmox.com>
  3 files changed, 22 insertions(+), 6 deletions(-)
 
 diff --git a/block/copy-before-write.c b/block/copy-before-write.c
-index adb27649a8..a5bb4d14f6 100644
+index 81afeff1c7..fdf9cdc0cd 100644
 --- a/block/copy-before-write.c
 +++ b/block/copy-before-write.c
 @@ -27,6 +27,7 @@
@@ -71,7 +71,7 @@ index adb27649a8..a5bb4d14f6 100644
          g_free(req);
          return NULL;
      }
-@@ -586,6 +586,12 @@ void bdrv_cbw_drop(BlockDriverState *bs)
+@@ -595,6 +595,12 @@ void bdrv_cbw_drop(BlockDriverState *bs)
      bdrv_unref(bs);
  }
  
@@ -85,7 +85,7 @@ index adb27649a8..a5bb4d14f6 100644
  {
      bdrv_register(&bdrv_cbw_filter);
 diff --git a/block/copy-before-write.h b/block/copy-before-write.h
-index dc6cafe7fa..a27d2d7d9f 100644
+index 2a5d4ba693..969da3620f 100644
 --- a/block/copy-before-write.h
 +++ b/block/copy-before-write.h
 @@ -44,5 +44,6 @@ BlockDriverState *bdrv_cbw_append(BlockDriverState *source,
diff --git a/debian/patches/pve/0045-backup-add-minimum-cluster-size-to-performance-optio.patch b/debian/patches/pve/0045-backup-add-minimum-cluster-size-to-performance-optio.patch
deleted file mode 100644
index e0ab0b3..0000000
--- a/debian/patches/pve/0045-backup-add-minimum-cluster-size-to-performance-optio.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Fiona Ebner <f.ebner at proxmox.com>
-Date: Thu, 11 Apr 2024 11:29:27 +0200
-Subject: [PATCH] backup: add minimum cluster size to performance options
-
-Useful to make discard-source work in the context of backup fleecing
-when the fleecing image has a larger granularity than the backup
-target.
-
-Backup/block-copy will use at least this granularity for copy operations
-and in particular, discard requests to the backup source will too. If
-the granularity is too small, they will just be aligned down in
-cbw_co_pdiscard_snapshot() and thus effectively ignored.
-
-Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
-Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
----
- block/backup.c            | 2 +-
- block/copy-before-write.c | 2 ++
- block/copy-before-write.h | 1 +
- blockdev.c                | 3 +++
- qapi/block-core.json      | 9 +++++++--
- 5 files changed, 14 insertions(+), 3 deletions(-)
-
-diff --git a/block/backup.c b/block/backup.c
-index 1963e47ab9..fe69723ada 100644
---- a/block/backup.c
-+++ b/block/backup.c
-@@ -434,7 +434,7 @@ BlockJob *backup_job_create(const char *job_id, BlockDriverState *bs,
-     }
- 
-     cbw = bdrv_cbw_append(bs, target, filter_node_name, discard_source,
--                          &bcs, errp);
-+                          perf->min_cluster_size, &bcs, errp);
-     if (!cbw) {
-         goto error;
-     }
-diff --git a/block/copy-before-write.c b/block/copy-before-write.c
-index ef4e666303..adb27649a8 100644
---- a/block/copy-before-write.c
-+++ b/block/copy-before-write.c
-@@ -547,6 +547,7 @@ BlockDriverState *bdrv_cbw_append(BlockDriverState *source,
-                                   BlockDriverState *target,
-                                   const char *filter_node_name,
-                                   bool discard_source,
-+                                  int64_t min_cluster_size,
-                                   BlockCopyState **bcs,
-                                   Error **errp)
- {
-@@ -565,6 +566,7 @@ BlockDriverState *bdrv_cbw_append(BlockDriverState *source,
-     }
-     qdict_put_str(opts, "file", bdrv_get_node_name(source));
-     qdict_put_str(opts, "target", bdrv_get_node_name(target));
-+    qdict_put_int(opts, "min-cluster-size", min_cluster_size);
- 
-     top = bdrv_insert_node(source, opts, flags, errp);
-     if (!top) {
-diff --git a/block/copy-before-write.h b/block/copy-before-write.h
-index 01af0cd3c4..dc6cafe7fa 100644
---- a/block/copy-before-write.h
-+++ b/block/copy-before-write.h
-@@ -40,6 +40,7 @@ BlockDriverState *bdrv_cbw_append(BlockDriverState *source,
-                                   BlockDriverState *target,
-                                   const char *filter_node_name,
-                                   bool discard_source,
-+                                  int64_t min_cluster_size,
-                                   BlockCopyState **bcs,
-                                   Error **errp);
- void bdrv_cbw_drop(BlockDriverState *bs);
-diff --git a/blockdev.c b/blockdev.c
-index 8080c47fa6..3f67eb413d 100644
---- a/blockdev.c
-+++ b/blockdev.c
-@@ -2656,6 +2656,9 @@ static BlockJob *do_backup_common(BackupCommon *backup,
-         if (backup->x_perf->has_max_chunk) {
-             perf.max_chunk = backup->x_perf->max_chunk;
-         }
-+        if (backup->x_perf->has_min_cluster_size) {
-+            perf.min_cluster_size = backup->x_perf->min_cluster_size;
-+        }
-     }
- 
-     if ((backup->sync == MIRROR_SYNC_MODE_BITMAP) ||
-diff --git a/qapi/block-core.json b/qapi/block-core.json
-index 171846deb1..653df22046 100644
---- a/qapi/block-core.json
-+++ b/qapi/block-core.json
-@@ -1790,11 +1790,16 @@
- #     it should not be less than job cluster size which is calculated
- #     as maximum of target image cluster size and 64k.  Default 0.
- #
-+# @min-cluster-size: Minimum size of blocks used by copy-before-write
-+#     and background copy operations.  Has to be a power of 2.  No
-+#     effect if smaller than the maximum of the target's cluster size
-+#     and 64 KiB.  Default 0. (Since 8.1)
-+#
- # Since: 6.0
- ##
- { 'struct': 'BackupPerf',
--  'data': { '*use-copy-range': 'bool',
--            '*max-workers': 'int', '*max-chunk': 'int64' } }
-+  'data': { '*use-copy-range': 'bool', '*max-workers': 'int',
-+            '*max-chunk': 'int64', '*min-cluster-size': 'uint32' } }
- 
- ##
- # @BackupCommon:
diff --git a/debian/patches/pve/0048-PVE-backup-fixup-error-handling-for-fleecing.patch b/debian/patches/pve/0046-PVE-backup-fixup-error-handling-for-fleecing.patch
similarity index 100%
rename from debian/patches/pve/0048-PVE-backup-fixup-error-handling-for-fleecing.patch
rename to debian/patches/pve/0046-PVE-backup-fixup-error-handling-for-fleecing.patch
diff --git a/debian/patches/pve/0049-PVE-backup-factor-out-setting-up-snapshot-access-for.patch b/debian/patches/pve/0047-PVE-backup-factor-out-setting-up-snapshot-access-for.patch
similarity index 100%
rename from debian/patches/pve/0049-PVE-backup-factor-out-setting-up-snapshot-access-for.patch
rename to debian/patches/pve/0047-PVE-backup-factor-out-setting-up-snapshot-access-for.patch
diff --git a/debian/patches/pve/0050-PVE-backup-save-device-name-in-device-info-structure.patch b/debian/patches/pve/0048-PVE-backup-save-device-name-in-device-info-structure.patch
similarity index 100%
rename from debian/patches/pve/0050-PVE-backup-save-device-name-in-device-info-structure.patch
rename to debian/patches/pve/0048-PVE-backup-save-device-name-in-device-info-structure.patch
diff --git a/debian/patches/pve/0051-PVE-backup-include-device-name-in-error-when-setting.patch b/debian/patches/pve/0049-PVE-backup-include-device-name-in-error-when-setting.patch
similarity index 100%
rename from debian/patches/pve/0051-PVE-backup-include-device-name-in-error-when-setting.patch
rename to debian/patches/pve/0049-PVE-backup-include-device-name-in-error-when-setting.patch
diff --git a/debian/patches/pve/0052-adapt-machine-version-deprecation-for-Proxmox-VE.patch b/debian/patches/pve/0050-adapt-machine-version-deprecation-for-Proxmox-VE.patch
similarity index 97%
rename from debian/patches/pve/0052-adapt-machine-version-deprecation-for-Proxmox-VE.patch
rename to debian/patches/pve/0050-adapt-machine-version-deprecation-for-Proxmox-VE.patch
index 6c1a73a..f80b21c 100644
--- a/debian/patches/pve/0052-adapt-machine-version-deprecation-for-Proxmox-VE.patch
+++ b/debian/patches/pve/0050-adapt-machine-version-deprecation-for-Proxmox-VE.patch
@@ -22,10 +22,10 @@ Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
  1 file changed, 51 insertions(+), 27 deletions(-)
 
 diff --git a/include/hw/boards.h b/include/hw/boards.h
-index 5cddeb7fcb..b1e7787499 100644
+index d1741ea121..3f9befda14 100644
 --- a/include/hw/boards.h
 +++ b/include/hw/boards.h
-@@ -607,42 +607,66 @@ struct MachineState {
+@@ -631,42 +631,66 @@ struct MachineState {
  
  
  /*
@@ -117,7 +117,7 @@ index 5cddeb7fcb..b1e7787499 100644
  
  /*
   * Evaluates true when a machine type with (major, minor)
-@@ -651,7 +675,7 @@ struct MachineState {
+@@ -675,7 +699,7 @@ struct MachineState {
   * lifecycle rules
   */
  #define MACHINE_VER_IS_DEPRECATED(...) \
@@ -126,7 +126,7 @@ index 5cddeb7fcb..b1e7787499 100644
  
  /*
   * Evaluates true when a machine type with (major, minor)
-@@ -660,7 +684,7 @@ struct MachineState {
+@@ -684,7 +708,7 @@ struct MachineState {
   * lifecycle rules
   */
  #define MACHINE_VER_SHOULD_DELETE(...) \
diff --git a/debian/patches/series b/debian/patches/series
index 9ebf335..e359265 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,9 +1,6 @@
 extra/0001-monitor-qmp-fix-race-with-clients-disconnecting-earl.patch
-extra/0002-scsi-megasas-Internal-cdbs-have-16-byte-length.patch
-extra/0003-ide-avoid-potential-deadlock-when-draining-during-tr.patch
-extra/0004-Revert-x86-acpi-workaround-Windows-not-handling-name.patch
-extra/0005-virtio-net-Add-queues-before-loading-them.patch
-extra/0006-virtio-net-Fix-size-check-in-dhclient-workaround.patch
+extra/0002-ide-avoid-potential-deadlock-when-draining-during-tr.patch
+extra/0003-Revert-x86-acpi-workaround-Windows-not-handling-name.patch
 bitmap-mirror/0001-drive-mirror-add-support-for-sync-bitmap-mode-never.patch
 bitmap-mirror/0002-drive-mirror-add-support-for-conditional-and-always-.patch
 bitmap-mirror/0003-mirror-add-check-for-bitmap-mode-without-bitmap.patch
@@ -53,12 +50,10 @@ pve/0040-Revert-block-rbd-fix-handling-of-holes-in-.bdrv_co_b.patch
 pve/0041-Revert-block-rbd-implement-bdrv_co_block_status.patch
 pve/0042-alloc-track-error-out-when-auto-remove-is-not-set.patch
 pve/0043-alloc-track-avoid-seemingly-superfluous-child-permis.patch
-pve/0044-copy-before-write-allow-specifying-minimum-cluster-s.patch
-pve/0045-backup-add-minimum-cluster-size-to-performance-optio.patch
-pve/0046-PVE-backup-add-fleecing-option.patch
-pve/0047-PVE-backup-improve-error-when-copy-before-write-fail.patch
-pve/0048-PVE-backup-fixup-error-handling-for-fleecing.patch
-pve/0049-PVE-backup-factor-out-setting-up-snapshot-access-for.patch
-pve/0050-PVE-backup-save-device-name-in-device-info-structure.patch
-pve/0051-PVE-backup-include-device-name-in-error-when-setting.patch
-pve/0052-adapt-machine-version-deprecation-for-Proxmox-VE.patch
+pve/0044-PVE-backup-add-fleecing-option.patch
+pve/0045-PVE-backup-improve-error-when-copy-before-write-fail.patch
+pve/0046-PVE-backup-fixup-error-handling-for-fleecing.patch
+pve/0047-PVE-backup-factor-out-setting-up-snapshot-access-for.patch
+pve/0048-PVE-backup-save-device-name-in-device-info-structure.patch
+pve/0049-PVE-backup-include-device-name-in-error-when-setting.patch
+pve/0050-adapt-machine-version-deprecation-for-Proxmox-VE.patch
diff --git a/qemu b/qemu
index 508081a..ae35f03 160000
--- a/qemu
+++ b/qemu
@@ -1 +1 @@
-Subproject commit 508081a49b0d624930ca479b8a27bccdc50bdfb2
+Subproject commit ae35f033b874c627d81d51070187fbf55f0bf1a7
-- 
2.39.5





More information about the pve-devel mailing list