* [pve-devel] [PATCH-SERIES qemu v2 0/2] QEMU 9.2.0
@ 2025-01-28 15:15 Fiona Ebner
2025-01-28 15:15 ` [pve-devel] [PATCH qemu v2 1/2] update submodule and patches to " Fiona Ebner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Fiona Ebner @ 2025-01-28 15:15 UTC (permalink / raw)
To: pve-devel
Changes in v2:
* rebase for current master
* add a few more stable fixes
Very small diff in our patches this time and only a couple of stable
fixes seemed worth picking up, see the patches for details.
Did only a very quick sanity check with v2, focussing on the
difference in our patches to v1.
Basic tests for the following were done with v1 (disclaimer: not each
combination of the mentioned settings):
* OS boot testing: Win 11/10/Server 2019, Debian 12 (32 and 64 bit),
FreeBSD 14, OpenBSD 7.6
* OS install testing: Win 10, Ubuntu 24.10
* snapshot with/without RAM
* live-migration 9.0 <-> 9.2, 9.2 <-> 9.2,
* disk: IDE/SATA/VirtIO SCSI/VirtIO block
* with/without iothread
* different SCSI controllers
* NIC: e1000, VirtIO-net, vmxnet3
* KVM and non-KVM
* display: VirtIO GPU/VGA/SPICE
* VNC clipboard
* disk resize, move storage (online/offline, various storage
combinations)
* PBS backup, restore and live-restore, dirty bitmap in combination
with live-migration
* VirtIO NIC with German Win10 ISO
* SeaBIOS/OVMF
* q35/i440fx
* OVA import online/offline
* ESXi import online/offline
Didn't notice any issues with QEMU 9.2.0 itself.
Found an issue with OVA live-import in qemu-server, fix sent (and was already
applied):
https://lore.proxmox.com/pve-devel/20250120155705.120718-1-f.ebner@proxmox.com/T/#u
Fiona Ebner (2):
update submodule and patches to QEMU 9.2.0
stable fixes for QEMU 9.2.0
...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 --------
...Reset-free_temps-before-tcg_optimize.patch | 82 ++++++++++
...workaround-Windows-not-handling-name.patch | 45 ------
...t-TSCs-of-parked-vCPUs-too-on-VM-res.patch | 149 ++++++++++++++++++
...x10_version-filtered-when-prefix-is-.patch | 41 +++++
...o-net-Add-queues-before-loading-them.patch | 81 ----------
.../extra/0006-net-Fix-announce_self.patch | 67 ++++++++
...ix-size-check-in-dhclient-workaround.patch | 36 -----
...ectly-compute-Ethernet-packet-offset.patch | 67 ++++++++
...-Windows-PCI-Label-Id-bug-workaround.patch | 96 +++++++++++
...pci-Use-modulo-to-select-MSI-vector-.patch | 53 +++++++
...-link-status-bits-for-downstream-por.patch | 63 ++++++++
...x-pba-read-vector-poll-end-calculati.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 | 31 ++--
qemu | 2 +-
62 files changed, 832 insertions(+), 627 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
create mode 100644 debian/patches/extra/0003-tcg-Reset-free_temps-before-tcg_optimize.patch
delete mode 100644 debian/patches/extra/0004-Revert-x86-acpi-workaround-Windows-not-handling-name.patch
create mode 100644 debian/patches/extra/0004-target-i386-Reset-TSCs-of-parked-vCPUs-too-on-VM-res.patch
create mode 100644 debian/patches/extra/0005-i386-cpu-Mark-avx10_version-filtered-when-prefix-is-.patch
delete mode 100644 debian/patches/extra/0005-virtio-net-Add-queues-before-loading-them.patch
create mode 100644 debian/patches/extra/0006-net-Fix-announce_self.patch
delete mode 100644 debian/patches/extra/0006-virtio-net-Fix-size-check-in-dhclient-workaround.patch
create mode 100644 debian/patches/extra/0007-net-dump-Correctly-compute-Ethernet-packet-offset.patch
create mode 100644 debian/patches/extra/0008-pci-acpi-Windows-PCI-Label-Id-bug-workaround.patch
create mode 100644 debian/patches/extra/0009-hw-usb-hcd-xhci-pci-Use-modulo-to-select-MSI-vector-.patch
create mode 100644 debian/patches/extra/0010-pci-ensure-valid-link-status-bits-for-downstream-por.patch
create mode 100644 debian/patches/extra/0011-pci-msix-Fix-msix-pba-read-vector-poll-end-calculati.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%)
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH qemu v2 1/2] update submodule and patches to QEMU 9.2.0
2025-01-28 15:15 [pve-devel] [PATCH-SERIES qemu v2 0/2] QEMU 9.2.0 Fiona Ebner
@ 2025-01-28 15:15 ` Fiona Ebner
2025-01-28 15:15 ` [pve-devel] [PATCH qemu v2 2/2] stable fixes for " Fiona Ebner
2025-02-04 9:01 ` [pve-devel] applied: [PATCH-SERIES qemu v2 0/2] " Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2025-01-28 15:15 UTC (permalink / raw)
To: pve-devel
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@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@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@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@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@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@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@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@roeck-us.net>
-Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-(picked-up from https://lists.nongnu.org/archive/html/qemu-devel/2023-02/msg08653.html)
-Signed-off-by: Fiona Ebner <f.ebner@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@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@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@nongnu.org
-Fixes: 8c49756825da ("virtio-net: Add only one queue pair when realizing")
-Reported-by: Laurent Vivier <lvivier@redhat.com>
-Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
-Acked-by: Michael S. Tsirkin <mst@redhat.com>
-(picked from https://lore.kernel.org/qemu-devel/20241022-load-v1-1-99df0bff7939@daynix.com/)
-Signed-off-by: Fiona Ebner <f.ebner@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@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@nongnu.org
-Signed-off-by: Akihiko Odaki <akihiko.odaki@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@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@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@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@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@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@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@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@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@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 476a865..e558da6 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
@@ -38,13 +38,13 @@ Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
include/migration/snapshot.h | 2 +
include/monitor/hmp.h | 3 +
migration/meson.build | 1 +
- migration/savevm-async.c | 553 +++++++++++++++++++++++++++++++++++
+ migration/savevm-async.c | 571 +++++++++++++++++++++++++++++++++++
monitor/hmp-cmds.c | 38 +++
qapi/migration.json | 34 +++
qapi/misc.json | 18 ++
qemu-options.hx | 12 +
system/vl.c | 10 +
- 11 files changed, 701 insertions(+)
+ 11 files changed, 719 insertions(+)
create mode 100644 migration/savevm-async.c
diff --git a/hmp-commands-info.hx b/hmp-commands-info.hx
@@ -129,10 +129,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',
@@ -142,10 +142,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..276f8bfcbb
+index 0000000000..ee8ef316d0
--- /dev/null
+++ b/migration/savevm-async.c
-@@ -0,0 +1,553 @@
+@@ -0,0 +1,571 @@
+#include "qemu/osdep.h"
+#include "migration/channel-savevm-async.h"
+#include "migration/migration.h"
@@ -262,6 +262,7 @@ index 0000000000..276f8bfcbb
+ }
+
+ 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
@@ -270,7 +271,9 @@ index 0000000000..276f8bfcbb
+ 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);
@@ -481,6 +484,7 @@ index 0000000000..276f8bfcbb
+ 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;
@@ -526,6 +530,11 @@ index 0000000000..276f8bfcbb
+ 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));
@@ -548,7 +557,7 @@ index 0000000000..276f8bfcbb
+ 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);
@@ -644,6 +653,7 @@ index 0000000000..276f8bfcbb
+int load_snapshot_from_blockdev(const char *filename, Error **errp)
+{
+ BlockBackend *be;
++ BlockDriverState *bs = NULL;
+ Error *local_err = NULL;
+ Error *blocker = NULL;
+ QDict *options;
@@ -662,8 +672,14 @@ index 0000000000..276f8bfcbb
+ 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)));
@@ -693,7 +709,9 @@ index 0000000000..276f8bfcbb
+
+ the_end:
+ if (be) {
-+ blk_op_unblock_all(be, blocker);
++ if (bs) {
++ bdrv_op_unblock_all(bs, blocker);
++ }
+ error_free(blocker);
+ blk_unref(be);
+ }
@@ -753,7 +771,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 @@
@@ -827,10 +845,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
@@ -850,7 +868,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;
@@ -861,7 +879,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);
@@ -874,7 +892,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 0d60a67..93598cf 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 276f8bfcbb..30921d7e9f 100644
+index ee8ef316d0..1e79fce9ba 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 276f8bfcbb..30921d7e9f 100644
if (!snap_state.file) {
error_setg(errp, "failed to open '%s'", statefile);
-@@ -518,7 +518,8 @@ int load_snapshot_from_blockdev(const char *filename, Error **errp)
- blk_op_block_all(be, blocker);
+@@ -534,7 +534,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@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@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@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@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@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 be8914a..186cbf7 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
@@ -40,10 +40,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')
@@ -52,7 +52,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@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@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@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@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@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@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@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@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@proxmox.com>
-Signed-off-by: Thomas Lamprecht <t.lamprecht@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@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@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@proxmox.com>
-Signed-off-by: Thomas Lamprecht <t.lamprecht@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@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
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] [PATCH qemu v2 2/2] stable fixes for QEMU 9.2.0
2025-01-28 15:15 [pve-devel] [PATCH-SERIES qemu v2 0/2] QEMU 9.2.0 Fiona Ebner
2025-01-28 15:15 ` [pve-devel] [PATCH qemu v2 1/2] update submodule and patches to " Fiona Ebner
@ 2025-01-28 15:15 ` Fiona Ebner
2025-02-04 9:01 ` [pve-devel] applied: [PATCH-SERIES qemu v2 0/2] " Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Fiona Ebner @ 2025-01-28 15:15 UTC (permalink / raw)
To: pve-devel
Most notabbly, there now is an upstream workaround for the "Windows
PCI Label bug" [0] and the revert of QEMU commit 44d975ef34 ("x86:
acpi: workaround Windows not handling name references in Package
properly") can be dropped.
Pick up some other fixes already merged in current master, for
emulation as well as x86(_64) KVM, some PCI/USB fixes and a pair of
regression fixes for the net subsystem.
[0]: https://gitlab.com/qemu-project/qemu/-/issues/774
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
---
...workaround-Windows-not-handling-name.patch | 45 ------
...Reset-free_temps-before-tcg_optimize.patch | 82 ++++++++++
...t-TSCs-of-parked-vCPUs-too-on-VM-res.patch | 149 ++++++++++++++++++
...x10_version-filtered-when-prefix-is-.patch | 41 +++++
| 67 ++++++++
...ectly-compute-Ethernet-packet-offset.patch | 67 ++++++++
...-Windows-PCI-Label-Id-bug-workaround.patch | 96 +++++++++++
...pci-Use-modulo-to-select-MSI-vector-.patch | 53 +++++++
...-link-status-bits-for-downstream-por.patch | 63 ++++++++
...x-pba-read-vector-poll-end-calculati.patch | 36 +++++
debian/patches/series | 10 +-
11 files changed, 663 insertions(+), 46 deletions(-)
delete mode 100644 debian/patches/extra/0003-Revert-x86-acpi-workaround-Windows-not-handling-name.patch
create mode 100644 debian/patches/extra/0003-tcg-Reset-free_temps-before-tcg_optimize.patch
create mode 100644 debian/patches/extra/0004-target-i386-Reset-TSCs-of-parked-vCPUs-too-on-VM-res.patch
create mode 100644 debian/patches/extra/0005-i386-cpu-Mark-avx10_version-filtered-when-prefix-is-.patch
create mode 100644 debian/patches/extra/0006-net-Fix-announce_self.patch
create mode 100644 debian/patches/extra/0007-net-dump-Correctly-compute-Ethernet-packet-offset.patch
create mode 100644 debian/patches/extra/0008-pci-acpi-Windows-PCI-Label-Id-bug-workaround.patch
create mode 100644 debian/patches/extra/0009-hw-usb-hcd-xhci-pci-Use-modulo-to-select-MSI-vector-.patch
create mode 100644 debian/patches/extra/0010-pci-ensure-valid-link-status-bits-for-downstream-por.patch
create mode 100644 debian/patches/extra/0011-pci-msix-Fix-msix-pba-read-vector-poll-end-calculati.patch
diff --git a/debian/patches/extra/0003-Revert-x86-acpi-workaround-Windows-not-handling-name.patch b/debian/patches/extra/0003-Revert-x86-acpi-workaround-Windows-not-handling-name.patch
deleted file mode 100644
index 5d903da..0000000
--- a/debian/patches/extra/0003-Revert-x86-acpi-workaround-Windows-not-handling-name.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Fiona Ebner <f.ebner@proxmox.com>
-Date: Fri, 17 Nov 2023 11:18:06 +0100
-Subject: [PATCH] Revert "x86: acpi: workaround Windows not handling name
- references in Package properly"
-
-This reverts commit 44d975ef340e2f21f236f9520c53e1b30d2213a4.
-
-As reported in the community forum [0] and reproduced locally this
-breaks VirtIO network adapters in (at least) the German ISO of Windows
-Server 2022. The fix itself was for
-
-> Issue is not fatal but as result acpi-index/"PCI Label ID" property
-> is either not shown in device details page or shows incorrect value.
-
-so revert and tolerate that as a stop-gap, rather than have the
-devices not working at all.
-
-[0]: https://forum.proxmox.com/threads/92094/post-605684
-
-Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
----
- hw/i386/acpi-build.c | 8 ++------
- 1 file changed, 2 insertions(+), 6 deletions(-)
-
-diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
-index 9fcc2897b8..45a3392d04 100644
---- a/hw/i386/acpi-build.c
-+++ b/hw/i386/acpi-build.c
-@@ -345,13 +345,9 @@ Aml *aml_pci_device_dsm(void)
- {
- Aml *params = aml_local(0);
- Aml *pkg = aml_package(2);
-- aml_append(pkg, aml_int(0));
-- aml_append(pkg, aml_int(0));
-+ aml_append(pkg, aml_name("BSEL"));
-+ aml_append(pkg, aml_name("ASUN"));
- aml_append(method, aml_store(pkg, params));
-- aml_append(method,
-- aml_store(aml_name("BSEL"), aml_index(params, aml_int(0))));
-- aml_append(method,
-- aml_store(aml_name("ASUN"), aml_index(params, aml_int(1))));
- aml_append(method,
- aml_return(aml_call5("PDSM", aml_arg(0), aml_arg(1),
- aml_arg(2), aml_arg(3), params))
diff --git a/debian/patches/extra/0003-tcg-Reset-free_temps-before-tcg_optimize.patch b/debian/patches/extra/0003-tcg-Reset-free_temps-before-tcg_optimize.patch
new file mode 100644
index 0000000..15b3016
--- /dev/null
+++ b/debian/patches/extra/0003-tcg-Reset-free_temps-before-tcg_optimize.patch
@@ -0,0 +1,82 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Richard Henderson <richard.henderson@linaro.org>
+Date: Sat, 7 Dec 2024 18:14:45 +0000
+Subject: [PATCH] tcg: Reset free_temps before tcg_optimize
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+When allocating new temps during tcg_optmize, do not re-use
+any EBB temps that were used within the TB. We do not have
+any idea what span of the TB in which the temp was live.
+
+Introduce tcg_temp_ebb_reset_freed and use before tcg_optimize,
+as well as replacing the equivalent in plugin_gen_inject and
+tcg_func_start.
+
+Cc: qemu-stable@nongnu.org
+Fixes: fb04ab7ddd8 ("tcg/optimize: Lower TCG_COND_TST{EQ,NE} if unsupported")
+Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2711
+Reported-by: wannacu <wannacu2049@gmail.com>
+Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
+Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
+Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
+(cherry picked from commit 04e006ab36a8565b92d4e21dd346367fbade7d74)
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
+---
+ accel/tcg/plugin-gen.c | 2 +-
+ include/tcg/tcg-temp-internal.h | 6 ++++++
+ tcg/tcg.c | 5 ++++-
+ 3 files changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/accel/tcg/plugin-gen.c b/accel/tcg/plugin-gen.c
+index 0f47bfbb48..1ef075552c 100644
+--- a/accel/tcg/plugin-gen.c
++++ b/accel/tcg/plugin-gen.c
+@@ -275,7 +275,7 @@ static void plugin_gen_inject(struct qemu_plugin_tb *plugin_tb)
+ * that might be live within the existing opcode stream.
+ * The simplest solution is to release them all and create new.
+ */
+- memset(tcg_ctx->free_temps, 0, sizeof(tcg_ctx->free_temps));
++ tcg_temp_ebb_reset_freed(tcg_ctx);
+
+ QTAILQ_FOREACH_SAFE(op, &tcg_ctx->ops, link, next) {
+ switch (op->opc) {
+diff --git a/include/tcg/tcg-temp-internal.h b/include/tcg/tcg-temp-internal.h
+index 44192c55a9..98f91e68b7 100644
+--- a/include/tcg/tcg-temp-internal.h
++++ b/include/tcg/tcg-temp-internal.h
+@@ -42,4 +42,10 @@ TCGv_i64 tcg_temp_ebb_new_i64(void);
+ TCGv_ptr tcg_temp_ebb_new_ptr(void);
+ TCGv_i128 tcg_temp_ebb_new_i128(void);
+
++/* Forget all freed EBB temps, so that new allocations produce new temps. */
++static inline void tcg_temp_ebb_reset_freed(TCGContext *s)
++{
++ memset(s->free_temps, 0, sizeof(s->free_temps));
++}
++
+ #endif /* TCG_TEMP_FREE_H */
+diff --git a/tcg/tcg.c b/tcg/tcg.c
+index 0babae1b88..4578b185be 100644
+--- a/tcg/tcg.c
++++ b/tcg/tcg.c
+@@ -1489,7 +1489,7 @@ void tcg_func_start(TCGContext *s)
+ s->nb_temps = s->nb_globals;
+
+ /* No temps have been previously allocated for size or locality. */
+- memset(s->free_temps, 0, sizeof(s->free_temps));
++ tcg_temp_ebb_reset_freed(s);
+
+ /* No constant temps have been previously allocated. */
+ for (int i = 0; i < TCG_TYPE_COUNT; ++i) {
+@@ -6120,6 +6120,9 @@ int tcg_gen_code(TCGContext *s, TranslationBlock *tb, uint64_t pc_start)
+ }
+ #endif
+
++ /* Do not reuse any EBB that may be allocated within the TB. */
++ tcg_temp_ebb_reset_freed(s);
++
+ tcg_optimize(s);
+
+ reachable_code_pass(s);
diff --git a/debian/patches/extra/0004-target-i386-Reset-TSCs-of-parked-vCPUs-too-on-VM-res.patch b/debian/patches/extra/0004-target-i386-Reset-TSCs-of-parked-vCPUs-too-on-VM-res.patch
new file mode 100644
index 0000000..071d51a
--- /dev/null
+++ b/debian/patches/extra/0004-target-i386-Reset-TSCs-of-parked-vCPUs-too-on-VM-res.patch
@@ -0,0 +1,149 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
+Date: Thu, 12 Dec 2024 15:51:15 +0100
+Subject: [PATCH] target/i386: Reset TSCs of parked vCPUs too on VM reset
+
+Since commit 5286c3662294 ("target/i386: properly reset TSC on reset")
+QEMU writes the special value of "1" to each online vCPU TSC on VM reset
+to reset it.
+
+However parked vCPUs don't get that handling and due to that their TSCs
+get desynchronized when the VM gets reset.
+This in turn causes KVM to turn off PVCLOCK_TSC_STABLE_BIT in its exported
+PV clock.
+Note that KVM has no understanding of vCPU being currently parked.
+
+Without PVCLOCK_TSC_STABLE_BIT the sched clock is marked unstable in
+the guest's kvm_sched_clock_init().
+This causes a performance regressions to show in some tests.
+
+Fix this issue by writing the special value of "1" also to TSCs of parked
+vCPUs on VM reset.
+
+Reproducing the issue:
+1) Boot a VM with "-smp 2,maxcpus=3" or similar
+
+2) device_add host-x86_64-cpu,id=vcpu,node-id=0,socket-id=0,core-id=2,thread-id=0
+
+3) Wait a few seconds
+
+4) device_del vcpu
+
+5) Inside the VM run:
+# echo "t" >/proc/sysrq-trigger; dmesg | grep sched_clock_stable
+Observe the sched_clock_stable() value is 1.
+
+6) Reboot the VM
+
+7) Once the VM boots once again run inside it:
+# echo "t" >/proc/sysrq-trigger; dmesg | grep sched_clock_stable
+Observe the sched_clock_stable() value is now 0.
+
+Fixes: 5286c3662294 ("target/i386: properly reset TSC on reset")
+Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
+Link: https://lore.kernel.org/r/5a605a88e9a231386dc803c60f5fed9b48108139.1734014926.git.maciej.szmigiero@oracle.com
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+(cherry picked from commit 3f2a05b31ee9ce2ddb6c75a9bc3f5e7f7af9a76f)
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
+---
+ accel/kvm/kvm-all.c | 11 +++++++++++
+ configs/targets/i386-softmmu.mak | 1 +
+ configs/targets/x86_64-softmmu.mak | 1 +
+ include/sysemu/kvm.h | 8 ++++++++
+ target/i386/kvm/kvm.c | 15 +++++++++++++++
+ 5 files changed, 36 insertions(+)
+
+diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
+index 801cff16a5..dec1d1c16a 100644
+--- a/accel/kvm/kvm-all.c
++++ b/accel/kvm/kvm-all.c
+@@ -437,6 +437,16 @@ int kvm_unpark_vcpu(KVMState *s, unsigned long vcpu_id)
+ return kvm_fd;
+ }
+
++static void kvm_reset_parked_vcpus(void *param)
++{
++ KVMState *s = param;
++ struct KVMParkedVcpu *cpu;
++
++ QLIST_FOREACH(cpu, &s->kvm_parked_vcpus, node) {
++ kvm_arch_reset_parked_vcpu(cpu->vcpu_id, cpu->kvm_fd);
++ }
++}
++
+ int kvm_create_vcpu(CPUState *cpu)
+ {
+ unsigned long vcpu_id = kvm_arch_vcpu_id(cpu);
+@@ -2728,6 +2738,7 @@ static int kvm_init(MachineState *ms)
+ }
+
+ qemu_register_reset(kvm_unpoison_all, NULL);
++ qemu_register_reset(kvm_reset_parked_vcpus, s);
+
+ if (s->kernel_irqchip_allowed) {
+ kvm_irqchip_create(s);
+diff --git a/configs/targets/i386-softmmu.mak b/configs/targets/i386-softmmu.mak
+index 2ac69d5ba3..2eb0e86250 100644
+--- a/configs/targets/i386-softmmu.mak
++++ b/configs/targets/i386-softmmu.mak
+@@ -1,4 +1,5 @@
+ TARGET_ARCH=i386
+ TARGET_SUPPORTS_MTTCG=y
+ TARGET_KVM_HAVE_GUEST_DEBUG=y
++TARGET_KVM_HAVE_RESET_PARKED_VCPU=y
+ TARGET_XML_FILES= gdb-xml/i386-32bit.xml
+diff --git a/configs/targets/x86_64-softmmu.mak b/configs/targets/x86_64-softmmu.mak
+index e12ac3dc59..920e9a4200 100644
+--- a/configs/targets/x86_64-softmmu.mak
++++ b/configs/targets/x86_64-softmmu.mak
+@@ -2,4 +2,5 @@ TARGET_ARCH=x86_64
+ TARGET_BASE_ARCH=i386
+ TARGET_SUPPORTS_MTTCG=y
+ TARGET_KVM_HAVE_GUEST_DEBUG=y
++TARGET_KVM_HAVE_RESET_PARKED_VCPU=y
+ TARGET_XML_FILES= gdb-xml/i386-64bit.xml
+diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
+index c3a60b2890..ab17c09a55 100644
+--- a/include/sysemu/kvm.h
++++ b/include/sysemu/kvm.h
+@@ -377,6 +377,14 @@ int kvm_arch_init(MachineState *ms, KVMState *s);
+ int kvm_arch_init_vcpu(CPUState *cpu);
+ int kvm_arch_destroy_vcpu(CPUState *cpu);
+
++#ifdef TARGET_KVM_HAVE_RESET_PARKED_VCPU
++void kvm_arch_reset_parked_vcpu(unsigned long vcpu_id, int kvm_fd);
++#else
++static inline void kvm_arch_reset_parked_vcpu(unsigned long vcpu_id, int kvm_fd)
++{
++}
++#endif
++
+ bool kvm_vcpu_id_is_valid(int vcpu_id);
+
+ /* Returns VCPU ID to be used on KVM_CREATE_VCPU ioctl() */
+diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c
+index 8e17942c3b..2ff618fbf1 100644
+--- a/target/i386/kvm/kvm.c
++++ b/target/i386/kvm/kvm.c
+@@ -2415,6 +2415,21 @@ void kvm_arch_after_reset_vcpu(X86CPU *cpu)
+ }
+ }
+
++void kvm_arch_reset_parked_vcpu(unsigned long vcpu_id, int kvm_fd)
++{
++ g_autofree struct kvm_msrs *msrs = NULL;
++
++ msrs = g_malloc0(sizeof(*msrs) + sizeof(msrs->entries[0]));
++ msrs->entries[0].index = MSR_IA32_TSC;
++ msrs->entries[0].data = 1; /* match the value in x86_cpu_reset() */
++ msrs->nmsrs++;
++
++ if (ioctl(kvm_fd, KVM_SET_MSRS, msrs) != 1) {
++ warn_report("parked vCPU %lu TSC reset failed: %d",
++ vcpu_id, errno);
++ }
++}
++
+ void kvm_arch_do_init_vcpu(X86CPU *cpu)
+ {
+ CPUX86State *env = &cpu->env;
diff --git a/debian/patches/extra/0005-i386-cpu-Mark-avx10_version-filtered-when-prefix-is-.patch b/debian/patches/extra/0005-i386-cpu-Mark-avx10_version-filtered-when-prefix-is-.patch
new file mode 100644
index 0000000..6f5444c
--- /dev/null
+++ b/debian/patches/extra/0005-i386-cpu-Mark-avx10_version-filtered-when-prefix-is-.patch
@@ -0,0 +1,41 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Zhao Liu <zhao1.liu@intel.com>
+Date: Wed, 6 Nov 2024 11:07:18 +0800
+Subject: [PATCH] i386/cpu: Mark avx10_version filtered when prefix is NULL
+
+In x86_cpu_filter_features(), if host doesn't support AVX10, the
+configured avx10_version should be marked as filtered regardless of
+whether prefix is NULL or not.
+
+Check prefix before warn_report() instead of checking for
+have_filtered_features.
+
+Cc: qemu-stable@nongnu.org
+Fixes: commit bccfb846fd52 ("target/i386: add AVX10 feature and AVX10 version property")
+Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
+Reviewed-by: Tao Su <tao1.su@linux.intel.com>
+Link: https://lore.kernel.org/r/20241106030728.553238-2-zhao1.liu@intel.com
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+(cherry picked from commit cf4c263551886964c5d58bd7b675b13fd497b402)
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
+---
+ target/i386/cpu.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/target/i386/cpu.c b/target/i386/cpu.c
+index 3725dbbc4b..1981aeaba5 100644
+--- a/target/i386/cpu.c
++++ b/target/i386/cpu.c
+@@ -7718,8 +7718,10 @@ static bool x86_cpu_filter_features(X86CPU *cpu, bool verbose)
+ env->avx10_version = version;
+ have_filtered_features = true;
+ }
+- } else if (env->avx10_version && prefix) {
+- warn_report("%s: avx10.%d.", prefix, env->avx10_version);
++ } else if (env->avx10_version) {
++ if (prefix) {
++ warn_report("%s: avx10.%d.", prefix, env->avx10_version);
++ }
+ have_filtered_features = true;
+ }
+
--git a/debian/patches/extra/0006-net-Fix-announce_self.patch b/debian/patches/extra/0006-net-Fix-announce_self.patch
new file mode 100644
index 0000000..0c11819
--- /dev/null
+++ b/debian/patches/extra/0006-net-Fix-announce_self.patch
@@ -0,0 +1,67 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Laurent Vivier <lvivier@redhat.com>
+Date: Fri, 17 Jan 2025 12:17:08 +0100
+Subject: [PATCH] net: Fix announce_self
+
+b9ad513e1876 ("net: Remove receive_raw()") adds an iovec entry
+in qemu_deliver_packet_iov() to add the virtio-net header
+in the data when QEMU_NET_PACKET_FLAG_RAW is set but forgets
+to increase the number of iovec entries in the array, so
+receive_iov() will only send the first entry (the virtio-net
+entry, full of 0) and no data. The packet will be discarded.
+
+The only user of QEMU_NET_PACKET_FLAG_RAW is announce_self.
+
+We can see the problem with tcpdump:
+
+- QEMU parameters:
+
+ .. -monitor stdio \
+ -netdev bridge,id=netdev0,br=virbr0 \
+ -device virtio-net,mac=9a:2b:2c:2d:2e:2f,netdev=netdev0 \
+
+- HMP command:
+
+ (qemu) announce_self
+
+- TCP dump:
+
+ $ sudo tcpdump -nxi virbr0
+
+ without the fix:
+
+ <nothing>
+
+ with the fix:
+
+ ARP, Reverse Request who-is 9a:2b:2c:2d:2e:2f tell 9a:2b:2c:2d:2e:2f, length 46
+ 0x0000: 0001 0800 0604 0003 9a2b 2c2d 2e2f 0000
+ 0x0010: 0000 9a2b 2c2d 2e2f 0000 0000 0000 0000
+ 0x0020: 0000 0000 0000 0000 0000 0000 0000
+
+Reported-by: Xiaohui Li <xiaohli@redhat.com>
+Bug: https://issues.redhat.com/browse/RHEL-73891
+Fixes: b9ad513e1876 ("net: Remove receive_raw()")
+Cc: akihiko.odaki@daynix.com
+Signed-off-by: Laurent Vivier <lvivier@redhat.com>
+Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
+Acked-by: Jason Wang <jasowang@redhat.com>
+Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
+(picked from https://lore.kernel.org/qemu-devel/20250117111709.970789-2-lvivier@redhat.com/)
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
+---
+ net/net.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/net/net.c b/net/net.c
+index 7ef6885876..fefa701bb2 100644
+--- a/net/net.c
++++ b/net/net.c
+@@ -822,6 +822,7 @@ static ssize_t qemu_deliver_packet_iov(NetClientState *sender,
+ iov_copy[0].iov_len = nc->vnet_hdr_len;
+ memcpy(&iov_copy[1], iov, iovcnt * sizeof(*iov));
+ iov = iov_copy;
++ iovcnt++;
+ }
+
+ if (nc->info->receive_iov) {
diff --git a/debian/patches/extra/0007-net-dump-Correctly-compute-Ethernet-packet-offset.patch b/debian/patches/extra/0007-net-dump-Correctly-compute-Ethernet-packet-offset.patch
new file mode 100644
index 0000000..09b00f7
--- /dev/null
+++ b/debian/patches/extra/0007-net-dump-Correctly-compute-Ethernet-packet-offset.patch
@@ -0,0 +1,67 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Laurent Vivier <lvivier@redhat.com>
+Date: Fri, 17 Jan 2025 12:17:09 +0100
+Subject: [PATCH] net/dump: Correctly compute Ethernet packet offset
+
+When a packet is sent with QEMU_NET_PACKET_FLAG_RAW by QEMU it
+never includes virtio-net header even if qemu_get_vnet_hdr_len()
+is not 0, and filter-dump is not managing this case.
+
+The only user of QEMU_NET_PACKET_FLAG_RAW is announce_self,
+we can show the problem using it and tcpddump:
+
+- QEMU parameters:
+
+ .. -monitor stdio \
+ -netdev bridge,id=netdev0,br=virbr0 \
+ -device virtio-net,mac=9a:2b:2c:2d:2e:2f,netdev=netdev0 \
+ -object filter-dump,netdev=netdev0,file=log.pcap,id=pcap0
+
+- HMP command:
+
+ (qemu) announce_self
+
+- TCP dump:
+
+ $ tcpdump -nxr log.pcap
+
+ without the fix:
+
+ 08:00:06:04:00:03 > 2e:2f:80:35:00:01, ethertype Unknown (0x9a2b), length 50:
+ 0x0000: 2c2d 2e2f 0000 0000 9a2b 2c2d 2e2f 0000
+ 0x0010: 0000 0000 0000 0000 0000 0000 0000 0000
+ 0x0020: 0000 0000
+
+ with the fix:
+
+ ARP, Reverse Request who-is 9a:2b:2c:2d:2e:2f tell 9a:2b:2c:2d:2e:2f, length 46
+ 0x0000: 0001 0800 0604 0003 9a2b 2c2d 2e2f 0000
+ 0x0010: 0000 9a2b 2c2d 2e2f 0000 0000 0000 0000
+ 0x0020: 0000 0000 0000 0000 0000 0000 0000
+
+Fixes: 481c52320a26 ("net: Strip virtio-net header when dumping")
+Cc: akihiko.odaki@daynix.com
+Signed-off-by: Laurent Vivier <lvivier@redhat.com>
+Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
+Acked-by: Jason Wang <jasowang@redhat.com>
+Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
+(picked from https://lore.kernel.org/qemu-devel/20250117111709.970789-3-lvivier@redhat.com/)
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
+---
+ net/dump.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/net/dump.c b/net/dump.c
+index 956e34a123..42ab8d7716 100644
+--- a/net/dump.c
++++ b/net/dump.c
+@@ -155,7 +155,8 @@ static ssize_t filter_dump_receive_iov(NetFilterState *nf, NetClientState *sndr,
+ {
+ NetFilterDumpState *nfds = FILTER_DUMP(nf);
+
+- dump_receive_iov(&nfds->ds, iov, iovcnt, qemu_get_vnet_hdr_len(nf->netdev));
++ dump_receive_iov(&nfds->ds, iov, iovcnt, flags & QEMU_NET_PACKET_FLAG_RAW ?
++ 0 : qemu_get_vnet_hdr_len(nf->netdev));
+ return 0;
+ }
+
diff --git a/debian/patches/extra/0008-pci-acpi-Windows-PCI-Label-Id-bug-workaround.patch b/debian/patches/extra/0008-pci-acpi-Windows-PCI-Label-Id-bug-workaround.patch
new file mode 100644
index 0000000..acb7662
--- /dev/null
+++ b/debian/patches/extra/0008-pci-acpi-Windows-PCI-Label-Id-bug-workaround.patch
@@ -0,0 +1,96 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Igor Mammedov <imammedo@redhat.com>
+Date: Wed, 15 Jan 2025 13:53:41 +0100
+Subject: [PATCH] pci: acpi: Windows 'PCI Label Id' bug workaround
+
+Current versions of Windows call _DSM(func=7) regardless
+of whether it is supported or not. It leads to NICs having bogus
+'PCI Label Id = 0', where none should be set at all.
+
+Also presence of 'PCI Label Id' triggers another Windows bug
+on localized versions that leads to hangs. The later bug is fixed
+in latest updates for 'Windows Server' but not in consumer
+versions of Windows (and there is no plans to fix it
+as far as I'm aware).
+
+Given it's easy, implement Microsoft suggested workaround
+(return invalid Package) so that affected Windows versions
+could boot on QEMU.
+This would effectvely remove bogus 'PCI Label Id's on NICs,
+but MS teem confirmed that flipping 'PCI Label Id' should not
+change 'Network Connection' ennumeration, so it should be safe
+for QEMU to change _DSM without any compat code.
+
+Smoke tested with WinXP and WS2022
+Resolves: https://gitlab.com/qemu-project/qemu/-/issues/774
+Signed-off-by: Igor Mammedov <imammedo@redhat.com>
+Message-Id: <20250115125342.3883374-3-imammedo@redhat.com>
+Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
+Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
+(cherry picked from commit 0b053391985abcc40b16ac8fc4a7f6588d1d95c1)
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
+---
+ hw/i386/acpi-build.c | 33 +++++++++++++++++++++++----------
+ 1 file changed, 23 insertions(+), 10 deletions(-)
+
+diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
+index 9fcc2897b8..f7b961e04c 100644
+--- a/hw/i386/acpi-build.c
++++ b/hw/i386/acpi-build.c
+@@ -654,6 +654,7 @@ static Aml *aml_pci_pdsm(void)
+ Aml *acpi_index = aml_local(2);
+ Aml *zero = aml_int(0);
+ Aml *one = aml_int(1);
++ Aml *not_supp = aml_int(0xFFFFFFFF);
+ Aml *func = aml_arg(2);
+ Aml *params = aml_arg(4);
+ Aml *bnum = aml_derefof(aml_index(params, aml_int(0)));
+@@ -678,7 +679,7 @@ static Aml *aml_pci_pdsm(void)
+ */
+ ifctx1 = aml_if(aml_lnot(
+ aml_or(aml_equal(acpi_index, zero),
+- aml_equal(acpi_index, aml_int(0xFFFFFFFF)), NULL)
++ aml_equal(acpi_index, not_supp), NULL)
+ ));
+ {
+ /* have supported functions */
+@@ -704,18 +705,30 @@ static Aml *aml_pci_pdsm(void)
+ {
+ Aml *pkg = aml_package(2);
+
+- aml_append(pkg, zero);
+- /*
+- * optional, if not impl. should return null string
+- */
+- aml_append(pkg, aml_string("%s", ""));
+- aml_append(ifctx, aml_store(pkg, ret));
+-
+ aml_append(ifctx, aml_store(aml_call2("AIDX", bnum, sunum), acpi_index));
++ aml_append(ifctx, aml_store(pkg, ret));
+ /*
+- * update acpi-index to actual value
++ * Windows calls func=7 without checking if it's available,
++ * as workaround Microsoft has suggested to return invalid for func7
++ * Package, so return 2 elements package but only initialize elements
++ * when acpi_index is supported and leave them uninitialized, which
++ * leads elements to being Uninitialized ObjectType and should trip
++ * Windows into discarding result as an unexpected and prevent setting
++ * bogus 'PCI Label' on the device.
+ */
+- aml_append(ifctx, aml_store(acpi_index, aml_index(ret, zero)));
++ ifctx1 = aml_if(aml_lnot(aml_lor(
++ aml_equal(acpi_index, zero), aml_equal(acpi_index, not_supp)
++ )));
++ {
++ aml_append(ifctx1, aml_store(acpi_index, aml_index(ret, zero)));
++ /*
++ * optional, if not impl. should return null string
++ */
++ aml_append(ifctx1, aml_store(aml_string("%s", ""),
++ aml_index(ret, one)));
++ }
++ aml_append(ifctx, ifctx1);
++
+ aml_append(ifctx, aml_return(ret));
+ }
+
diff --git a/debian/patches/extra/0009-hw-usb-hcd-xhci-pci-Use-modulo-to-select-MSI-vector-.patch b/debian/patches/extra/0009-hw-usb-hcd-xhci-pci-Use-modulo-to-select-MSI-vector-.patch
new file mode 100644
index 0000000..780586c
--- /dev/null
+++ b/debian/patches/extra/0009-hw-usb-hcd-xhci-pci-Use-modulo-to-select-MSI-vector-.patch
@@ -0,0 +1,53 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Phil Dennis-Jordan <phil@philjordan.eu>
+Date: Fri, 13 Dec 2024 17:06:14 +0100
+Subject: [PATCH] hw/usb/hcd-xhci-pci: Use modulo to select MSI vector as per
+ spec
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+QEMU would crash with a failed assertion if the XHCI controller
+attempted to raise the interrupt on an interrupter corresponding
+to a MSI vector with a higher index than the highest configured
+for the device by the guest driver.
+
+This behaviour is correct on the MSI/PCI side: per PCI 3.0 spec,
+devices must ensure they do not send MSI notifications for
+vectors beyond the range of those allocated by the system/driver
+software. Unlike MSI-X, there is no generic way for handling
+aliasing in the case of fewer allocated vectors than requested,
+so the specifics are up to device implementors. (Section
+6.8.3.4. "Sending Messages")
+
+It turns out the XHCI spec (Implementation Note in section 4.17,
+"Interrupters") requires that the host controller signal the MSI
+vector with the number computed by taking the interrupter number
+modulo the number of enabled MSI vectors.
+
+This change introduces that modulo calculation, fixing the
+failed assertion. This makes the device work correctly in MSI mode
+with macOS's XHCI driver, which only allocates a single vector.
+
+Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
+Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
+Message-ID: <20250112210056.16658-2-phil@philjordan.eu>
+Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
+(cherry picked from commit bb5b7fced6b5d3334ab20702fc846e47bb1fb731)
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
+---
+ hw/usb/hcd-xhci-pci.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/hw/usb/hcd-xhci-pci.c b/hw/usb/hcd-xhci-pci.c
+index a039f5778a..516e6909d2 100644
+--- a/hw/usb/hcd-xhci-pci.c
++++ b/hw/usb/hcd-xhci-pci.c
+@@ -74,6 +74,7 @@ static bool xhci_pci_intr_raise(XHCIState *xhci, int n, bool level)
+ }
+
+ if (msi_enabled(pci_dev) && level) {
++ n %= msi_nr_vectors_allocated(pci_dev);
+ msi_notify(pci_dev, n);
+ return true;
+ }
diff --git a/debian/patches/extra/0010-pci-ensure-valid-link-status-bits-for-downstream-por.patch b/debian/patches/extra/0010-pci-ensure-valid-link-status-bits-for-downstream-por.patch
new file mode 100644
index 0000000..f566570
--- /dev/null
+++ b/debian/patches/extra/0010-pci-ensure-valid-link-status-bits-for-downstream-por.patch
@@ -0,0 +1,63 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Sebastian Ott <sebott@redhat.com>
+Date: Tue, 3 Dec 2024 13:19:28 +0100
+Subject: [PATCH] pci: ensure valid link status bits for downstream ports
+
+PCI hotplug for downstream endpoints on arm fails because Linux'
+PCIe hotplug driver doesn't like the QEMU provided LNKSTA:
+
+ pcieport 0000:08:01.0: pciehp: Slot(2): Card present
+ pcieport 0000:08:01.0: pciehp: Slot(2): Link Up
+ pcieport 0000:08:01.0: pciehp: Slot(2): Cannot train link: status 0x2000
+
+There's 2 cases where LNKSTA isn't setup properly:
+* the downstream device has no express capability
+* max link width of the bridge is 0
+
+Move the sanity checks added via 88c869198aa63
+("pci: Sanity test minimum downstream LNKSTA") outside of the
+branch to make sure downstream ports always have a valid LNKSTA.
+
+Signed-off-by: Sebastian Ott <sebott@redhat.com>
+Tested-by: Zhenyu Zhang <zhenyzha@redhat.com>
+Message-Id: <20241203121928.14861-1-sebott@redhat.com>
+Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
+Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
+Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
+(cherry picked from commit 694632fd44987cc4618612a38ad151047524a590)
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
+---
+ hw/pci/pcie.c | 12 ++++++++----
+ 1 file changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
+index 0b455c8654..1b12db6fa2 100644
+--- a/hw/pci/pcie.c
++++ b/hw/pci/pcie.c
+@@ -1113,18 +1113,22 @@ void pcie_sync_bridge_lnk(PCIDevice *bridge_dev)
+ if ((lnksta & PCI_EXP_LNKSTA_NLW) > (lnkcap & PCI_EXP_LNKCAP_MLW)) {
+ lnksta &= ~PCI_EXP_LNKSTA_NLW;
+ lnksta |= lnkcap & PCI_EXP_LNKCAP_MLW;
+- } else if (!(lnksta & PCI_EXP_LNKSTA_NLW)) {
+- lnksta |= QEMU_PCI_EXP_LNKSTA_NLW(QEMU_PCI_EXP_LNK_X1);
+ }
+
+ if ((lnksta & PCI_EXP_LNKSTA_CLS) > (lnkcap & PCI_EXP_LNKCAP_SLS)) {
+ lnksta &= ~PCI_EXP_LNKSTA_CLS;
+ lnksta |= lnkcap & PCI_EXP_LNKCAP_SLS;
+- } else if (!(lnksta & PCI_EXP_LNKSTA_CLS)) {
+- lnksta |= QEMU_PCI_EXP_LNKSTA_CLS(QEMU_PCI_EXP_LNK_2_5GT);
+ }
+ }
+
++ if (!(lnksta & PCI_EXP_LNKSTA_NLW)) {
++ lnksta |= QEMU_PCI_EXP_LNKSTA_NLW(QEMU_PCI_EXP_LNK_X1);
++ }
++
++ if (!(lnksta & PCI_EXP_LNKSTA_CLS)) {
++ lnksta |= QEMU_PCI_EXP_LNKSTA_CLS(QEMU_PCI_EXP_LNK_2_5GT);
++ }
++
+ pci_word_test_and_clear_mask(exp_cap + PCI_EXP_LNKSTA,
+ PCI_EXP_LNKSTA_CLS | PCI_EXP_LNKSTA_NLW);
+ pci_word_test_and_set_mask(exp_cap + PCI_EXP_LNKSTA, lnksta &
diff --git a/debian/patches/extra/0011-pci-msix-Fix-msix-pba-read-vector-poll-end-calculati.patch b/debian/patches/extra/0011-pci-msix-Fix-msix-pba-read-vector-poll-end-calculati.patch
new file mode 100644
index 0000000..3ffee58
--- /dev/null
+++ b/debian/patches/extra/0011-pci-msix-Fix-msix-pba-read-vector-poll-end-calculati.patch
@@ -0,0 +1,36 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Nicholas Piggin <npiggin@gmail.com>
+Date: Thu, 12 Dec 2024 22:04:02 +1000
+Subject: [PATCH] pci/msix: Fix msix pba read vector poll end calculation
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The end vector calculation has a bug that results in polling fewer
+than required vectors when reading at a non-zero offset in PBA memory.
+
+Fixes: bbef882cc193 ("msi: add API to get notified about pending bit poll")
+Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
+Message-Id: <20241212120402.1475053-1-npiggin@gmail.com>
+Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
+Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
+Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
+(cherry picked from commit 42e2a7a0ab23784e44fcb18369e06067abc89305)
+Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
+---
+ hw/pci/msix.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/hw/pci/msix.c b/hw/pci/msix.c
+index 487e49834e..cc6e79ec67 100644
+--- a/hw/pci/msix.c
++++ b/hw/pci/msix.c
+@@ -250,7 +250,7 @@ static uint64_t msix_pba_mmio_read(void *opaque, hwaddr addr,
+ PCIDevice *dev = opaque;
+ if (dev->msix_vector_poll_notifier) {
+ unsigned vector_start = addr * 8;
+- unsigned vector_end = MIN(addr + size * 8, dev->msix_entries_nr);
++ unsigned vector_end = MIN((addr + size) * 8, dev->msix_entries_nr);
+ dev->msix_vector_poll_notifier(dev, vector_start, vector_end);
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
index e359265..b780c1f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,14 @@
extra/0001-monitor-qmp-fix-race-with-clients-disconnecting-earl.patch
extra/0002-ide-avoid-potential-deadlock-when-draining-during-tr.patch
-extra/0003-Revert-x86-acpi-workaround-Windows-not-handling-name.patch
+extra/0003-tcg-Reset-free_temps-before-tcg_optimize.patch
+extra/0004-target-i386-Reset-TSCs-of-parked-vCPUs-too-on-VM-res.patch
+extra/0005-i386-cpu-Mark-avx10_version-filtered-when-prefix-is-.patch
+extra/0006-net-Fix-announce_self.patch
+extra/0007-net-dump-Correctly-compute-Ethernet-packet-offset.patch
+extra/0008-pci-acpi-Windows-PCI-Label-Id-bug-workaround.patch
+extra/0009-hw-usb-hcd-xhci-pci-Use-modulo-to-select-MSI-vector-.patch
+extra/0010-pci-ensure-valid-link-status-bits-for-downstream-por.patch
+extra/0011-pci-msix-Fix-msix-pba-read-vector-poll-end-calculati.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
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* [pve-devel] applied: [PATCH-SERIES qemu v2 0/2] QEMU 9.2.0
2025-01-28 15:15 [pve-devel] [PATCH-SERIES qemu v2 0/2] QEMU 9.2.0 Fiona Ebner
2025-01-28 15:15 ` [pve-devel] [PATCH qemu v2 1/2] update submodule and patches to " Fiona Ebner
2025-01-28 15:15 ` [pve-devel] [PATCH qemu v2 2/2] stable fixes for " Fiona Ebner
@ 2025-02-04 9:01 ` Thomas Lamprecht
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Lamprecht @ 2025-02-04 9:01 UTC (permalink / raw)
To: Proxmox VE development discussion, Fiona Ebner
Am 28.01.25 um 16:15 schrieb Fiona Ebner:
> Changes in v2:
> * rebase for current master
> * add a few more stable fixes
>
> Very small diff in our patches this time and only a couple of stable
> fixes seemed worth picking up, see the patches for details.
>
> Did only a very quick sanity check with v2, focussing on the
> difference in our patches to v1.
>
> Basic tests for the following were done with v1 (disclaimer: not each
> combination of the mentioned settings):
> * OS boot testing: Win 11/10/Server 2019, Debian 12 (32 and 64 bit),
> FreeBSD 14, OpenBSD 7.6
> * OS install testing: Win 10, Ubuntu 24.10
> * snapshot with/without RAM
> * live-migration 9.0 <-> 9.2, 9.2 <-> 9.2,
> * disk: IDE/SATA/VirtIO SCSI/VirtIO block
> * with/without iothread
> * different SCSI controllers
> * NIC: e1000, VirtIO-net, vmxnet3
> * KVM and non-KVM
> * display: VirtIO GPU/VGA/SPICE
> * VNC clipboard
> * disk resize, move storage (online/offline, various storage
> combinations)
> * PBS backup, restore and live-restore, dirty bitmap in combination
> with live-migration
> * VirtIO NIC with German Win10 ISO
> * SeaBIOS/OVMF
> * q35/i440fx
> * OVA import online/offline
> * ESXi import online/offline
>
> Didn't notice any issues with QEMU 9.2.0 itself.
>
> Found an issue with OVA live-import in qemu-server, fix sent (and was already
> applied):
> https://lore.proxmox.com/pve-devel/20250120155705.120718-1-f.ebner@proxmox.com/T/#u
>
> Fiona Ebner (2):
> update submodule and patches to QEMU 9.2.0
> stable fixes for QEMU 9.2.0
>
applied series, thanks!
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-02-04 9:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-28 15:15 [pve-devel] [PATCH-SERIES qemu v2 0/2] QEMU 9.2.0 Fiona Ebner
2025-01-28 15:15 ` [pve-devel] [PATCH qemu v2 1/2] update submodule and patches to " Fiona Ebner
2025-01-28 15:15 ` [pve-devel] [PATCH qemu v2 2/2] stable fixes for " Fiona Ebner
2025-02-04 9:01 ` [pve-devel] applied: [PATCH-SERIES qemu v2 0/2] " Thomas Lamprecht
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal