Debian Patches

Status for qemu/1:10.1.0+ds-5

Patch Description Author Forwarded Bugs Origin Last update
u-boot-sam460ex-fdi.patch u-boot-sam460ex: fdi fix
Fix the missing extern in a variable declaration,
resulting in this variable being repeated each time
this header is included, so the link with modern gcc
fails.


diff --git a/roms/u-boot-sam460ex/board/ACube/common/vesa.h b/roms/u-boot-sam460ex/board/ACube/common/vesa.h
index a6c32c3c2c..99672aa67b 100644
Michael Tokarev <mjt@tls.msk.ru> yes 2023-04-01
u-boot-sam460ex-mstring.patch u-boot-sam460ex: remove obsolete -mstring gcc option
Modern gcc complains about it.


diff --git a/roms/u-boot-sam460ex/arch/powerpc/cpu/ppc4xx/config.mk b/roms/u-boot-sam460ex/arch/powerpc/cpu/ppc4xx/config.mk
index 8f47c9b728..cf4414cee6 100644
Michael Tokarev <mjt@tls.msk.ru> yes 2023-10-22
microvm-default-machine-type.patch set default machine type to be microvm if CONFIG_MICROVM is defined
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index a8d354aabe..1806cde036 100644
Michael Tokarev <mjt@tls.msk.ru> not-needed 2020-02-22
static-linux-user-stubs.diff static linux-user stubs
When building a static linux-user binaries, ld complains:

