]> git.proxmox.com Git - pve-qemu.git/log
pve-qemu.git
22 months agoadd two more stable patches
Fabian Ebner [Tue, 19 Jul 2022 08:19:31 +0000 (10:19 +0200)]
add two more stable patches

For the io_uring patch, it's not very clear which configurations can
trigger it, but it should be rather uncommon. See qemu commit
be6a166fde652589761cf70471bcde623e9bd72a for a bit more information.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
22 months agobump version to 7.0.0-1
Wolfgang Bumiller [Thu, 30 Jun 2022 09:08:36 +0000 (11:08 +0200)]
bump version to 7.0.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agocherry-pick upstream fixes for 7.0.0
Fabian Ebner [Mon, 27 Jun 2022 11:05:43 +0000 (13:05 +0200)]
cherry-pick upstream fixes for 7.0.0

coming in via qemu-stable (except for the vdmk fix, which was tagged
for-7.0 on the qemu-devel list, but didn't make it into the release).

Also took the chance to switch the gluster fix to the version that
made it into upstream.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agod/rules: adapt to changed opensbi riscv filenames in 7.0.0
Fabian Ebner [Mon, 27 Jun 2022 11:05:42 +0000 (13:05 +0200)]
d/rules: adapt to changed opensbi riscv filenames in 7.0.0

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agod/rules: drop outdated configure flags
Fabian Ebner [Mon, 27 Jun 2022 11:05:41 +0000 (13:05 +0200)]
d/rules: drop outdated configure flags

See QEMU commits 9e8be4c546ce8469ca9702715bf8f198d604b685 and
a5730b8bd3675f484ed0eacea052452048eeb35d for more information.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agoupdate submodule and patches to 7.0.0
Fabian Ebner [Mon, 27 Jun 2022 11:05:40 +0000 (13:05 +0200)]
update submodule and patches to 7.0.0

Only very minor changes needed:
* Most patches in extra (or some version of them) are part of 7.0.0.
* aio_set_fd_handler got an extra parameter, but can just pass NULL
  like we did for the related 'poll' parameter. See QEMU commit
  826cc32423db2a99d184dbf4f507c737d7e7a4ae for more.
* Add include for qemu/memalign.h in vma.c and vma-writer.c.
* Add reverts for fixups of already reverted 0347a8fd4c ("block/rbd:
  implement bdrv_co_block_status") that came in with 7.0.0. Those
  fixups are not enough, see Proxmox bugzilla #4047.
* Two trivial context changes for bitmap-mirror patches.
* block_int.h got split up into multiple headers.
* Some context changes in configure and meson.build.
* Used the oppurtunity to squash fixup of bdrv_backuo_dump_create typo
  in a later patch into the patch introducing the function (had to
  move code to new header during rebase).

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
22 months agobump version to 6.2.0-11
Thomas Lamprecht [Wed, 22 Jun 2022 13:54:58 +0000 (15:54 +0200)]
bump version to 6.2.0-11

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agovma/alloc-track improvements
Thomas Lamprecht [Wed, 22 Jun 2022 13:52:16 +0000 (15:52 +0200)]
vma/alloc-track improvements

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agore-export patches in normalized form
Thomas Lamprecht [Wed, 22 Jun 2022 13:47:34 +0000 (15:47 +0200)]
re-export patches in normalized form

iow. using:

git format-patch --zero-commit --no-signature --no-numbered --diff-algorithm=myers ...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
22 months agoadd 'namespace' to BlockdevOptionsPbs
Dominik Csapak [Wed, 22 Jun 2022 12:57:34 +0000 (14:57 +0200)]
add 'namespace' to BlockdevOptionsPbs

so that we can use it for the -blockdev options (used for live-restore)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
23 months agobump version to 6.2.0-10
Fabian Grünbichler [Thu, 9 Jun 2022 14:35:57 +0000 (16:35 +0200)]
bump version to 6.2.0-10

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agoadd d/source/include-binaries
Fabian Grünbichler [Thu, 9 Jun 2022 14:35:01 +0000 (16:35 +0200)]
add d/source/include-binaries

to shutup dpkg-source when building a source package

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
23 months agofix #4101: acquire job's aio context before calling job_unref
Fabian Ebner [Thu, 9 Jun 2022 12:31:13 +0000 (14:31 +0200)]
fix #4101: acquire job's aio context before calling job_unref

Otherwise, we might run into an abort via bdrv_co_yield_to_drain()
(can at least happen when a disk with iothread is used):
> #0  0x00007fef4f5dece1 __GI_raise (libc.so.6 + 0x3bce1)
> #1  0x00007fef4f5c8537 __GI_abort (libc.so.6 + 0x25537)
> #2  0x00005641bce3c71f error_exit (qemu-system-x86_64 + 0x80371f)
> #3  0x00005641bce3d02b qemu_mutex_unlock_impl (qemu-system-x86_64 + 0x80402b)
> #4  0x00005641bcd51655 bdrv_co_yield_to_drain (qemu-system-x86_64 + 0x718655)
> #5  0x00005641bcd52de8 bdrv_do_drained_begin (qemu-system-x86_64 + 0x719de8)
> #6  0x00005641bcd47e07 blk_drain (qemu-system-x86_64 + 0x70ee07)
> #7  0x00005641bcd498cd blk_unref (qemu-system-x86_64 + 0x7108cd)
> #8  0x00005641bcd31e6f block_job_free (qemu-system-x86_64 + 0x6f8e6f)
> #9  0x00005641bcd32d65 job_unref (qemu-system-x86_64 + 0x6f9d65)
> #10 0x00005641bcd93b3d pvebackup_co_complete_stream (qemu-system-x86_64 + 0x75ab3d)
> #11 0x00005641bce4e353 coroutine_trampoline (qemu-system-x86_64 + 0x815353)

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agobump version to 6.2.0-9
Wolfgang Bumiller [Wed, 8 Jun 2022 12:04:09 +0000 (14:04 +0200)]
bump version to 6.2.0-9

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agopbs cleanup fixes
Wolfgang Bumiller [Wed, 8 Jun 2022 11:10:51 +0000 (13:10 +0200)]
pbs cleanup fixes

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
23 months agodelete patches which were dropped from the series file
Wolfgang Bumiller [Wed, 8 Jun 2022 11:07:02 +0000 (13:07 +0200)]
delete patches which were dropped from the series file

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump version to 6.2.0-8
Thomas Lamprecht [Thu, 19 May 2022 07:25:11 +0000 (09:25 +0200)]
bump version to 6.2.0-8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoadd revert to work around performance regression when backing up large RBD disk
Fabian Ebner [Tue, 17 May 2022 08:29:49 +0000 (10:29 +0200)]
add revert to work around performance regression when backing up large RBD disk

resulting in QMP timeouts and very slow backups. The plan is to figure
out (ideally together with upstream) a way to make the implementation
of bdrv_co_block_status for RBD more efficient. But for now, revert
the problematic change as a stop-gap measure.

Upstream bug report:
https://gitlab.com/qemu-project/qemu/-/issues/1026

Forum threads:
https://forum.proxmox.com/threads/109272/
https://forum.proxmox.com/threads/109448/
https://forum.proxmox.com/threads/101334/ (partially)

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agobump version to 6.2.0-7
Thomas Lamprecht [Thu, 12 May 2022 14:06:00 +0000 (16:06 +0200)]
bump version to 6.2.0-7

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: bump build-depenceny of proxmox-backup-qemu to 1.3.0-1
Thomas Lamprecht [Thu, 12 May 2022 14:05:30 +0000 (16:05 +0200)]
d/control: bump build-depenceny of proxmox-backup-qemu to 1.3.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agonamespace support
Wolfgang Bumiller [Thu, 12 May 2022 11:04:24 +0000 (13:04 +0200)]
namespace support

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobump version to 6.2.0-6
Thomas Lamprecht [Wed, 11 May 2022 08:42:57 +0000 (10:42 +0200)]
bump version to 6.2.0-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobackport various fixes for gluster, qxl and vnc
Thomas Lamprecht [Wed, 11 May 2022 08:40:14 +0000 (10:40 +0200)]
backport various fixes for gluster, qxl and vnc

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 6.2.0-5
Thomas Lamprecht [Mon, 25 Apr 2022 08:13:50 +0000 (10:13 +0200)]
bump version to 6.2.0-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovma: allow partial restore
Thomas Lamprecht [Mon, 25 Apr 2022 08:07:24 +0000 (10:07 +0200)]
vma: allow partial restore

Introduce a new map line for skipping a certain drive, of the form
skip=drive-scsi0

Since in PVE, most archives are compressed and piped to vma for
restore, it's not easily possible to skip reads.

For the reader, a new skip flag for VmaRestoreState is added and the
target is allowed to be NULL if skip is specified when registering.
If
the skip flag is set, no writes will be made as well as no check for
duplicate clusters. Therefore, the flag is not set for verify.

Originally-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agopatches: update context
Thomas Lamprecht [Mon, 25 Apr 2022 08:07:01 +0000 (10:07 +0200)]
patches: update context

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovma: restore: call blk_unref for all opened block devices
Thomas Lamprecht [Mon, 25 Apr 2022 08:05:26 +0000 (10:05 +0200)]
vma: restore: call blk_unref for all opened block devices

Originally-by: Fabian Ebner <f.ebner@proxmox.com>
Link: https://lists.proxmox.com/pipermail/pve-devel/2022-April/052642.html
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 6.2.0-4
Thomas Lamprecht [Fri, 22 Apr 2022 09:52:34 +0000 (11:52 +0200)]
bump version to 6.2.0-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovarious stable backports
Thomas Lamprecht [Fri, 22 Apr 2022 08:22:39 +0000 (10:22 +0200)]
various stable backports

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/copyright: drop trailing whitespace
Thomas Lamprecht [Fri, 22 Apr 2022 07:16:23 +0000 (09:16 +0200)]
d/copyright: drop trailing whitespace

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: add suggest dependency-hint for libgl1
Thomas Lamprecht [Fri, 22 Apr 2022 07:09:04 +0000 (09:09 +0200)]
d/control: add suggest dependency-hint for libgl1

It pulls in a lot of stuff via the libglx0 -> libglx-mesa0 dependency
chain, so only suggest it for now to avoid installing it in the
installer or via common "PVE on-top Debian" installations, VirGL
integration is experimental after all and we may drop/replace it with
the vulkan based venus one, once available (Debian 12?).

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: add libgbm to build dependencies
Thomas Lamprecht [Fri, 22 Apr 2022 06:50:32 +0000 (08:50 +0200)]
d/control: add libgbm to build dependencies

required for good virgl support

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 6.2.0-3
Thomas Lamprecht [Fri, 15 Apr 2022 07:09:43 +0000 (09:09 +0200)]
bump version to 6.2.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocherry-pick fix for passing some acpi slic tables
Thomas Lamprecht [Fri, 15 Apr 2022 06:07:34 +0000 (08:07 +0200)]
cherry-pick fix for passing some acpi slic tables

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 6.2.0-2
Wolfgang Bumiller [Thu, 3 Mar 2022 11:05:37 +0000 (12:05 +0100)]
bump version to 6.2.0-2

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agobackup: add patch to initialize bcs bitmap early enough for PBS
Fabian Ebner [Wed, 2 Mar 2022 09:05:16 +0000 (10:05 +0100)]
backup: add patch to initialize bcs bitmap early enough for PBS

This is necessary for multi-disk backups where not all jobs are
immediately started after they are created. QEMU commit
06e0a9c16405c0a4c1eca33cf286cc04c42066a2 did already part of the work,
ensuring that new writes after job creation don't pass through to the
backup, but not yet for the MIRROR_SYNC_MODE_BITMAP case which is used
for PBS.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2 years agod/control: mark numactl a recommended package
Thomas Lamprecht [Thu, 24 Feb 2022 06:49:01 +0000 (07:49 +0100)]
d/control: mark numactl a recommended package

we do not call in anywhere unconditionally

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: drop sdl dependency, we disable it on compile tinme
Thomas Lamprecht [Thu, 24 Feb 2022 06:48:21 +0000 (07:48 +0100)]
d/control: drop sdl dependency, we disable it on compile tinme

disabled via d/rules since a while...

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/control: libaio1 is added by dh shlibs
Thomas Lamprecht [Thu, 24 Feb 2022 06:48:03 +0000 (07:48 +0100)]
d/control: libaio1 is added by dh shlibs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoenable zstd support
Thomas Lamprecht [Thu, 24 Feb 2022 05:34:34 +0000 (06:34 +0100)]
enable zstd support

plan to use that for multifd migration, among other things

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocompile in virgl support
Thomas Lamprecht [Wed, 23 Feb 2022 08:28:52 +0000 (09:28 +0100)]
compile in virgl support

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 6.2.0-1
Thomas Lamprecht [Fri, 18 Feb 2022 13:23:41 +0000 (14:23 +0100)]
bump version to 6.2.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agod/rules: disable libssh by default
Thomas Lamprecht [Fri, 18 Feb 2022 13:21:32 +0000 (14:21 +0100)]
d/rules: disable libssh by default

was always disabled in our clean builds, this now also avoids
auto-enabling it on "dirty" build hosts

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoadd patch for loading a snapshot with qemu-img dd
Fabian Ebner [Fri, 11 Feb 2022 09:24:35 +0000 (10:24 +0100)]
add patch for loading a snapshot with qemu-img dd

Will be used when cloning from a qcow2 efidisk.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agofix getopt-string when introducing -n option for qemu-img dd
Fabian Ebner [Fri, 11 Feb 2022 09:24:34 +0000 (10:24 +0100)]
fix getopt-string when introducing -n option for qemu-img dd

The colon after U is wrong, because it doesn't take an argument.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agoupdate submodule and patches to 6.2.0
Fabian Ebner [Fri, 11 Feb 2022 09:24:33 +0000 (10:24 +0100)]
update submodule and patches to 6.2.0

Notable changes:
* bdrv_co_p{discard,readv,writev,write_zeroes} function signatures
  changed, to using int64_t for offsets/bytes and some still had int
  rather than BrdvRequestFlags for the flags.
* job_cancel_sync now has a force parameter. Commit messages in
  73895f3838cd7fdaf185cf1dbc47be58844a966f
  4cfb3f05627ad82af473e7f7ae113c3884cd04e3
  sound like using force=true makes more sense.
* Added 3 patches coming in via qemu-stable tag, most important one is
  to work around a librbd issue.
* Added another 3 patches from qemu-devel to fix issue leading to
  crash when live migrating with iothread.
* cluster_size calculation helper changed (see patch pve/0026).
* QAPI's if conditionals now use 'CONFIG_FOO' rather than
  'defined(CONFIG_FOO)'

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agobump version to 6.1.1-2
Thomas Lamprecht [Mon, 14 Feb 2022 14:53:18 +0000 (15:53 +0100)]
bump version to 6.1.1-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agovma: create: register all streams before entering coroutines
Fabian Ebner [Mon, 14 Feb 2022 11:02:52 +0000 (12:02 +0100)]
vma: create: register all streams before entering coroutines

Otherwise, the header might already get written by a coroutine and
registering further streams will fail after that.

Also adds a missing g_list_free call for the other GList that's used.

Reported in the community forum:
https://forum.proxmox.com/threads/104744/

Reproducer script (increase beyond 30 if the issue isn't triggered yet):
> #!/usr/bin/perl
>
> my $dir = "./vma-create-bug";
> mkdir $dir;
>
> my $archive_path = "$dir/vzdump-qemu-104-2202_02_02-00_00_00.vma";
> unlink $archive_path;
>
> my $cmd = "vma create $archive_path -v";
> for (my $i = 0; $i < 30; $i++) {
>   system("truncate -s 1M $dir/drive-virtio$i.img");
>   $cmd .= " drive-virtio$i=$dir/drive-virtio$i.img";
> }
> system($cmd);

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agobump version to 6.1.1-1
Thomas Lamprecht [Thu, 13 Jan 2022 09:57:48 +0000 (10:57 +0100)]
bump version to 6.1.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoupdate submodule and patches to 6.1.1
Thomas Lamprecht [Thu, 13 Jan 2022 09:34:33 +0000 (10:34 +0100)]
update submodule and patches to 6.1.1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 6.1.0-3
Thomas Lamprecht [Wed, 1 Dec 2021 14:35:49 +0000 (15:35 +0100)]
bump version to 6.1.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agofix #3738: cherry-pick "block: introduce max_hw_iov for use in scsi-generic"
Fabian Ebner [Wed, 1 Dec 2021 13:10:27 +0000 (14:10 +0100)]
fix #3738: cherry-pick "block: introduce max_hw_iov for use in scsi-generic"

which fixes the bad commit 18473467d55a20d643b6c9b3a52de42f705b4d35
that was tracked down via bisecting, and has a Cc for qemu-stable as
well.

Issue was easy enough to reproduce with a single virtio-block disk
using a few runs of dd if=/dev/urandom of=file bs=1M count=1000

Commit cc071629539dc1f303175a7e2d4ab854c0a8b20f upstream.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agobuildsys: fix build-dependencies on headers for 'vma' and 'pbs_restore'
Dominik Csapak [Thu, 18 Nov 2021 07:05:38 +0000 (08:05 +0100)]
buildsys: fix build-dependencies on headers for 'vma' and 'pbs_restore'

both of them depend on generated header files, so we have to specify
them as sources. Otherwise, it happens (at least on some machines)
that they will be compiled before the headers are generated, aborting
the build.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2 years agofix #3728: handle machine without type
Fabian Grünbichler [Wed, 17 Nov 2021 09:41:17 +0000 (10:41 +0100)]
fix #3728: handle machine without type

libguestfs starts their helper VMs with `-machine accel=..` without a
machine type, and our pve version suffix handling would segfault in that
case. there might be other scripted use cases that are affected as well.

this regression was introduced with the rebase of our patch set on top
of 6.1.0

Fixes: f376b2b9e2fc1f0c8f9c6275e96ede5f423c4126
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agobump version to 6.1.0-2
Thomas Lamprecht [Tue, 16 Nov 2021 08:38:18 +0000 (09:38 +0100)]
bump version to 6.1.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agocherry-pick segfault fix
Fabian Grünbichler [Tue, 16 Nov 2021 08:22:02 +0000 (09:22 +0100)]
cherry-pick segfault fix

this was reported multiple times in our forums[1 with backtraces, 2 & 3
with same log messages], fix is taken from upstream master.

1: https://forum.proxmox.com/threads/pve-7-0-14-1-vm-not-running-live-migration-kills-vm-post-ssd-move-pre-ram-move.99704/
2: https://forum.proxmox.com/threads/proxmox-7-0-14-1-crashes-vm-during-migrate-to-other-host.99678
3: https://forum.proxmox.com/threads/cannot-migrate-between-zfs-and-ceph.99685/#post-430152

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agobump version to 6.1.0-1
Thomas Lamprecht [Mon, 11 Oct 2021 13:15:26 +0000 (15:15 +0200)]
bump version to 6.1.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoadd fixup patch for qxl migration logic
Stefan Reiter [Wed, 13 Oct 2021 15:48:38 +0000 (17:48 +0200)]
add fixup patch for qxl migration logic

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agoupdate and rebase to QEMU v6.1.0
Stefan Reiter [Mon, 11 Oct 2021 11:55:34 +0000 (13:55 +0200)]
update and rebase to QEMU v6.1.0

Very clean rebase, only the +pve version handling needed manual fixing.
Drops two applied patches from extra/ and adds one new from upstream
(extra/0001*, fixes VNC over unix sockets) as well as 3 of my own for
allowing password changes on custom VNC displays again (as seen and
reviewed upstream, but not yet applied).

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agobump version to 6.0.0-4
Thomas Lamprecht [Mon, 6 Sep 2021 05:30:05 +0000 (07:30 +0200)]
bump version to 6.0.0-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoadd temporary QMP race fix
Stefan Reiter [Wed, 1 Sep 2021 16:10:12 +0000 (18:10 +0200)]
add temporary QMP race fix

same as the initial version sent to qemu-devel, it won't be the final
fix we plan to upstream but it should be enough band-aid to
workaround how PVE uses the QMP.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
 [ Thomas: add a bit reasoning to commit message body ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agodrop patch force-disabling smm
Wolfgang Bumiller [Tue, 10 Aug 2021 07:55:11 +0000 (09:55 +0200)]
drop patch force-disabling smm

This drops debian/patches/pve/0005-PVE-Config-smm_available-false.patch
(and renumbers the remaining patches)

From what I could gather, this patch was originally added
due to issues with old kernels. Now we have users which
seem to run into issues *with* the patch.

All this does is toggle an option, and it's available via a
qemu CLI option anyway, so if dropping this patch causes
issues for some people we can just add an option to
qemu-server & UI control smm explicitly.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Cc: Alexandre Derumier <aderumier@odiso.com>
Tested-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agobump version to 6.0.0-3
Fabian Grünbichler [Tue, 3 Aug 2021 13:02:40 +0000 (15:02 +0200)]
bump version to 6.0.0-3

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
2 years agoio_uring: resubmit when result is -EAGAIN
Fabian Ebner [Thu, 29 Jul 2021 09:50:31 +0000 (11:50 +0200)]
io_uring: resubmit when result is -EAGAIN

Linux SCSI can throw spurious -EAGAIN in some corner cases in its
completion path, which will end up being the result in the completed
io_uring request.

Resubmitting such requests should allow block jobs to complete, even
if such spurious errors are encountered.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
2 years agobump version to 6.0.0-2
Thomas Lamprecht [Wed, 23 Jun 2021 09:04:47 +0000 (11:04 +0200)]
bump version to 6.0.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoenable io-uring support in QEMU builds
Stefan Reiter [Mon, 7 Jun 2021 11:48:49 +0000 (13:48 +0200)]
enable io-uring support in QEMU builds

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agobuildsys: change upload dist to bullseye
Thomas Lamprecht [Tue, 8 Jun 2021 09:18:10 +0000 (11:18 +0200)]
buildsys: change upload dist to bullseye

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobump version to 6.0.0-1
Thomas Lamprecht [Fri, 28 May 2021 09:30:55 +0000 (11:30 +0200)]
bump version to 6.0.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agoupdate keycodemapdb for 6.0
Stefan Reiter [Thu, 27 May 2021 10:43:34 +0000 (12:43 +0200)]
update keycodemapdb for 6.0

QEMU 6.0 requires the updated version to build correctly, as the
keymap-gen tool gained some new parameters.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agodebian: ignore submodule checks in QEMU build
Stefan Reiter [Thu, 27 May 2021 10:43:33 +0000 (12:43 +0200)]
debian: ignore submodule checks in QEMU build

...we do those manually, and the build dir is not a git repo.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
2 years agoudpate and rebase to QEMU v6.0.0
Stefan Reiter [Thu, 27 May 2021 10:43:32 +0000 (12:43 +0200)]
udpate and rebase to QEMU v6.0.0

Mostly minor changes, bigger ones summarized:
* QEMU's internal backup code now uses a new async system, which allows
  parallel requests - the default max_workers settings is 64, I chose
  less, since 64 put enough stress on QEMU that the guest became
  practically unusable during the backup, and 16 still shows quite a
  nice measureable performance improvement. Little code changes for us
  though.
* 'malformed' QAPI parameters/functions are now a build error (i.e.
  using '_' vs '-'), I chose to just whitelist our calls in the name of
  backwards compatibility.
* monitor OOB race fix now uses the upstream variant, cherry-picked from
  origin/master since it's not in 6.0 by default
* last patch fixes a bug with snapshot rollback related to the new yank
  system

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 5.2.0-11
Thomas Lamprecht [Thu, 13 May 2021 17:30:59 +0000 (19:30 +0200)]
bump version to 5.2.0-11

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/control: add libjson-perl to build dependencies
Thomas Lamprecht [Thu, 13 May 2021 17:29:19 +0000 (19:29 +0200)]
d/control: add libjson-perl to build dependencies

we use that to build the available machine/flags list

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.2.0-6
Thomas Lamprecht [Thu, 15 Apr 2021 14:29:52 +0000 (16:29 +0200)]
bump version to 5.2.0-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoalloc track: use coroutine version of bdrv_pwrite_zeroes
Thomas Lamprecht [Tue, 6 Apr 2021 14:26:25 +0000 (16:26 +0200)]
alloc track: use coroutine version of bdrv_pwrite_zeroes

as we're in a coroutine here too

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agopbs block driver: run read in the AIO context of the bs
Thomas Lamprecht [Tue, 6 Apr 2021 14:25:42 +0000 (16:25 +0200)]
pbs block driver: run read in the AIO context of the bs

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoalloc track: acquire BS AIO context during dropping
Thomas Lamprecht [Tue, 6 Apr 2021 14:02:56 +0000 (16:02 +0200)]
alloc track: acquire BS AIO context during dropping

ran into this when live-restoring a backup configured for IO-threads,
got the good ol':
> qemu: qemu_mutex_unlock_impl: Operation not permitted
error.

Checking out the history of the related bdrv_backup_top_drop(*bs)
method, we can see that it used to do the AIO context acquiring too,
but in the backup path this was problematic and was changed to be
higher up in the call path in a upstream series from Stefan[0].

That said, this is a completely different code path and it is safe to
do so here. We always run from the main threads's AIO context here
and we call it only indirectly once, guarded by checking for
`s->drop_state == DropNone` and set `s->drop_state = DropRequested`
shortly before we schedule the track_drop() in a bh.

[0]: https://lists.gnu.org/archive/html/qemu-devel/2020-03/msg09139.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoalloc track: keep track_drop() closer to similar block drivers
Thomas Lamprecht [Tue, 6 Apr 2021 14:00:26 +0000 (16:00 +0200)]
alloc track: keep track_drop() closer to similar block drivers

Reads just nicer with a drain begin *and* end call. Also clearing the
backing link of the alloc track BDS makes it closer to
bdrv_backup_top_drop() with which this driver has a bit in common.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.2.0-5
Thomas Lamprecht [Tue, 30 Mar 2021 16:19:47 +0000 (18:19 +0200)]
bump version to 5.2.0-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoadd upstream fixes for qmp_block_resize
Stefan Reiter [Tue, 30 Mar 2021 15:59:51 +0000 (17:59 +0200)]
add upstream fixes for qmp_block_resize

cherry-picked cleanly from 6.0 development tree, fixes an issue with
resizing RBD drives (and reportedly also on krbd or potentially other
storage backends) with iothreads.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 5.2.0-4
Thomas Lamprecht [Tue, 23 Mar 2021 14:41:33 +0000 (15:41 +0100)]
bump version to 5.2.0-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoAdd tentative fix for QMP hang
Stefan Reiter [Mon, 22 Mar 2021 15:48:25 +0000 (16:48 +0100)]
Add tentative fix for QMP hang

Not exactly as sent upstream[0] since we're missing a change in our
v5.2.0 branch (irrelevant for us), but functionally works the same.

[0] https://lists.gnu.org/archive/html/qemu-devel/2021-03/msg07590.html

3 years agod/control: drop unused python from dependencies
Thomas Lamprecht [Thu, 18 Mar 2021 13:15:31 +0000 (14:15 +0100)]
d/control: drop unused python from dependencies

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoadd alloc-track block driver patch
Stefan Reiter [Mon, 15 Mar 2021 15:41:24 +0000 (16:41 +0100)]
add alloc-track block driver patch

See added patches for more info, overview:
0044: slightly increase PBS performance by reducing allocations
0045: slightly increase block-stream performance for Ceph
0046: don't crash with block-stream on RBD
0047: add alloc-track driver for live restore

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofix saving and loading dirty bitmaps in snapshots
Stefan Reiter [Tue, 16 Mar 2021 16:30:22 +0000 (17:30 +0100)]
fix saving and loading dirty bitmaps in snapshots

Saving dirty bitmaps from our savevm-async code didn't work, since we
use a coroutine which holds the iothread mutex already (upstream savevm
is sync, migration uses a thread). Release the mutex before calling the
one function that (according to it's documentation) requires the lock to
*not* be held: qemu_savevm_state_pending.

Additionally, loading dirty bitmaps requires a call to
dirty_bitmap_mig_before_vm_start after "loadvm", which the upstream
savevm does explicitly afterwards - do that too.

This is exposed via the query-proxmox-support property
"pbs-dirty-bitmap-savevm".

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agobump version to 5.2.0-3
Thomas Lamprecht [Fri, 5 Mar 2021 15:23:16 +0000 (16:23 +0100)]
bump version to 5.2.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agomachine list: save as JSON
Thomas Lamprecht [Fri, 5 Mar 2021 15:21:30 +0000 (16:21 +0100)]
machine list: save as JSON

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoadd ACPI compat patch for 5.1 and older machine types
Stefan Reiter [Thu, 4 Mar 2021 12:52:04 +0000 (13:52 +0100)]
add ACPI compat patch for 5.1 and older machine types

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoadd static supported machines file
Stefan Reiter [Thu, 4 Mar 2021 12:52:03 +0000 (13:52 +0100)]
add static supported machines file

Same rationale as the CPU flags file, avoids calling QEMU binary just to
query machine types.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agomove bitmap-mirror patches to seperate folder
Stefan Reiter [Wed, 3 Mar 2021 09:56:03 +0000 (10:56 +0100)]
move bitmap-mirror patches to seperate folder

...instead of having them in the middle of the backup related patches.
These might (hopefully) become upstream at some point as well.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoclean up pve/ patches by squashing patches of patches
Stefan Reiter [Wed, 3 Mar 2021 09:56:02 +0000 (10:56 +0100)]
clean up pve/ patches by squashing patches of patches

No functional change intended.

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.2.0-2
Thomas Lamprecht [Wed, 24 Feb 2021 17:25:18 +0000 (18:25 +0100)]
bump version to 5.2.0-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agopbs-restore: unref/close target block backend
Stefan Reiter [Wed, 24 Feb 2021 13:34:47 +0000 (14:34 +0100)]
pbs-restore: unref/close target block backend

Use blk_unref to drop the last reference, which will close the block
backend and flush all caches and outstanding writes.

This is especially important for restoring to Ceph, as the userspace
librbd caches will not be flushed if the application exits immediately,
leading to potentially incomplete restores.

Reported-by: Eneko Lacunza <elacunza@binovo.es>
Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agod/patches: backport virtiofsd security fix
Thomas Lamprecht [Wed, 24 Feb 2021 17:40:28 +0000 (18:40 +0100)]
d/patches: backport virtiofsd security fix

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agod/rules: build virtiofsd
Thomas Lamprecht [Wed, 24 Feb 2021 15:25:23 +0000 (16:25 +0100)]
d/rules: build virtiofsd

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobump version to 5.2.0-1
Thomas Lamprecht [Fri, 12 Feb 2021 11:10:04 +0000 (12:10 +0100)]
bump version to 5.2.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agobuild: drop explicit libproxmox-backup-qemu0 dep
Fabian Grünbichler [Tue, 9 Feb 2021 11:29:32 +0000 (12:29 +0100)]
build: drop explicit libproxmox-backup-qemu0 dep

it ships a symbol file now, so it can be auto-generated based on the
build-dep and usage.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agoadd PBS master key support
Stefan Reiter [Thu, 11 Feb 2021 16:11:12 +0000 (17:11 +0100)]
add PBS master key support

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agoUpdate to QEMU 5.2
Stefan Reiter [Thu, 11 Feb 2021 16:11:11 +0000 (17:11 +0100)]
Update to QEMU 5.2

Lots of patches touched and some slight changes to the build process
since QEMU switched to meson as their build system. Functionality-wise
very little rebasing required.

New patches introduced:
* pve/0058: to fix VMA backups and clean up some code in general with
  new 5.2 features now available to us (namely coroutine-enabled QMP).
* extra/0002: don't build man pages for guest agent when disabled
* extra/0003: fix live-migration with hugepages
* 0017 and 0018 are adjusted to fix snapshot abort and improve
  snap performance a bit

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
3 years agofix #3084: fall back to open-iscsi initiatorname
Fabian Ebner [Tue, 17 Nov 2020 11:38:36 +0000 (12:38 +0100)]
fix #3084: fall back to open-iscsi initiatorname

Fixes vma restore when the target is an iSCSI storage which expects that
initiatorname. Also avoids the need to always explicitly set the initiatorname
in PVE code, thus fixing moving efidisks from and to such iSCSI storages.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>