[packages/qemu] Up to 11.1.2
arekm
arekm at pld-linux.org
Mon Oct 12 22:37:34 CEST 2026
commit 80992f2cd5f685ae7d4fe9b6133855b75be49139
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Oct 12 22:34:20 2026 +0200
Up to 11.1.2
32-bit hosts no longer supported. glusterfs obsolete.
libvfio-user-alloca.patch | 35 ----
libvfio-user-types.patch | 516 ----------------------------------------------
qemu-u2f-emu.patch | 11 -
qemu-user-execve.patch | 26 ++-
qemu-vnc-install.patch | 13 ++
qemu.spec | 155 +++++++-------
6 files changed, 96 insertions(+), 660 deletions(-)
---
diff --git a/qemu.spec b/qemu.spec
index be397e5..b30992c 100644
--- a/qemu.spec
+++ b/qemu.spec
@@ -6,7 +6,6 @@
%bcond_without opengl # Don't require GL deps
%bcond_with canokey # CanoKey support
%bcond_without ceph # Ceph/RBD support
-%bcond_without glusterfs # GlusterFS backend
%bcond_without rdma # RDMA-based migration support
%bcond_without gtk3 # Do not build GTK+ UI
%bcond_without vte # VTE support in GTK+ UI
@@ -36,25 +35,22 @@
%if %{without gtk3}
%undefine with_vte
%endif
-%ifarch x32
-%undefine with_xen
-%endif
%ifnarch %{x8664} aarch64
%undefine with_pmem
%endif
-%ifnarch %{ix86} %{x8664} x32
+%ifnarch %{x8664}
%undefine with_qatzip
%endif
Summary: QEMU CPU Emulator
Summary(pl.UTF-8): QEMU - emulator procesora
Name: qemu
-Version: 10.2.1
-Release: 2
+Version: 11.1.2
+Release: 1
License: GPL v2, BSD (edk2 firmware files)
Group: Applications/Emulators
Source0: https://download.qemu.org/%{name}-%{version}.tar.xz
-# Source0-md5: 35ddfb6690f75db207924a9fdb30f0ed
+# Source0-md5: f37a3842afa91df8bd602e0f29dca6d9
# Loads kvm kernel modules at boot
Source3: kvm-modules-load.conf
# Creates /dev/kvm
@@ -75,10 +71,8 @@ Source16: %{name}-pr-helper.socket
Patch0: %{name}-cflags.patch
Patch1: %{name}-user-execve.patch
Patch3: libjpeg-boolean.patch
-Patch5: %{name}-u2f-emu.patch
Patch6: %{name}-linux-mount.patch
-Patch7: libvfio-user-types.patch
-Patch8: libvfio-user-alloca.patch
+Patch7: %{name}-vnc-install.patch
URL: https://www.qemu.org/
%{?with_opengl:BuildRequires: Mesa-libgbm-devel}
%{?with_opengl:BuildRequires: OpenGL-GLX-devel}
@@ -97,11 +91,9 @@ BuildRequires: curl-devel >= 7.29.0
BuildRequires: cyrus-sasl-devel >= 2
BuildRequires: daxctl-devel >= 57
BuildRequires: flex
-BuildRequires: gcc >= 6:7.4
+BuildRequires: gcc >= 6:10.4
BuildRequires: gettext-tools
BuildRequires: glib2-devel >= 1:2.75.3
-# minimal is 3.4 but new features are used up to 6
-%{?with_glusterfs:BuildRequires: glusterfs-devel >= 6}
BuildRequires: gnutls-devel >= 3.7.5
%{?with_gtk3:BuildRequires: gtk+3-devel >= 3.22.0}
BuildRequires: jack-audio-connection-kit-devel
@@ -158,9 +150,12 @@ BuildRequires: pkgconfig
%{?with_pulseaudio:BuildRequires: pulseaudio-devel}
BuildRequires: python3 >= 1:3.9
BuildRequires: python3-distlib
+BuildRequires: python3-pip
BuildRequires: python3-pycotap >= 1.1.0
+BuildRequires: python3-setuptools
BuildRequires: python3-sphinx_rtd_theme >= 0.5
BuildRequires: python3-tomli >= 1.2.0
+BuildRequires: python3-wheel
BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 1.644
%{?with_system_seabios:BuildRequires: seabios}
@@ -168,8 +163,8 @@ BuildRequires: sed >= 4.0
%{?with_snappy:BuildRequires: snappy-devel}
BuildRequires: sphinx-pdg >= 3.4.3
%if %{with spice}
-BuildRequires: spice-protocol >= 0.14.0
-BuildRequires: spice-server-devel >= 0.14.0
+BuildRequires: spice-protocol >= 0.14.3
+BuildRequires: spice-server-devel >= 0.15.0
%endif
%{?with_systemtap:BuildRequires: systemtap-sdt-devel}
BuildRequires: tar >= 1:1.22
@@ -203,15 +198,14 @@ BuildRequires: pcre2-8-static >= 10.32
BuildRequires: zlib-static
%endif
Requires: %{name}-img = %{version}-%{release}
-%ifnarch %{arm} %{ix86} x32
Requires: %{name}-system-aarch64 = %{version}-%{release}
Requires: %{name}-system-alpha = %{version}-%{release}
Requires: %{name}-system-hppa = %{version}-%{release}
Requires: %{name}-system-microblaze = %{version}-%{release}
Requires: %{name}-system-s390x = %{version}-%{release}
-%endif
Requires: %{name}-system-arm = %{version}-%{release}
Requires: %{name}-system-avr = %{version}-%{release}
+Requires: %{name}-system-hexagon = %{version}-%{release}
Requires: %{name}-system-m68k = %{version}-%{release}
Requires: %{name}-system-mips = %{version}-%{release}
Requires: %{name}-system-or1k = %{version}-%{release}
@@ -225,7 +219,8 @@ Requires: %{name}-system-x86 = %{version}-%{release}
Requires: %{name}-system-xtensa = %{version}-%{release}
Requires: %{name}-user = %{version}-%{release}
Obsoletes: qemu-kvm < 2
-ExcludeArch: i386
+# QEMU 11 supports 64-bit hosts only
+ExcludeArch: %{ix86} %{arm} x32
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%define systempkg_req \
@@ -247,7 +242,7 @@ Requires: libusb >= 1.0.22 \
Requires: libxdp >= 1.4.0 \
Requires: pixman >= 0.21.8 \
%if %{with spice} \
-Requires: spice-server-libs >= 0.14.0 \
+Requires: spice-server-libs >= 0.15.0 \
%endif \
%if %{with usbredir} \
Requires: usbredir >= 0.6 \
@@ -329,6 +324,7 @@ Provides: group(qemu)
Provides: user(qemu)
Obsoletes: qemu-kvm-common < 2
Obsoletes: qemu-module-block-archipelago < 2.9.0
+Obsoletes: qemu-module-block-gluster < 11.1.0
Obsoletes: qemu-system-cris < 10.0.0
Obsoletes: qemu-system-lm32 < 5.2
Obsoletes: qemu-system-moxie < 6.1
@@ -490,6 +486,25 @@ dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
Ten pakiet zawiera emulator systemu z procesorem AVR.
+%package system-hexagon
+Summary: QEMU system emulator for Hexagon
+Summary(pl.UTF-8): QEMU - emulator systemu z procesorem Hexagon
+Group: Applications/Emulators
+Requires: %{name}-common = %{version}-%{release}
+%systempkg_req
+
+%description system-hexagon
+QEMU is a generic and open source processor emulator which achieves a
+good emulation speed by using dynamic translation.
+
+This package provides the system emulator with Hexagon CPU.
+
+%description system-hexagon -l pl.UTF-8
+QEMU to ogólny, mający otwarte źródła emulator procesora, osiągający
+dobrą szybkość emulacji dzięki użyciu translacji dynamicznej.
+
+Ten pakiet zawiera emulator systemu z procesorem Hexagon.
+
%package system-hppa
Summary: QEMU system emulator for HP/PA
Summary(pl.UTF-8): QEMU - emulator systemu z procesorem HP/PA
@@ -849,20 +864,6 @@ Moduł QEMU dla urządeń blokowych CURL. Pozwala na dostęp do zdalnych
dysków poprzez http, https, ftp i inne protokoły obsługiwane przez
bibliotekę CURL.
-%package module-block-gluster
-Summary: QEMU module for 'gluster' block devices
-Summary(pl.UTF-8): Moduł QEMU dla urządeń blokowych typu 'gluster'
-Group: Applications/Emulators
-Requires: %{name}-common = %{version}-%{release}
-Requires: glusterfs-libs >= 6
-
-%description module-block-gluster
-QEMU block device support for remote Gluster storage.
-
-%description module-block-gluster -l pl.UTF-8
-Moduł urządzeń blokowych QEMU do dostępu do zdalnej przestrzeni
-dyskowej Gluster.
-
%package module-block-iscsi
Summary: QEMU module for 'iscsi' block devices
Summary(pl.UTF-8): Moduł QEMU dla urządeń blokowych typu 'iscsi'
@@ -954,6 +955,23 @@ QEMU SDL UI and audio driver.
%description module-ui-sdl -l pl.UTF-8
Sterownik interfejsu użytkownika i dźwięku SDL dla QEMU.
+%package vnc
+Summary: QEMU standalone VNC server
+Summary(pl.UTF-8): Samodzielny serwer VNC dla QEMU
+Group: Applications/Emulators
+Requires: %{name}-common = %{version}-%{release}
+Suggests: %{name}-module-ui-dbus = %{version}-%{release}
+
+%description vnc
+QEMU standalone VNC server. It connects to a running QEMU instance
+through the D-Bus display interface and serves the guest display,
+input, audio, clipboard and serial console over the VNC protocol.
+
+%description vnc -l pl.UTF-8
+Samodzielny serwer VNC dla QEMU. Łączy się z działającą instancją QEMU
+przez interfejs wyświetlania D-Bus i udostępnia ekran, wejście, dźwięk,
+schowek oraz konsolę szeregową gościa po protokole VNC.
+
%package -n systemtap-qemu
Summary: systemtap/dtrace probes for QEMU
Summary(pl.UTF-8): Sondy systemtap/dtrace dla QEMU
@@ -1001,10 +1019,8 @@ Pliki nagłówkowe biblioteki vfio-user.
%patch -P0 -p1
%patch -P1 -p1
%patch -P3 -p1
-%patch -P5 -p1
%patch -P6 -p1
%patch -P7 -p1
-%patch -P8 -p1
%{__sed} -i '1s,/usr/bin/env python3,%{__python3},' scripts/qemu-trace-stap
@@ -1016,13 +1032,6 @@ Pliki nagłówkowe biblioteki vfio-user.
%if %{without smartcard}
%{__sed} -i -e '/^config USB_SMARTCARD/,/^$/ s/default y/default n/' hw/usb/Kconfig
%endif
-%ifarch x32
-# xen-emu supports only LP64 __x86_64__ case
-%{__sed} -i -e '/^config XEN_EMU/,$ s/default y/default n/' hw/i386/Kconfig
-
-# plain x32 doesn't provide __sync_bool_compare_and_swap_16 - fail int128_t/ATOMIC128 tests earlier
-%{__sed} -i -e '/^has_int128_type = / s/$/FAILME/' meson.build
-%endif
%build
@@ -1054,6 +1063,7 @@ build() {
cd ..
}
+# rust: crates are fetched from the network at build time and it only replaces the C pl011 and HPET devices
build dynamic \
--extra-cflags="%{rpmcflags} %{rpmcppflags}" \
--extra-ldflags="%{rpmldflags} -Wl,-z,relro -Wl,-z,now" \
@@ -1067,7 +1077,6 @@ build dynamic \
--enable-curses \
--enable-docs \
--enable-fdt \
- %{__enable_disable glusterfs} \
%{!?with_gtk3:--disable-gtk} \
%{__enable_disable iscsi libiscsi} \
--enable-libcbor \
@@ -1087,6 +1096,8 @@ build dynamic \
%{__enable_disable spice} \
%{__enable_disable smartcard} \
%{__enable_disable snappy} \
+ --enable-qemu-vnc \
+ --disable-rust \
--enable-tpm \
%{__enable_disable usbredir usb-redir} \
%{__enable_disable vde} \
@@ -1165,7 +1176,7 @@ EOF
install -p qemu.sasl $RPM_BUILD_ROOT%{_sysconfdir}/sasl/qemu.conf
-%ifarch %{ix86} %{x8664} x32
+%ifarch %{x8664}
install -p %{SOURCE3} $RPM_BUILD_ROOT/etc/modules-load.d/kvm.conf
install -p %{SOURCE4} $RPM_BUILD_ROOT/lib/udev/rules.d
%endif
@@ -1188,13 +1199,13 @@ install -p %{SOURCE14} $RPM_BUILD_ROOT/etc/logrotate.d/qemu-ga
cp -p %{SOURCE15} %{SOURCE16} $RPM_BUILD_ROOT%{systemdunitdir}
-%ifarch %{ix86} %{x8664} x32
+%ifarch %{x8664}
cp -p contrib/systemd/qemu-vmsr-helper.{service,socket} $RPM_BUILD_ROOT%{systemdunitdir}
%endif
# Install binfmt
BINFMT_CPUS=" \
-%ifnarch %{ix86} %{x8664} x32
+%ifnarch %{x8664}
i386 x86_64 \
%endif
%ifnarch aarch64
@@ -1203,9 +1214,7 @@ BINFMT_CPUS=" \
%ifnarch alpha
alpha \
%endif
-%ifnarch %{arm}
arm \
-%endif
aarch64_be \
armeb \
microblaze microblazeel \
@@ -1273,7 +1282,7 @@ for t in client server; do
done
# test modules
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/accel-qtest-*.so
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/accel-qtest.so
# Windows installer icon, not used
%{__rm} $RPM_BUILD_ROOT%{_datadir}/%{name}/qemu-nsis.bmp
# packaged as %doc
@@ -1369,7 +1378,7 @@ fi
%{systemdunitdir}/ksmtuned.service
%{systemdunitdir}/qemu-pr-helper.service
%{systemdunitdir}/qemu-pr-helper.socket
-%ifarch %{ix86} %{x8664} x32
+%ifarch %{x8664}
%{systemdunitdir}/qemu-vmsr-helper.service
%{systemdunitdir}/qemu-vmsr-helper.socket
%endif
@@ -1383,7 +1392,7 @@ fi
%attr(755,root,root) %{_bindir}/qemu-nbd
%attr(755,root,root) %{_bindir}/qemu-pr-helper
%attr(755,root,root) %{_bindir}/qemu-storage-daemon
-%ifarch %{ix86} %{x8664} x32
+%ifarch %{x8664}
%attr(755,root,root) %{_bindir}/qemu-vmsr-helper
%endif
%attr(755,root,root) %{_sbindir}/ksmctl
@@ -1489,7 +1498,6 @@ fi
%files user
%defattr(644,root,root,755)
/usr/lib/binfmt.d/qemu-*-dynamic.conf
-%ifnarch %{arm} %{ix86} x32
%attr(755,root,root) %{_bindir}/qemu-aarch64
%attr(755,root,root) %{_bindir}/qemu-aarch64_be
%attr(755,root,root) %{_bindir}/qemu-alpha
@@ -1506,7 +1514,6 @@ fi
%attr(755,root,root) %{_bindir}/qemu-sparc32plus
%attr(755,root,root) %{_bindir}/qemu-sparc64
%attr(755,root,root) %{_bindir}/qemu-x86_64
-%endif
%attr(755,root,root) %{_bindir}/qemu-arm
%attr(755,root,root) %{_bindir}/qemu-armeb
%attr(755,root,root) %{_bindir}/qemu-hexagon
@@ -1530,7 +1537,6 @@ fi
%files user-static
%defattr(644,root,root,755)
/usr/lib/binfmt.d/qemu-*-static.conf
-%ifnarch %{arm} %{ix86} x32
%attr(755,root,root) %{_bindir}/qemu-aarch64-static
%attr(755,root,root) %{_bindir}/qemu-aarch64_be-static
%attr(755,root,root) %{_bindir}/qemu-alpha-static
@@ -1547,7 +1553,6 @@ fi
%attr(755,root,root) %{_bindir}/qemu-sparc32plus-static
%attr(755,root,root) %{_bindir}/qemu-sparc64-static
%attr(755,root,root) %{_bindir}/qemu-x86_64-static
-%endif
%attr(755,root,root) %{_bindir}/qemu-arm-static
%attr(755,root,root) %{_bindir}/qemu-armeb-static
%attr(755,root,root) %{_bindir}/qemu-hexagon-static
@@ -1568,7 +1573,6 @@ fi
%{?with_systemtap:%attr(755,root,root) %{_bindir}/qemu-trace-stap-static}
%endif
-%ifnarch %{arm} %{ix86} x32
%files system-aarch64
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/qemu-system-aarch64
@@ -1580,7 +1584,6 @@ fi
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/qemu-system-alpha
%{_datadir}/%{name}/palcode-clipper
-%endif
%files system-arm
%defattr(644,root,root,755)
@@ -1595,32 +1598,29 @@ fi
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/qemu-system-avr
-%ifnarch %{arm} %{ix86} x32
+%files system-hexagon
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/qemu-system-hexagon
+
%files system-hppa
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/qemu-system-hppa
%{_datadir}/%{name}/hppa-firmware.img
%{_datadir}/%{name}/hppa-firmware64.img
-%endif
%files system-m68k
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/qemu-system-m68k
-%ifnarch %{arm} %{ix86} x32
%files system-microblaze
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/qemu-system-microblaze
-%attr(755,root,root) %{_bindir}/qemu-system-microblazeel
-%endif
%files system-mips
%defattr(644,root,root,755)
-%ifnarch %{arm} %{ix86} x32
%attr(755,root,root) %{_bindir}/qemu-system-loongarch64
%attr(755,root,root) %{_bindir}/qemu-system-mips64
%attr(755,root,root) %{_bindir}/qemu-system-mips64el
-%endif
%attr(755,root,root) %{_bindir}/qemu-system-mips
%attr(755,root,root) %{_bindir}/qemu-system-mipsel
%{_datadir}/%{name}/edk2-loongarch64-code.fd
@@ -1634,9 +1634,7 @@ fi
%files system-ppc
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/qemu-system-ppc
-%ifnarch %{arm} %{ix86} x32
%attr(755,root,root) %{_bindir}/qemu-system-ppc64
-%endif
%{_datadir}/%{name}/dtb/bamboo.dtb
%{_datadir}/%{name}/dtb/canyonlands.dtb
%{_datadir}/%{name}/dtb/petalogix-ml605.dtb
@@ -1656,9 +1654,7 @@ fi
%files system-riscv
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/qemu-system-riscv32
-%ifnarch %{arm} %{ix86} x32
%attr(755,root,root) %{_bindir}/qemu-system-riscv64
-%endif
%{_datadir}/%{name}/edk2-riscv-code.fd
%{_datadir}/%{name}/edk2-riscv-vars.fd
%{_datadir}/%{name}/firmware/60-edk2-riscv64.json
@@ -1669,12 +1665,10 @@ fi
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/qemu-system-rx
-%ifnarch %{arm} %{ix86} x32
%files system-s390x
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/qemu-system-s390x
%{_datadir}/%{name}/s390-ccw.img
-%endif
%files system-sh4
%defattr(644,root,root,755)
@@ -1684,9 +1678,7 @@ fi
%files system-sparc
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/qemu-system-sparc
-%ifnarch %{arm} %{ix86} x32
%attr(755,root,root) %{_bindir}/qemu-system-sparc64
-%endif
%{_datadir}/%{name}/QEMU,cgthree.bin
%{_datadir}/%{name}/QEMU,tcx.bin
%{_datadir}/%{name}/openbios-sparc32
@@ -1699,10 +1691,8 @@ fi
%files system-x86
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/qemu-system-i386
-%ifnarch %{arm} %{ix86} x32
%attr(755,root,root) %{_bindir}/qemu-system-x86_64
-%endif
-%ifarch %{ix86} %{x8664} x32
+%ifarch %{x8664}
%config(noreplace) %verify(not md5 mtime size) /etc/modules-load.d/kvm.conf
/lib/udev/rules.d/80-kvm.rules
%endif
@@ -1715,9 +1705,7 @@ fi
%{_datadir}/%{name}/edk2-x86_64-code.fd
%{_datadir}/%{name}/edk2-x86_64-secure-code.fd
%{_datadir}/%{name}/kvmvapic.bin
-%{_datadir}/%{name}/linuxboot.bin
%{_datadir}/%{name}/linuxboot_dma.bin
-%{_datadir}/%{name}/multiboot.bin
%{_datadir}/%{name}/multiboot_dma.bin
%{_datadir}/%{name}/pvh.bin
%{_datadir}/%{name}/qboot.rom
@@ -1754,12 +1742,6 @@ fi
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/%{name}/block-curl.so
-%if %{with glusterfs}
-%files module-block-gluster
-%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/%{name}/block-gluster.so
-%endif
-
%if %{with iscsi}
%files module-block-iscsi
%defattr(644,root,root,755)
@@ -1800,6 +1782,11 @@ fi
%attr(755,root,root) %{_libdir}/%{name}/ui-sdl.so
%endif
+%files vnc
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/qemu-vnc
+%{_mandir}/man1/qemu-vnc.1*
+
%if %{with systemtap}
%files -n systemtap-qemu
%defattr(644,root,root,755)
diff --git a/libvfio-user-alloca.patch b/libvfio-user-alloca.patch
deleted file mode 100644
index 5b6931e..0000000
--- a/libvfio-user-alloca.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- qemu-7.2.10/subprojects/libvfio-user/samples/client.c.orig 2024-04-04 06:27:19.254657097 +0200
-+++ qemu-7.2.10/subprojects/libvfio-user/samples/client.c 2024-04-04 16:55:35.883734463 +0200
-@@ -310,7 +310,10 @@ get_device_region_info(int sock, uint32_
- size_t nr_fds = ARRAY_SIZE(fds);
-
-
-- region_info = alloca(size);
-+ region_info = malloc(size);
-+ if (region_info == NULL) {
-+ err(EXIT_FAILURE, "%m\n");
-+ }
- memset(region_info, 0, size);
- region_info->argsz = size;
- region_info->index = index;
-@@ -318,7 +321,11 @@ get_device_region_info(int sock, uint32_
- do_get_device_region_info(sock, region_info, NULL, 0);
- if (region_info->argsz > size) {
- size = region_info->argsz;
-- region_info = alloca(size);
-+ free(region_info);
-+ region_info = malloc(size);
-+ if (region_info == NULL) {
-+ err(EXIT_FAILURE, "%m\n");
-+ }
- memset(region_info, 0, size);
- region_info->argsz = size;
- region_info->index = index;
-@@ -344,6 +351,7 @@ get_device_region_info(int sock, uint32_
- }
- }
- }
-+ free(region_info);
- }
-
- static void
diff --git a/libvfio-user-types.patch b/libvfio-user-types.patch
deleted file mode 100644
index 98c2060..0000000
--- a/libvfio-user-types.patch
+++ /dev/null
@@ -1,516 +0,0 @@
---- qemu-7.2.10/subprojects/libvfio-user/lib/dma.c.orig 2024-03-04 17:26:53.000000000 +0100
-+++ qemu-7.2.10/subprojects/libvfio-user/lib/dma.c 2024-04-03 21:26:55.422317782 +0200
-@@ -249,7 +249,7 @@ dma_map_region(dma_controller_t *dma, dm
- region->info.vaddr = mmap_base + (region->offset - offset);
-
- vfu_log(dma->vfu_ctx, LOG_DEBUG, "mapped DMA region iova=[%p, %p) "
-- "vaddr=%p page_size=%#lx mapping=[%p, %p)",
-+ "vaddr=%p page_size=%#zx mapping=[%p, %p)",
- region->info.iova.iov_base, iov_end(®ion->info.iova),
- region->info.vaddr, region->info.page_size,
- region->info.mapping.iov_base, iov_end(®ion->info.mapping));
-@@ -300,8 +300,8 @@ MOCK_DEFINE(dma_controller_add_region)(d
-
- assert(dma != NULL);
-
-- snprintf(rstr, sizeof(rstr), "[%p, %p) fd=%d offset=%#lx prot=%#x",
-- dma_addr, (char *)dma_addr + size, fd, offset, prot);
-+ snprintf(rstr, sizeof(rstr), "[%p, %p) fd=%d offset=%#"PRIx64" prot=%#x",
-+ dma_addr, (char *)dma_addr + size, fd, (int64_t)offset, prot);
-
- if (size > dma->max_size) {
- vfu_log(dma->vfu_ctx, LOG_ERR, "DMA region size %zu > max %zu",
-@@ -317,7 +317,7 @@ MOCK_DEFINE(dma_controller_add_region)(d
- region->info.iova.iov_len == size) {
- if (offset != region->offset) {
- vfu_log(dma->vfu_ctx, LOG_ERR, "bad offset for new DMA region "
-- "%s; existing=%#lx", rstr, region->offset);
-+ "%s; existing=%#"PRIx64, rstr, (int64_t)(region->offset));
- return ERROR_INT(EINVAL);
- }
- if (!fds_are_same_file(region->fd, fd)) {
-@@ -573,7 +573,7 @@ dma_controller_dirty_page_get(dma_contro
- }
-
- if (pgsize != dma->dirty_pgsize) {
-- vfu_log(dma->vfu_ctx, LOG_ERR, "bad page size %ld", pgsize);
-+ vfu_log(dma->vfu_ctx, LOG_ERR, "bad page size %zu", pgsize);
- return ERROR_INT(EINVAL);
- }
-
-@@ -588,7 +588,7 @@ dma_controller_dirty_page_get(dma_contro
- * receive.
- */
- if (size != (size_t)bitmap_size) {
-- vfu_log(dma->vfu_ctx, LOG_ERR, "bad bitmap size %ld != %ld", size,
-+ vfu_log(dma->vfu_ctx, LOG_ERR, "bad bitmap size %zu != %zd", size,
- bitmap_size);
- return ERROR_INT(EINVAL);
- }
---- qemu-7.2.10/subprojects/libvfio-user/lib/libvfio-user.c.orig 2024-03-04 17:26:53.000000000 +0100
-+++ qemu-7.2.10/subprojects/libvfio-user/lib/libvfio-user.c 2024-04-03 22:01:11.697844648 +0200
-@@ -183,16 +183,16 @@ debug_region_access(vfu_ctx_t *vfu_ctx,
- case 2: val = *((uint16_t *)buf); break;
- case 1: val = *((uint8_t *)buf); break;
- default:
-- vfu_log(vfu_ctx, LOG_DEBUG, "region%zu: %s %zu bytes at %#lx",
-+ vfu_log(vfu_ctx, LOG_DEBUG, "region%zu: %s %zu bytes at %#"PRIx64,
- region, verb, count, offset);
- return;
- }
-
- if (is_write) {
-- vfu_log(vfu_ctx, LOG_DEBUG, "region%zu: wrote %#zx to (%#lx:%zu)",
-+ vfu_log(vfu_ctx, LOG_DEBUG, "region%zu: wrote %#"PRIx64" to (%#"PRIx64":%zu)",
- region, val, offset, count);
- } else {
-- vfu_log(vfu_ctx, LOG_DEBUG, "region%zu: read %#zx from (%#lx:%zu)",
-+ vfu_log(vfu_ctx, LOG_DEBUG, "region%zu: read %#"PRIx64" from (%#"PRIx64":%zu)",
- region, val, offset, count);
- }
- }
-@@ -235,7 +235,7 @@ region_access(vfu_ctx_t *vfu_ctx, size_t
-
- out:
- if (ret != (ssize_t)count) {
-- vfu_log(vfu_ctx, LOG_DEBUG, "region%zu: %s (%#lx:%zu) failed: %m",
-+ vfu_log(vfu_ctx, LOG_DEBUG, "region%zu: %s (%#"PRIx64":%zu) failed: %m",
- region, verb, offset, count);
- } else {
- debug_region_access(vfu_ctx, region, buf, count, offset, is_write);
-@@ -266,7 +266,7 @@ is_valid_region_access(vfu_ctx_t *vfu_ct
-
- if (cmd == VFIO_USER_REGION_WRITE && size - sizeof(*ra) != ra->count) {
- vfu_log(vfu_ctx, LOG_ERR, "region write count too small: "
-- "expected %lu, got %u", size - sizeof(*ra), ra->count);
-+ "expected %zu, got %u", size - sizeof(*ra), ra->count);
- return false;
- }
-
-@@ -278,7 +278,7 @@ is_valid_region_access(vfu_ctx_t *vfu_ct
- }
-
- if (satadd_u64(ra->offset, ra->count) > vfu_ctx->reg_info[index].size) {
-- vfu_log(vfu_ctx, LOG_ERR, "out of bounds region access %#lx-%#lx "
-+ vfu_log(vfu_ctx, LOG_ERR, "out of bounds region access %#"PRIx64"-%"PRIx64" "
- "(size %u)", ra->offset, ra->offset + ra->count,
- vfu_ctx->reg_info[index].size);
-
-@@ -337,7 +337,7 @@ handle_region_access(vfu_ctx_t *vfu_ctx,
-
- ret = region_access(vfu_ctx, in_ra->region, buf, in_ra->count,
- in_ra->offset, msg->hdr.cmd == VFIO_USER_REGION_WRITE);
-- if (ret != in_ra->count) {
-+ if ((unsigned long)ret != (unsigned long)(in_ra->count)) {
- /* FIXME we should return whatever has been accessed, not an error */
- if (ret >= 0) {
- ret = ERROR_INT(EINVAL);
-@@ -671,7 +671,7 @@ handle_dma_map(vfu_ctx_t *vfu_ctx, vfu_m
- return ERROR_INT(EINVAL);
- }
-
-- snprintf(rstr, sizeof(rstr), "[%#lx, %#lx) offset=%#lx flags=%#x",
-+ snprintf(rstr, sizeof(rstr), "[%#"PRIx64", %#"PRIx64") offset=%#"PRIx64" flags=%#x",
- dma_map->addr, dma_map->addr + dma_map->size, dma_map->offset,
- dma_map->flags);
-
-@@ -700,7 +700,7 @@ handle_dma_map(vfu_ctx_t *vfu_ctx, vfu_m
- }
- }
-
-- ret = dma_controller_add_region(vfu_ctx->dma, (void *)dma_map->addr,
-+ ret = dma_controller_add_region(vfu_ctx->dma, (void *)(uintptr_t)dma_map->addr,
- dma_map->size, fd, dma_map->offset,
- prot);
- if (ret < 0) {
-@@ -747,7 +747,7 @@ is_valid_unmap(vfu_ctx_t *vfu_ctx, vfu_m
-
- case VFIO_DMA_UNMAP_FLAG_ALL:
- if (dma_unmap->addr || dma_unmap->size) {
-- vfu_log(vfu_ctx, LOG_ERR, "bad addr=%#lx or size=%#lx, expected "
-+ vfu_log(vfu_ctx, LOG_ERR, "bad addr=%#"PRIx64" or size=%#"PRIx64", expected "
- "both to be zero", dma_unmap->addr, dma_unmap->size);
- errno = EINVAL;
- return false;
-@@ -791,7 +791,7 @@ handle_dma_unmap(vfu_ctx_t *vfu_ctx, vfu
- return -1;
- }
-
-- snprintf(rstr, sizeof(rstr), "[%#lx, %#lx) flags=%#x",
-+ snprintf(rstr, sizeof(rstr), "[%#"PRIx64", %#"PRIx64") flags=%#x",
- dma_unmap->addr, dma_unmap->addr + dma_unmap->size, dma_unmap->flags);
-
- vfu_log(vfu_ctx, LOG_DEBUG, "removing DMA region %s", rstr);
-@@ -817,7 +817,7 @@ handle_dma_unmap(vfu_ctx_t *vfu_ctx, vfu
- if (dma_unmap->flags & VFIO_DMA_UNMAP_FLAG_GET_DIRTY_BITMAP) {
- memcpy(msg->out.iov.iov_base + sizeof(*dma_unmap), dma_unmap->bitmap, sizeof(*dma_unmap->bitmap));
- ret = dma_controller_dirty_page_get(vfu_ctx->dma,
-- (vfu_dma_addr_t)dma_unmap->addr,
-+ (vfu_dma_addr_t)(uintptr_t)dma_unmap->addr,
- dma_unmap->size,
- dma_unmap->bitmap->pgsize,
- dma_unmap->bitmap->size,
-@@ -829,7 +829,7 @@ handle_dma_unmap(vfu_ctx_t *vfu_ctx, vfu
- }
-
- ret = dma_controller_remove_region(vfu_ctx->dma,
-- (void *)dma_unmap->addr,
-+ (void *)(uintptr_t)dma_unmap->addr,
- dma_unmap->size,
- vfu_ctx->dma_unregister,
- vfu_ctx);
-@@ -924,7 +924,7 @@ handle_dirty_pages_get(vfu_ctx_t *vfu_ct
- range_out = msg->out.iov.iov_base + sizeof(*dirty_pages_out);
- memcpy(range_out, range_in, sizeof(*range_out));
- ret = dma_controller_dirty_page_get(vfu_ctx->dma,
-- (vfu_dma_addr_t)range_in->iova,
-+ (vfu_dma_addr_t)(uintptr_t)range_in->iova,
- range_in->size,
- range_in->bitmap.pgsize,
- range_in->bitmap.size, bitmap_out);
-@@ -939,7 +939,7 @@ handle_dirty_pages_get(vfu_ctx_t *vfu_ct
- }
- } else {
- vfu_log(vfu_ctx, LOG_ERR,
-- "dirty pages: get [%#lx, %#lx): buffer too small (%u < %lu)",
-+ "dirty pages: get [%#"PRIx64", %#"PRIx64"): buffer too small (%u < %zu)",
- range_in->iova, range_in->iova + range_in->size,
- dirty_pages_in->argsz, argsz);
- }
-@@ -2124,7 +2124,7 @@ vfu_dma_transfer(vfu_ctx_t *vfu_ctx, enu
- while (remaining > 0) {
- int ret;
-
-- dma_req->addr = (uint64_t)sg->dma_addr + count;
-+ dma_req->addr = (uint64_t)(uintptr_t)sg->dma_addr + count;
- dma_req->count = MIN(remaining, vfu_ctx->client_max_data_xfer_size);
-
- if (cmd == VFIO_USER_DMA_WRITE) {
-@@ -2154,7 +2154,7 @@ vfu_dma_transfer(vfu_ctx_t *vfu_ctx, enu
- if (dma_reply->addr != dma_req->addr ||
- dma_reply->count != dma_req->count) {
- vfu_log(vfu_ctx, LOG_ERR, "bad reply to DMA transfer: "
-- "request:%#lx,%lu reply:%#lx,%lu",
-+ "request:%#"PRIx64",%"PRIu64" reply:%#"PRIx64",%"PRIu64,
- dma_req->addr, dma_req->count,
- dma_reply->addr, dma_reply->count);
- free(rbuf);
---- qemu-7.2.10/subprojects/libvfio-user/lib/migration.c.orig 2024-03-04 17:26:53.000000000 +0100
-+++ qemu-7.2.10/subprojects/libvfio-user/lib/migration.c 2024-04-03 22:17:23.329247535 +0200
-@@ -413,7 +413,7 @@ MOCK_DEFINE(migration_region_access_regi
- case offsetof(struct vfio_user_migration_info, device_state):
- if (count != sizeof(migr->info.device_state)) {
- vfu_log(vfu_ctx, LOG_ERR,
-- "bad device_state access size %ld", count);
-+ "bad device_state access size %zd", count);
- return ERROR_INT(EINVAL);
- }
- device_state = (uint32_t *)buf;
-@@ -443,7 +443,7 @@ MOCK_DEFINE(migration_region_access_regi
- case offsetof(struct vfio_user_migration_info, pending_bytes):
- if (count != sizeof(migr->info.pending_bytes)) {
- vfu_log(vfu_ctx, LOG_ERR,
-- "bad pending_bytes access size %ld", count);
-+ "bad pending_bytes access size %zd", count);
- return ERROR_INT(EINVAL);
- }
- ret = handle_pending_bytes(vfu_ctx, migr, (uint64_t *)buf, is_write);
-@@ -451,7 +451,7 @@ MOCK_DEFINE(migration_region_access_regi
- case offsetof(struct vfio_user_migration_info, data_offset):
- if (count != sizeof(migr->info.data_offset)) {
- vfu_log(vfu_ctx, LOG_ERR,
-- "bad data_offset access size %ld", count);
-+ "bad data_offset access size %zd", count);
- return ERROR_INT(EINVAL);
- }
- ret = handle_data_offset(vfu_ctx, migr, (uint64_t *)buf, is_write);
-@@ -459,14 +459,14 @@ MOCK_DEFINE(migration_region_access_regi
- case offsetof(struct vfio_user_migration_info, data_size):
- if (count != sizeof(migr->info.data_size)) {
- vfu_log(vfu_ctx, LOG_ERR,
-- "bad data_size access size %ld", count);
-+ "bad data_size access size %zd", count);
- return ERROR_INT(EINVAL);
- }
- ret = handle_data_size(vfu_ctx, migr, (uint64_t *)buf, is_write);
- break;
- default:
-- vfu_log(vfu_ctx, LOG_ERR, "bad migration region register offset %#lx",
-- pos);
-+ vfu_log(vfu_ctx, LOG_ERR, "bad migration region register offset %#"PRIx64,
-+ (int64_t)pos);
- return ERROR_INT(EINVAL);
- }
- return ret;
-@@ -502,8 +502,8 @@ migration_region_access(vfu_ctx_t *vfu_c
- * any access to the data region properly.
- */
- vfu_log(vfu_ctx, LOG_WARNING,
-- "bad access to dead space %#lx-%#lx in migration region",
-- pos, pos + count - 1);
-+ "bad access to dead space %#"PRIx64"-%#"PRIx64" in migration region",
-+ (int64_t)pos, (int64_t)(pos + count - 1));
- return ERROR_INT(EINVAL);
- }
-
---- qemu-7.2.10/subprojects/libvfio-user/lib/pci.c.orig 2024-03-04 17:26:53.000000000 +0100
-+++ qemu-7.2.10/subprojects/libvfio-user/lib/pci.c 2024-04-03 22:39:07.265516839 +0200
-@@ -264,8 +264,8 @@ pci_hdr_write(vfu_ctx_t *vfu_ctx, const
- ret = handle_erom_write(vfu_ctx, cfg_space, buf);
- break;
- default:
-- vfu_log(vfu_ctx, LOG_ERR, "PCI config write %#lx not handled",
-- offset);
-+ vfu_log(vfu_ctx, LOG_ERR, "PCI config write %#"PRIx64" not handled",
-+ (int64_t)offset);
- ret = ERROR_INT(EINVAL);
- }
-
-@@ -315,7 +315,7 @@ pci_nonstd_access(vfu_ctx_t *vfu_ctx, ch
-
- if (is_write) {
- vfu_log(vfu_ctx, LOG_ERR, "no callback for write to config space "
-- "offset %lu size %zu", offset, count);
-+ "offset %"PRId64" size %zu", (int64_t)offset, count);
- return ERROR_INT(EINVAL);
- }
-
-@@ -429,8 +429,8 @@ pci_config_space_access(vfu_ctx_t *vfu_c
- size = pci_config_space_next_segment(vfu_ctx, count, offset, is_write,
- &cb);
- if (cb == NULL) {
-- vfu_log(vfu_ctx, LOG_ERR, "bad write to PCI config space %#lx-%#lx",
-- offset, offset + count - 1);
-+ vfu_log(vfu_ctx, LOG_ERR, "bad write to PCI config space %#"PRIx64"-%#"PRIx64,
-+ (int64_t)offset, (int64_t)(offset + count - 1));
- return size;
- }
-
---- qemu-7.2.10/subprojects/libvfio-user/lib/pci_caps.c.orig 2024-03-04 17:26:53.000000000 +0100
-+++ qemu-7.2.10/subprojects/libvfio-user/lib/pci_caps.c 2024-04-03 22:41:43.031339650 +0200
-@@ -483,7 +483,7 @@ cap_place(vfu_ctx_t *vfu_ctx, struct pci
-
- if (cap->off != 0) {
- if (cap->off < PCI_STD_HEADER_SIZEOF) {
-- vfu_log(vfu_ctx, LOG_ERR, "invalid offset %#lx for capability "
-+ vfu_log(vfu_ctx, LOG_ERR, "invalid offset %#zx for capability "
- "%u (%s)", cap->off, cap->id, cap->name);
- return ERROR_INT(EINVAL);
- }
-@@ -516,7 +516,7 @@ cap_place(vfu_ctx_t *vfu_ctx, struct pci
-
- if (cap->off + cap->size > pci_config_space_size(vfu_ctx)) {
- vfu_log(vfu_ctx, LOG_ERR, "no config space left for capability "
-- "%u (%s) of size %zu bytes at offset %#lx", cap->id,
-+ "%u (%s) of size %zu bytes at offset %#zx", cap->id,
- cap->name, cap->size, cap->off);
- return ERROR_INT(ENOSPC);
- }
-@@ -547,7 +547,7 @@ ext_cap_place(vfu_ctx_t *vfu_ctx, struct
-
- if (cap->off != 0) {
- if (cap->off < PCI_CFG_SPACE_SIZE) {
-- vfu_log(vfu_ctx, LOG_ERR, "invalid offset %#lx for capability "
-+ vfu_log(vfu_ctx, LOG_ERR, "invalid offset %#zx for capability "
- "%u (%s)", cap->off, cap->id, cap->name);
- return ERROR_INT(EINVAL);
- }
-@@ -581,7 +581,7 @@ ext_cap_place(vfu_ctx_t *vfu_ctx, struct
-
- if (cap->off + cap->size > pci_config_space_size(vfu_ctx)) {
- vfu_log(vfu_ctx, LOG_ERR, "no config space left for capability "
-- "%u (%s) of size %zu bytes at offset %#lx", cap->id,
-+ "%u (%s) of size %zu bytes at offset %#zx", cap->id,
- cap->name, cap->size, cap->off);
- return ERROR_INT(ENOSPC);
- }
-@@ -700,7 +700,7 @@ vfu_pci_add_capability(vfu_ctx_t *vfu_ct
-
- if (cap.off + cap.size >= pci_config_space_size(vfu_ctx)) {
- vfu_log(vfu_ctx, LOG_DEBUG,
-- "PCI capability past end of config space, %#lx >= %#lx",
-+ "PCI capability past end of config space, %#zx >= %#zx",
- cap.off + cap.size, pci_config_space_size(vfu_ctx));
- return ERROR_INT(EINVAL);
- }
---- qemu-7.2.10/subprojects/libvfio-user/lib/tran.c.orig 2024-03-04 17:26:53.000000000 +0100
-+++ qemu-7.2.10/subprojects/libvfio-user/lib/tran.c 2024-04-03 22:42:30.844413958 +0200
-@@ -176,7 +176,7 @@ recv_version(vfu_ctx_t *vfu_ctx, uint16_
-
- if (msg.in.iov.iov_len < sizeof(*cversion)) {
- vfu_log(vfu_ctx, LOG_ERR,
-- "msg%#hx: VFIO_USER_VERSION: invalid size %lu",
-+ "msg%#hx: VFIO_USER_VERSION: invalid size %zu",
- *msg_idp, msg.in.iov.iov_len);
- ret = EINVAL;
- goto out;
---- qemu-7.2.10/subprojects/libvfio-user/samples/client.c.orig 2024-03-04 17:26:53.000000000 +0100
-+++ qemu-7.2.10/subprojects/libvfio-user/samples/client.c 2024-04-04 06:27:19.254657097 +0200
-@@ -110,7 +110,7 @@ send_version(int sock)
- "\"max_msg_fds\":%u,"
- "\"max_data_xfer_size\":%u,"
- "\"migration\":{"
-- "\"pgsize\":%zu"
-+ "\"pgsize\":%lu"
- "}"
- "}"
- "}", CLIENT_MAX_FDS, CLIENT_MAX_DATA_XFER_SIZE, sysconf(_SC_PAGESIZE));
-@@ -155,7 +155,7 @@ recv_version(int sock, int *server_max_f
- }
-
- if (vlen < sizeof(*sversion)) {
-- errx(EXIT_FAILURE, "VFIO_USER_VERSION: invalid size %lu", vlen);
-+ errx(EXIT_FAILURE, "VFIO_USER_VERSION: invalid size %zu", vlen);
- }
-
- if (sversion->major != LIB_VFIO_USER_MAJOR) {
-@@ -290,7 +290,7 @@ mmap_sparse_areas(int *fds, struct vfio_
- sparse->areas[i].offset);
- if (addr == MAP_FAILED) {
- err(EXIT_FAILURE,
-- "failed to mmap sparse region #%lu in %s (%#llx-%#llx)",
-+ "failed to mmap sparse region #%zu in %s (%#llx-%#llx)",
- i, buf, sparse->areas[i].offset,
- sparse->areas[i].offset + sparse->areas[i].size - 1);
- }
-@@ -330,7 +330,7 @@ get_device_region_info(int sock, uint32_
-
- cap_sz = region_info->argsz - sizeof(struct vfio_region_info);
- printf("client: %s: region_info[%d] offset %#llx flags %#x size %llu "
-- "cap_sz %lu #FDs %lu\n", __func__, index, region_info->offset,
-+ "cap_sz %zu #FDs %zu\n", __func__, index, region_info->offset,
- region_info->flags, region_info->size, cap_sz, nr_fds);
- if (cap_sz) {
- struct vfio_region_info_cap_sparse_mmap *sparse = NULL;
-@@ -487,14 +487,14 @@ access_region(int sock, int region, bool
- recv_data, recv_data_len, NULL, 0);
- pthread_mutex_unlock(&mutex);
- if (ret != 0) {
-- warn("failed to %s region %d %#lx-%#lx",
-+ warn("failed to %s region %d %#"PRIx64"-%#"PRIx64,
- is_write ? "write to" : "read from", region, offset,
- offset + data_len - 1);
- free(recv_data);
- return ret;
- }
- if (recv_data->count != data_len) {
-- warnx("bad %s data count, expected=%lu, actual=%d",
-+ warnx("bad %s data count, expected=%zu, actual=%d",
- is_write ? "write" : "read", data_len,
- recv_data->count);
- free(recv_data);
-@@ -585,8 +585,8 @@ handle_dma_write(int sock, struct vfio_u
- c = pwrite(dma_region_fds[i], data, dma_access.count, offset);
-
- if (c != (ssize_t)dma_access.count) {
-- err(EXIT_FAILURE, "failed to write to fd=%d at [%#lx-%#lx)",
-- dma_region_fds[i], offset, offset + dma_access.count);
-+ err(EXIT_FAILURE, "failed to write to fd=%d at [%#"PRIx64"-%#"PRIx64")",
-+ dma_region_fds[i], (int64_t)offset, (int64_t)(offset + dma_access.count));
- }
- break;
- }
-@@ -640,8 +640,8 @@ handle_dma_read(int sock, struct vfio_us
- c = pread(dma_region_fds[i], data, dma_access.count, offset);
-
- if (c != (ssize_t)dma_access.count) {
-- err(EXIT_FAILURE, "failed to read from fd=%d at [%#lx-%#lx)",
-- dma_region_fds[i], offset, offset + dma_access.count);
-+ err(EXIT_FAILURE, "failed to read from fd=%d at [%#"PRIx64"-%#"PRIx64")",
-+ dma_region_fds[i], (int64_t)offset, (int64_t)(offset + dma_access.count));
- }
- break;
- }
-@@ -706,7 +706,7 @@ get_dirty_bitmap(int sock, struct vfio_u
- err(EXIT_FAILURE, "failed to get dirty page bitmap");
- }
-
-- printf("client: %s: %#lx-%#lx\t%#x\n", __func__, range->iova,
-+ printf("client: %s: %#"PRIx64"-%#"PRIx64"\t%#x\n", __func__, range->iova,
- range->iova + range->size - 1, bitmap[0]);
-
- free(data);
-@@ -900,7 +900,7 @@ migrate_from(int sock, size_t *nr_iters,
- _nr_iters += do_migrate(sock, 1, (*migr_iters) + _nr_iters);
- if (_nr_iters != 2) {
- errx(EXIT_FAILURE,
-- "expected 2 iterations instead of %ld while in stop-and-copy state",
-+ "expected 2 iterations instead of %zd while in stop-and-copy state",
- _nr_iters);
- }
-
-@@ -1000,7 +1000,7 @@ migrate_to(char *old_sock_path, int *ser
- * TODO write half of migration data via regular write and other half via
- * memopy map.
- */
-- printf("client: writing migration device data %#lx-%#lx\n",
-+ printf("client: writing migration device data %#"PRIx64"-%#"PRIx64"\n",
- data_offset, data_offset + migr_iters[i].iov_len - 1);
- ret = access_region(sock, VFU_PCI_DEV_MIGR_REGION_IDX, true,
- data_offset, migr_iters[i].iov_base,
---- qemu-7.2.10/subprojects/libvfio-user/samples/server.c.orig 2024-03-04 17:26:53.000000000 +0100
-+++ qemu-7.2.10/subprojects/libvfio-user/samples/server.c 2024-04-04 16:58:57.346435682 +0200
-@@ -93,8 +93,8 @@ bar0_access(vfu_ctx_t *vfu_ctx, char * c
- struct server_data *server_data = vfu_get_private(vfu_ctx);
-
- if (count != sizeof(time_t) || offset != 0) {
-- vfu_log(vfu_ctx, LOG_ERR, "bad BAR0 access %#lx-%#lx",
-- offset, offset + count - 1);
-+ vfu_log(vfu_ctx, LOG_ERR, "bad BAR0 access %#"PRIx64"-%#"PRIx64,
-+ (int64_t)offset, (int64_t)(offset + count - 1));
- errno = EINVAL;
- return -1;
- }
-@@ -123,8 +123,8 @@ bar1_access(vfu_ctx_t *vfu_ctx, char * c
- struct server_data *server_data = vfu_get_private(vfu_ctx);
-
- if (offset + count > server_data->bar1_size) {
-- vfu_log(vfu_ctx, LOG_ERR, "bad BAR1 access %#lx-%#lx",
-- offset, offset + count - 1);
-+ vfu_log(vfu_ctx, LOG_ERR, "bad BAR1 access %#"PRIx64"-%#"PRIx64,
-+ (int64_t)offset, (int64_t)(offset + count - 1));
- errno = EINVAL;
- return -1;
- }
-@@ -353,7 +353,7 @@ migration_write_data(vfu_ctx_t *vfu_ctx,
- assert(data != NULL);
-
- if (offset != 0 || size < server_data->bar1_size) {
-- vfu_log(vfu_ctx, LOG_DEBUG, "XXX bad migration data write %#lx-%#lx",
-+ vfu_log(vfu_ctx, LOG_DEBUG, "XXX bad migration data write %#"PRIx64"-%#"PRIx64,
- offset, offset + size - 1);
- errno = EINVAL;
- return -1;
---- qemu-7.2.10/subprojects/libvfio-user/test/unit-tests.c.orig 2024-03-04 17:26:53.000000000 +0100
-+++ qemu-7.2.10/subprojects/libvfio-user/test/unit-tests.c 2024-04-04 16:59:18.846711984 +0200
-@@ -161,8 +161,8 @@ static int
- check_dma_info(const LargestIntegralType value,
- const LargestIntegralType cvalue)
- {
-- vfu_dma_info_t *info = (vfu_dma_info_t *)value;
-- vfu_dma_info_t *cinfo = (vfu_dma_info_t *)cvalue;
-+ vfu_dma_info_t *info = (vfu_dma_info_t *)(uintptr_t)value;
-+ vfu_dma_info_t *cinfo = (vfu_dma_info_t *)(uintptr_t)cvalue;
-
- return info->iova.iov_base == cinfo->iova.iov_base &&
- info->iova.iov_len == cinfo->iova.iov_len &&
-@@ -330,7 +330,7 @@ test_dma_addr_to_sgl(void **state UNUSED
- assert_int_equal(1, ret);
- assert_int_equal(r->info.iova.iov_base, sg[0].dma_addr);
- assert_int_equal(0, sg[0].region);
-- assert_int_equal(0x2000 - (unsigned long long)r->info.iova.iov_base,
-+ assert_int_equal(0x2000 - (unsigned long long)(uintptr_t)r->info.iova.iov_base,
- sg[0].offset);
- assert_int_equal(0x400, sg[0].length);
- assert_true(vfu_sg_is_mappable(&vfu_ctx, &sg[0]));
---- qemu-7.2.10/subprojects/libvfio-user/lib/tran_pipe.c.orig 2024-03-04 17:26:53.000000000 +0100
-+++ qemu-7.2.10/subprojects/libvfio-user/lib/tran_pipe.c 2024-04-04 17:01:32.872219201 +0200
-@@ -83,7 +83,7 @@ tran_pipe_send_iovec(int fd, uint16_t ms
- return ERROR_INT(ECONNRESET);
- }
- return -1;
-- } else if (ret < hdr.msg_size) {
-+ } else if ((uint32_t)ret < hdr.msg_size) {
- return ERROR_INT(ECONNRESET);
- }
-
diff --git a/qemu-u2f-emu.patch b/qemu-u2f-emu.patch
deleted file mode 100644
index 3f74ad8..0000000
--- a/qemu-u2f-emu.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- qemu-6.2.0/hw/usb/u2f-emulated.c.orig 2021-12-14 21:42:02.000000000 +0100
-+++ qemu-6.2.0/hw/usb/u2f-emulated.c 2022-06-23 06:03:41.512678723 +0200
-@@ -31,7 +31,7 @@
- #include "hw/usb.h"
- #include "hw/qdev-properties.h"
-
--#include <u2f-emu/u2f-emu.h>
-+#include <u2f-emu.h>
-
- #include "u2f.h"
-
diff --git a/qemu-user-execve.patch b/qemu-user-execve.patch
index 56133f3..0dc276a 100644
--- a/qemu-user-execve.patch
+++ b/qemu-user-execve.patch
@@ -45,11 +45,9 @@ Reviewed-by: Laurent Vivier <laurent at vivier.eu>
v3 changes:
- rebase the patchset against current code
-diff --git a/linux-user/main.c b/linux-user/main.c
-index ee12035..5951279 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
-@@ -123,6 +123,7 @@ static void usage(int exitcode);
+@@ -126,6 +126,7 @@
static const char *interp_prefix = CONFIG_QEMU_INTERP_PREFIX;
const char *qemu_uname_release;
@@ -57,7 +55,7 @@ index ee12035..5951279 100644
#if !defined(TARGET_DEFAULT_STACK_SIZE)
/* XXX: on x86 MAP_GROWSDOWN only works if ESP <= address + 32, so
-@@ -362,6 +363,11 @@ static void handle_arg_guest_base(const
+@@ -367,6 +368,11 @@
have_guest_base = true;
}
@@ -69,7 +67,7 @@ index ee12035..5951279 100644
static void handle_arg_reserved_va(const char *arg)
{
char *p;
-@@ -464,6 +470,8 @@ static const struct qemu_argument arg_ta
+@@ -497,6 +503,8 @@
"uname", "set qemu uname release string to 'uname'"},
{"B", "QEMU_GUEST_BASE", true, handle_arg_guest_base,
"address", "set guest_base address to 'address'"},
@@ -78,19 +76,19 @@ index ee12035..5951279 100644
{"R", "QEMU_RESERVED_VA", true, handle_arg_reserved_va,
"size", "reserve 'size' bytes for guest virtual address space"},
{"t", "QEMU_RTSIG_MAP", true, handle_arg_rtsig_map,
---- qemu-6.2.0/linux-user/user-internals.h.orig
-+++ qemu-6.2.0/linux-user/user-internals.h
-@@ -28,6 +28,7 @@ void init_task_state(TaskState *ts);
+--- a/linux-user/user-internals.h
++++ b/linux-user/user-internals.h
+@@ -30,6 +30,7 @@
void task_settid(TaskState *);
void stop_all_tasks(void);
extern const char *qemu_uname_release;
+extern const char *qemu_execve_path;
- extern unsigned long mmap_min_addr;
typedef struct IOCTLEntry IOCTLEntry;
---- qemu-8.1.5/linux-user/syscall.c.orig 2024-01-29 19:31:43.000000000 +0100
-+++ qemu-8.1.5/linux-user/syscall.c 2024-05-06 19:05:26.075673131 +0200
-@@ -8680,6 +8680,109 @@ ssize_t do_guest_readlink(const char *pa
+
+--- a/linux-user/syscall.c
++++ b/linux-user/syscall.c
+@@ -9021,6 +9021,109 @@
return ret;
}
@@ -200,9 +198,9 @@ index ee12035..5951279 100644
static int do_execv(CPUArchState *cpu_env, int dirfd,
abi_long pathname, abi_long guest_argp,
abi_long guest_envp, int flags, bool is_execveat)
-@@ -8765,9 +8868,12 @@ static int do_execv(CPUArchState *cpu_en
+@@ -9106,9 +9209,12 @@
if (is_proc_myself(p, "exe")) {
- exe = exec_path;
+ exe = real_exec_path;
}
- ret = is_execveat
- ? safe_execveat(dirfd, exe, argp, envp, flags)
diff --git a/qemu-vnc-install.patch b/qemu-vnc-install.patch
new file mode 100644
index 0000000..17ae7a7
--- /dev/null
+++ b/qemu-vnc-install.patch
@@ -0,0 +1,13 @@
+# upstream builds qemu-vnc but never installs it (only the man page)
+--- a/tools/qemu-vnc/meson.build
++++ b/tools/qemu-vnc/meson.build
+@@ -15,7 +15,8 @@
+ 'audio.c', 'chardev.c', 'clipboard.c', 'console.c',
+ 'dbus.c', 'stubs.c', 'utils.c',
+ vnca.sources(), dbus_display1, qemu_vnc1],
+- dependencies: [vnca.dependencies(), io, crypto, qemuutil, gio, ui])
++ dependencies: [vnca.dependencies(), io, crypto, qemuutil, gio, ui],
++ install: true)
+
+ # The executable lives in a subdirectory of the build tree, but
+ # get_relocated_path() looks for qemu-bundle relative to the binary.
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/qemu.git/commitdiff/80992f2cd5f685ae7d4fe9b6133855b75be49139
More information about the pld-cvs-commit
mailing list