/usr/bin/ld: libglib-2.0.a(gutils.c.o): in function `g_get_user_database_entry':
warning: Using 'getpwuid' in statically linked applications requires...
warning: Using 'getpwnam_r' in statically linked applications requires...
warning: Using 'getpwuid_r' in statically linked applications requires...

This is because glib, in their "misc utils" unit (gutils.c), has functions
to return current user home directory and similar stuff, and this unit is
almost always included into the link, even if these particular functions
aren't used by the application.

Ideally this should be fixed on the glib side, by splitting gutils.c into
several files, so unused symbols wont be included in the link at all.
But this requires extra efforts from glib side, and static linkage with
glib is very rare.

So just stub-out a few getpw* symbols here, - this will eliminate the
warning and will make resulting binary quite a bit smaller.

It would be nice to eliminate whole dlopen() too.

diff --git a/linux-user/main.c b/linux-user/main.c
Michael Tokarev <mjt@tls.msk.ru> not-needed 2024-04-25
note-missing-module-pkg-name.diff Note missing module package name
Debian ships different modules in different packages.
By default qemu ignores the fact that it can not load
a module, pretending this module never existed.
Give a useful hint about the package where the module
in question resides.

This is a hack, but it makes qemu packaged in debian
more user-friendly.

diff --git a/audio/audio.c b/audio/audio.c
index 7ac74f9e16..15f1071bdc 100644
Michael Tokarev <mjt@tls.msk.ru> not-needed 2021-08-22
skip-unpack-edk2-blobs.patch skip unpacking of edk2 blobs
Debian strips the blobs from qemu.orig.tar.gz so the code
fails to unpack the missing files.

diff --git a/pc-bios/meson.build b/pc-bios/meson.build
index a7224ef469..ddaedd95af 100644
Michael Tokarev <mjt@tls.msk.ru> not-needed 2023-04-01
skip-install-dtb.patch skip installing dtb files
Debian strips the blobs from qemu.orig.tar.gz so the code
fails to unpack the missing files. The dtb files are built
in d/rules for the indep build.
Michael Tokarev <mjt@tls.msk.ru> not-needed 2025-07-27
qemu-bridge-helper-path.patch set proper path for qemu-bridge-helper binary in the docs
Upstream should propagate this path from the config option.
This is a dumb-n-quick fix.

diff --git a/qemu-options.hx b/qemu-options.hx
index b56f6b2fb2..fe138c83d3 100644
Michael Tokarev <mjt@tls.msk.ru> no debian 2023-04-18
gnu-hurd.patch Add OS detection and support for GNU/Hurd
Adds minimal (just OS detection) "support" for
GNU/Hurd. Just a test for now.
Michael Tokarev <mjt@tls.msk.ru> not-needed 2024-08-24
qboot-Disable-LTO-for-ELF-binary-build-step.patch [PATCH] qboot: Disable LTO for ELF binary build step
If LTO is enabled by default qboot fails to link as it exposes
a few issues that break the build:

../code16.c: Assembler messages:
../code16.c:37: Error: redundant addr32 prefix
../code16.c:27: Error: redundant addr32 prefix
../code16.c:18: Error: redundant addr32 prefix

Until fixed suppress this behavior by adding -fno-lto to the end
of the linker flags.
Christian Ehrhardt <christian.ehrhardt@canonical.com> yes upstream https://gitlab.com/bonzini/qboot/-/merge_requests/32 2022-07-06
u-boot-sam460ex-build.patch u-boot-sam460ex: build fixes
Fixes or works around numerous build issues and one real bug.

Most are due to new defaults in gcc (in debian), like
-Werror=implicit-function-declarations (there are a lot of missing decls)
-Werror=incompatible-pointer-types (function types mismatches)
-Werror=int-conversion (free int <=> pointer conversion)


diff --git a/roms/u-boot-sam460ex/board/ACube/Sam460ex/Sam460ex.c b/roms/u-boot-sam460ex/board/ACube/Sam460ex/Sam460ex.c
index 4d5b953c02..5ecf16dbe2 100644
Michael Tokarev <mjt@tls.msk.ru> yes debian 2024-08-03
u-boot-sam460ex-stdc23.patch roms/u-boot-sam460ex: support c23 (bool)
In c23, bool, true and false are keywords,
don't try to (re)define them. Instead,
include <stdbool.h>.

diff --git a/roms/u-boot-sam460ex/include/xyzModem.h b/roms/u-boot-sam460ex/include/xyzModem.h
Michael Tokarev <mjt@tls.msk.ru> no debian 2025-08-25
SLOF-stdc23.patch roms/SLOF: support c23 (bool)
In c23, bool, true and false are keywords,
don't try to (re)define them.

diff --git a/roms/SLOF/lib/libc/include/stdbool.h b/roms/SLOF/lib/libc/include/stdbool.h
Michael Tokarev <mjt@tls.msk.ru> no debian 2025-08-25
openbios-use-source_date_epoch-in-makefile.patch roms/openbios: Use SOURCE_DATE_EPOCH in Makefile.
Embedding the build time breaks reproducibility. Instead, use the date
specified by the SOURCE_DATE_EPOCH environment variable:

https://reproducible-builds.org/docs/source-date-epoch/

This patch relies on features of GNU date, and will need further
changes for portability to other systems.
Vagrant Cascadian <vagrant@reproducible-builds.org> no 2020-06-21
seabios-hppa-use-consistent-date-and-remove-hostname.patch roms/seabios-hppa: Use consistent date and remove hostname.
Two issues break reproducibility; the time and hostname get embedded
in the resulting seabios binary.

Simply drop the hostname from the embedded version string, as it
shouldn't be needed in Debian package builds.

Use the SOURCE_DATE_EPOCH environment variable to set the build date
rather than the current time:

https://reproducible-builds.org/docs/source-date-epoch/
Vagrant Cascadian <vagrant@reproducible-builds.org> no 2020-06-21
slof-remove-user-and-host-from-release-version.patch roms/SLOF/Makefile.gen: Remove user and host from release version.
This version string ends up in the slof.bin, leading to
reproducibility issues.
Vagrant Cascadian <vagrant@reproducible-builds.org> no 2020-06-22
slof-ensure-ld-is-called-with-C-locale.patch slof/Makefile.gen: Ensure ld is called with the C locale.
The output of "ld -V" changes based on the environment's locale.
Vagrant Cascadian <vagrant@reproducible-builds.org> no 2020-06-22
disable-pycotap.patch disable pycotap for now
pycotap is only needed for functional tests.
Disable it for now for building qemu.

diff --git a/pythondeps.toml b/pythondeps.toml
Michael Tokarev <mjt@tls.msk.ru> not-needed 2024-12-27
tcg-arm-fix-tgen_deposit.patch tcg/arm: Fix tgen_deposit
When converting from tcg_out_deposit, the arguments were not
shuffled properly.
Richard Henderson <richard.henderson@linaro.org> not-needed 2025-08-29
block-curl-fix-curl-internal-handles-handling.patch block/curl: fix curl internal handles handling
block/curl.c uses CURLMOPT_SOCKETFUNCTION to register a socket callback.
According to the documentation, this callback is called not just with
application-created sockets but also with internal curl sockets, - and
for such sockets, user data pointer is not set by the application, so
the result qemu crashing.

Pass BDRVCURLState directly to the callback function as user pointer,
instead of relying on CURLINFO_PRIVATE.

This problem started happening with update of libcurl from 8.9 to 8.10 --
apparently with this change curl started using private handles more.

(CURLINFO_PRIVATE is used in one more place, in curl_multi_check_completion() -
it might need a similar fix too)

(cherry picked from commit 606978500c3d18fb89a49844f253097b17f757de)
Michael Tokarev <mjt@tls.msk.ru> not-needed debian upstream, https://gitlab.com/qemu-project/qemu/-/commit/606978500c3d18fb89a49844f253097b17f757de 2025-08-24
e1000e-prevent-crash-from-legacy-interrupt-firing-af.patch e1000e: Prevent crash from legacy interrupt firing after MSI-X enable
A race condition between guest driver actions and QEMU timers can lead
to an assertion failure when the guest switches the e1000e from legacy
interrupt mode to MSI-X. If a legacy interrupt delay timer (TIDV or
RDTR) is active, but the guest enables MSI-X before the timer fires,
the pending interrupt cause can trigger an assert in
e1000e_intmgr_collect_delayed_causes().

This patch removes the assertion and executes the code that clears the
pending legacy causes. This change is safe and introduces no unintended
behavioral side effects, as it only alters a state that previously led
to termination.

- when core->delayed_causes == 0 the function was already a no-op and
remains so.

- when core->delayed_causes != 0 the function would previously
crash due to the assertion failure. The patch now defines a safe
outcome by clearing the cause and returning. Since behavior after
the assertion never existed, this simply corrects the crash.

(cherry picked from commit 8e4649cac9bcddc050d2df07908075e9e69bccc7)
Laurent Vivier <lvivier@redhat.com> not-needed upstream, https://gitlab.com/qemu-project/qemu/-/commit/8e4649cac9bcddc050d2df07908075e9e69bccc7 2025-08-07
ui-spice-fix-crash-when-disabling-GL-scanout-on.patch ui/spice: fix crash when disabling GL scanout on
When spice_qxl_gl_scanout2() isn't available, the fallback code
incorrectly handles NULL arguments to disable the scanout, leading to:

Program terminated with signal SIGSEGV, Segmentation fault.
#0 spice_server_gl_scanout (qxl=0x55a25ce57ae8, fd=0x0, width=0, height=0, offset=0x0, stride=0x0, num_planes=0, format=0, modifier=72057594037927935, y_0_top=0)
at ../ui/spice-display.c:983
983 if (num_planes <= 1) {
Marc-André Lureau <marcandre.lureau@redhat.com> not-needed debian upstream upstream, https://lists.nongnu.org/archive/html/qemu-devel/2025-09/msg00970.html 2025-09-03
hw-vfio-user-add-x-pci-class-code.patch hw/vfio-user: add x-pci-class-code
This new option was not added to vfio_user_pci_dev_properties, which
caused an incorrect class code for vfio-user devices.

(cherry picked from commit 1b50621881241ac5bc75ae7f8aa4c278ada8a668)
John Levon <john.levon@nutanix.com> not-needed upstream, https://gitlab.com/qemu-project/qemu/-/commit/1b50621881241ac5bc75ae7f8aa4c278ada8a668 2025-08-27
seabios-hppa-remove-acpi.patch seabios-hppa: remove ACPI
hppa does not have ACPI. Yet, seabios-hppa contains the ACPI
code, and creates and embeds ACPI tables. Which, strictly
speaking, requires (re)compilation of the provided source.

Instead of building ACPI tables with iasl, drop ACPI support
from the resulting seabios-hppa.

diff --git a/roms/seabios-hppa/Makefile.parisc b/roms/seabios-hppa/Makefile.parisc
Michael Tokarev <mjt@tls.msk.ru> invalid 2025-09-13
riscv-on-ppc64-gcc15-121689.patch riscv-on-ppc64: work around gcc-15 bug 121689
See also: LP#2120835
https://lists.gnu.org/archive/html/qemu-devel/2025-08/msg03901.html

Based solely on work by Christian Ehrhardt.

diff --git a/target/riscv/pmu.c b/target/riscv/pmu.c
Michael Tokarev <mjt@tls.msk.ru> yes upstream 2025-09-13

All known versions for source package 'qemu'

Links