From 8d2563a60d3f86a79390f0d1eb3085a372e02d0f Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Nov 05 2024 15:55:33 +0000 Subject: [PATCH 1/12] Fix spice audio regression with qemu 9.1.1 Signed-off-by: Cole Robinson --- diff --git a/0001-hw-audio-hda-avoid-unnecessary-re-open-stream-on-rec.patch b/0001-hw-audio-hda-avoid-unnecessary-re-open-stream-on-rec.patch new file mode 100644 index 0000000..19976b7 --- /dev/null +++ b/0001-hw-audio-hda-avoid-unnecessary-re-open-stream-on-rec.patch @@ -0,0 +1,50 @@ +From c867f21d7f49830e9243ef5bff35e45face18a49 Mon Sep 17 00:00:00 2001 +Message-ID: +From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= +Date: Tue, 5 Nov 2024 12:32:03 +0400 +Subject: [PATCH] hw/audio/hda: avoid unnecessary re-open stream on + reconfiguration +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Content-type: text/plain + +Closing and opening a stream too quickly during reconfiguration create +issues with Spice. + +Note: the issue with Spice has been there before and still is. When the +audio stream is recreated, for example when using +`out.mixing-engine=false`. + +Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2639 +Fixes: 6d6e23361f ("hw/audio/hda: fix memory leak on audio setup") +Signed-off-by: Marc-André Lureau +Signed-off-by: Cole Robinson +--- + hw/audio/hda-codec.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c +index 4373565371..b3075b5d44 100644 +--- a/hw/audio/hda-codec.c ++++ b/hw/audio/hda-codec.c +@@ -502,7 +502,15 @@ static void hda_audio_setup(HDAAudioStream *st) + trace_hda_audio_format(st->node->name, st->as.nchannels, + fmt2name[st->as.fmt], st->as.freq); + +- hda_close_stream(st->state, st); ++ /* ++ * Do not hda_close_stream(st->state, st), AUD_open_() handles the logic for ++ * fixed_settings, and same format. This helps prevent race issues in Spice ++ * server & client code too. (see #2639) ++ */ ++ if (use_timer) { ++ timer_free(st->buft); ++ st->buft = NULL; ++ } + if (st->output) { + if (use_timer) { + cb = hda_audio_output_cb; +-- +2.46.2 + diff --git a/qemu.spec b/qemu.spec index fbf14d1..0573cc3 100644 --- a/qemu.spec +++ b/qemu.spec @@ -367,7 +367,7 @@ Obsoletes: sgabios-bin <= 1:0.20180715git-10.fc38 %endif # To prevent rpmdev-bumpspec breakage -%global baserelease 1 +%global baserelease 2 Summary: QEMU is a FAST! processor emulator Name: qemu @@ -429,6 +429,11 @@ Patch: 0001-linux-user-add-openat2-support-in-linux-user.patch # removed (after v9.1.0) Patch: 0001-linux-user-guard-openat2-with-if-defined-TARGET_NR_o.patch +# Fix spice audio with qemu 9.1.1 +# https://lists.gnu.org/archive/html/qemu-devel/2024-11/msg00906.html +# https://gitlab.com/qemu-project/qemu/-/issues/2639 +Patch: 0001-hw-audio-hda-avoid-unnecessary-re-open-stream-on-rec.patch + BuildRequires: gnupg2 BuildRequires: meson >= %{meson_version} BuildRequires: bison @@ -3174,6 +3179,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Tue Nov 05 2024 Cole Robinson - 9.1.1-2 +- Fix spice audio regression with qemu 9.1.1 + * Thu Oct 24 2024 Cole Robinson - 9.1.1-1 - Rebase to qemu 9.1.1 stable From 76e732d877ad2807c21030347bb2f3603f4a28bf Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Nov 25 2024 16:40:45 +0000 Subject: [PATCH 2/12] Update to 9.2.0-rc1 - Remove deprecated -cris support - Remove deprecated virtfs-proxy-helper - Add --enable-qatzip - Add --enable-libcbor - `--enable-rust` not addressed yet Signed-off-by: Cole Robinson --- diff --git a/0001-hw-audio-hda-avoid-unnecessary-re-open-stream-on-rec.patch b/0001-hw-audio-hda-avoid-unnecessary-re-open-stream-on-rec.patch deleted file mode 100644 index 19976b7..0000000 --- a/0001-hw-audio-hda-avoid-unnecessary-re-open-stream-on-rec.patch +++ /dev/null @@ -1,50 +0,0 @@ -From c867f21d7f49830e9243ef5bff35e45face18a49 Mon Sep 17 00:00:00 2001 -Message-ID: -From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= -Date: Tue, 5 Nov 2024 12:32:03 +0400 -Subject: [PATCH] hw/audio/hda: avoid unnecessary re-open stream on - reconfiguration -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit -Content-type: text/plain - -Closing and opening a stream too quickly during reconfiguration create -issues with Spice. - -Note: the issue with Spice has been there before and still is. When the -audio stream is recreated, for example when using -`out.mixing-engine=false`. - -Fixes: https://gitlab.com/qemu-project/qemu/-/issues/2639 -Fixes: 6d6e23361f ("hw/audio/hda: fix memory leak on audio setup") -Signed-off-by: Marc-André Lureau -Signed-off-by: Cole Robinson ---- - hw/audio/hda-codec.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/hw/audio/hda-codec.c b/hw/audio/hda-codec.c -index 4373565371..b3075b5d44 100644 ---- a/hw/audio/hda-codec.c -+++ b/hw/audio/hda-codec.c -@@ -502,7 +502,15 @@ static void hda_audio_setup(HDAAudioStream *st) - trace_hda_audio_format(st->node->name, st->as.nchannels, - fmt2name[st->as.fmt], st->as.freq); - -- hda_close_stream(st->state, st); -+ /* -+ * Do not hda_close_stream(st->state, st), AUD_open_() handles the logic for -+ * fixed_settings, and same format. This helps prevent race issues in Spice -+ * server & client code too. (see #2639) -+ */ -+ if (use_timer) { -+ timer_free(st->buft); -+ st->buft = NULL; -+ } - if (st->output) { - if (use_timer) { - cb = hda_audio_output_cb; --- -2.46.2 - diff --git a/0001-linux-user-add-openat2-support-in-linux-user.patch b/0001-linux-user-add-openat2-support-in-linux-user.patch deleted file mode 100644 index ea4760a..0000000 --- a/0001-linux-user-add-openat2-support-in-linux-user.patch +++ /dev/null @@ -1,228 +0,0 @@ -From 9651cead2f1bb34b9b72f9c2c5dc81baea2b082e Mon Sep 17 00:00:00 2001 -From: Michael Vogt -Date: Tue, 1 Oct 2024 17:14:53 +0200 -Subject: [PATCH] linux-user: add openat2 support in linux-user - -This commit adds support for the `openat2()` syscall in the -`linux-user` userspace emulator. - -It is implemented by extracting a new helper `maybe_do_fake_open()` -out of the exiting `do_guest_openat()` and share that with the -new `do_guest_openat2()`. Unfortunately we cannot just make -do_guest_openat2() a superset of do_guest_openat() because the -openat2() syscall is stricter with the argument checking and -will return an error for invalid flags or mode combinations (which -open()/openat() will ignore). - -The implementation is similar to SYSCALL_DEFINE(openat2), i.e. -a new `copy_struct_from_user()` is used that works the same -as the kernels version to support backwards-compatibility -for struct syscall argument. - -Instead of including openat2.h we create a copy of `open_how` -as `open_how_ver0` to ensure that if the structure grows we -can log a LOG_UNIMP warning. - -Note that in this commit using openat2() for a "faked" file in -/proc will honor the "resolve" flags for -RESOLVE_NO_{MAGIC,SYM}LINKS for path based access to /proc/self/exe -(which is the only magic link we support for faked files). -Note it will not catch special access via e.g. dirfd. This is not -great but it seems similar to the exiting behavior when openat() -is called with a dirfd to "/proc". Here too the fake file lookup -may not catch the special file because no dirfd is used to -determine if the path is in /proc. - -Signed-off-by: Michael Vogt -Buglink: https://github.com/osbuild/bootc-image-builder/issues/619 -Reviewed-by: Laurent Vivier -Message-ID: <1c2c8c9db3731ed4c6fd9b10c63637c3e4caf8f5.1727795334.git.mvogt@redhat.com> -Signed-off-by: Richard Henderson ---- - linux-user/syscall.c | 105 +++++++++++++++++++++++++++++++++++++- - linux-user/syscall_defs.h | 13 +++++ - 2 files changed, 116 insertions(+), 2 deletions(-) - -diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index a666986189..2febc3bc3f 100644 ---- a/linux-user/syscall.c -+++ b/linux-user/syscall.c -@@ -602,6 +602,34 @@ static int check_zeroed_user(abi_long addr, size_t ksize, size_t usize) - return 1; - } - -+/* -+ * Copies a target struct to a host struct, in a way that guarantees -+ * backwards-compatibility for struct syscall arguments. -+ * -+ * Similar to kernels uaccess.h:copy_struct_from_user() -+ */ -+static int -+copy_struct_from_user(void *dst, size_t ksize, abi_ptr src, size_t usize) -+{ -+ size_t size = MIN(ksize, usize); -+ size_t rest = MAX(ksize, usize) - size; -+ -+ /* Deal with trailing bytes. */ -+ if (usize < ksize) { -+ memset(dst + size, 0, rest); -+ } else if (usize > ksize) { -+ int ret = check_zeroed_user(src, ksize, usize); -+ if (ret <= 0) { -+ return ret ?: -TARGET_E2BIG; -+ } -+ } -+ /* Copy the interoperable parts of the struct. */ -+ if (copy_from_user(dst, src, size)) { -+ return -TARGET_EFAULT; -+ } -+ return 0; -+} -+ - #define safe_syscall0(type, name) \ - static type safe_##name(void) \ - { \ -@@ -653,6 +681,15 @@ safe_syscall3(ssize_t, read, int, fd, void *, buff, size_t, count) - safe_syscall3(ssize_t, write, int, fd, const void *, buff, size_t, count) - safe_syscall4(int, openat, int, dirfd, const char *, pathname, \ - int, flags, mode_t, mode) -+ -+struct open_how_ver0 { -+ __u64 flags; -+ __u64 mode; -+ __u64 resolve; -+}; -+safe_syscall4(int, openat2, int, dirfd, const char *, pathname, \ -+ const struct open_how_ver0 *, how, size_t, size) -+ - #if defined(TARGET_NR_wait4) || defined(TARGET_NR_waitpid) - safe_syscall4(pid_t, wait4, pid_t, pid, int *, status, int, options, \ - struct rusage *, rusage) -@@ -8332,8 +8369,9 @@ static int open_net_route(CPUArchState *cpu_env, int fd) - } - #endif - --int do_guest_openat(CPUArchState *cpu_env, int dirfd, const char *fname, -- int flags, mode_t mode, bool safe) -+static int maybe_do_fake_open(CPUArchState *cpu_env, int dirfd, -+ const char *fname, int flags, mode_t mode, -+ int openat2_resolve, bool safe) - { - g_autofree char *proc_name = NULL; - const char *pathname; -@@ -8370,6 +8408,12 @@ int do_guest_openat(CPUArchState *cpu_env, int dirfd, const char *fname, - } - - if (is_proc_myself(pathname, "exe")) { -+ /* Honor openat2 resolve flags */ -+ if ((openat2_resolve & RESOLVE_NO_MAGICLINKS) || -+ (openat2_resolve & RESOLVE_NO_SYMLINKS)) { -+ errno = ELOOP; -+ return -1; -+ } - if (safe) { - return safe_openat(dirfd, exec_path, flags, mode); - } else { -@@ -8416,6 +8460,17 @@ int do_guest_openat(CPUArchState *cpu_env, int dirfd, const char *fname, - return fd; - } - -+ return -2; -+} -+ -+int do_guest_openat(CPUArchState *cpu_env, int dirfd, const char *pathname, -+ int flags, mode_t mode, bool safe) -+{ -+ int fd = maybe_do_fake_open(cpu_env, dirfd, pathname, flags, mode, 0, safe); -+ if (fd > -2) { -+ return fd; -+ } -+ - if (safe) { - return safe_openat(dirfd, path(pathname), flags, mode); - } else { -@@ -8423,6 +8478,49 @@ int do_guest_openat(CPUArchState *cpu_env, int dirfd, const char *fname, - } - } - -+ -+static int do_openat2(CPUArchState *cpu_env, abi_long dirfd, -+ abi_ptr guest_pathname, abi_ptr guest_open_how, -+ abi_ulong guest_size) -+{ -+ struct open_how_ver0 how = {0}; -+ char *pathname; -+ int ret; -+ -+ if (guest_size < sizeof(struct target_open_how_ver0)) { -+ return -TARGET_EINVAL; -+ } -+ ret = copy_struct_from_user(&how, sizeof(how), guest_open_how, guest_size); -+ if (ret) { -+ if (ret == -TARGET_E2BIG) { -+ qemu_log_mask(LOG_UNIMP, -+ "Unimplemented openat2 open_how size: " -+ TARGET_ABI_FMT_lu "\n", guest_size); -+ } -+ return ret; -+ } -+ pathname = lock_user_string(guest_pathname); -+ if (!pathname) { -+ return -TARGET_EFAULT; -+ } -+ -+ how.flags = target_to_host_bitmask(tswap64(how.flags), fcntl_flags_tbl); -+ how.mode = tswap64(how.mode); -+ how.resolve = tswap64(how.resolve); -+ int fd = maybe_do_fake_open(cpu_env, dirfd, pathname, how.flags, how.mode, -+ how.resolve, true); -+ if (fd > -2) { -+ ret = get_errno(fd); -+ } else { -+ ret = get_errno(safe_openat2(dirfd, pathname, &how, -+ sizeof(struct open_how_ver0))); -+ } -+ -+ fd_trans_unregister(ret); -+ unlock_user(pathname, guest_pathname, 0); -+ return ret; -+} -+ - ssize_t do_guest_readlink(const char *pathname, char *buf, size_t bufsiz) - { - ssize_t ret; -@@ -9195,6 +9293,9 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, - fd_trans_unregister(ret); - unlock_user(p, arg2, 0); - return ret; -+ case TARGET_NR_openat2: -+ ret = do_openat2(cpu_env, arg1, arg2, arg3, arg4); -+ return ret; - #if defined(TARGET_NR_name_to_handle_at) && defined(CONFIG_OPEN_BY_HANDLE) - case TARGET_NR_name_to_handle_at: - ret = do_name_to_handle_at(arg1, arg2, arg3, arg4, arg5); -diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index e08d088740..de5091c977 100644 ---- a/linux-user/syscall_defs.h -+++ b/linux-user/syscall_defs.h -@@ -2748,4 +2748,17 @@ struct target_sched_param { - abi_int sched_priority; - }; - -+/* from kernel's include/uapi/linux/openat2.h */ -+struct target_open_how_ver0 { -+ abi_ullong flags; -+ abi_ullong mode; -+ abi_ullong resolve; -+}; -+#ifndef RESOLVE_NO_MAGICLINKS -+#define RESOLVE_NO_MAGICLINKS 0x02 -+#endif -+#ifndef RESOLVE_NO_SYMLINKS -+#define RESOLVE_NO_SYMLINKS 0x04 -+#endif -+ - #endif --- -2.47.0 - diff --git a/0001-linux-user-guard-openat2-with-if-defined-TARGET_NR_o.patch b/0001-linux-user-guard-openat2-with-if-defined-TARGET_NR_o.patch deleted file mode 100644 index 83d159e..0000000 --- a/0001-linux-user-guard-openat2-with-if-defined-TARGET_NR_o.patch +++ /dev/null @@ -1,85 +0,0 @@ -From b5aa46fc7bb03877bbea711903e19ad4e27e8259 Mon Sep 17 00:00:00 2001 -From: Michael Vogt -Date: Wed, 23 Oct 2024 09:50:56 +0200 -Subject: [PATCH] linux-user: guard openat2 with `#if - defined(TARGET_NR_openat2)` - -This commit adds a bunch of `#ifdef` around the openat2 support. -We need this to build the `cris-linux-user` target which is still -present in this version but got dropped from upstream in commit -44e4075bf4 but is still present in v9.1.0. - -This patch can be dropped once cris is also removed from the -package. ---- - linux-user/syscall.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 85d61db546..22e5ad3c5f 100644 ---- a/linux-user/syscall.c -+++ b/linux-user/syscall.c -@@ -608,6 +608,7 @@ static int check_zeroed_user(abi_long addr, size_t ksize, size_t usize) - * - * Similar to kernels uaccess.h:copy_struct_from_user() - */ -+#if defined(TARGET_NR_openat2) - static int - copy_struct_from_user(void *dst, size_t ksize, abi_ptr src, size_t usize) - { -@@ -629,6 +630,7 @@ copy_struct_from_user(void *dst, size_t ksize, abi_ptr src, size_t usize) - } - return 0; - } -+#endif - - #define safe_syscall0(type, name) \ - static type safe_##name(void) \ -@@ -682,6 +684,7 @@ safe_syscall3(ssize_t, write, int, fd, const void *, buff, size_t, count) - safe_syscall4(int, openat, int, dirfd, const char *, pathname, \ - int, flags, mode_t, mode) - -+#if defined(TARGET_NR_openat2) - struct open_how_ver0 { - __u64 flags; - __u64 mode; -@@ -689,6 +692,7 @@ struct open_how_ver0 { - }; - safe_syscall4(int, openat2, int, dirfd, const char *, pathname, \ - const struct open_how_ver0 *, how, size_t, size) -+#endif - - #if defined(TARGET_NR_wait4) || defined(TARGET_NR_waitpid) - safe_syscall4(pid_t, wait4, pid_t, pid, int *, status, int, options, \ -@@ -8480,7 +8484,7 @@ int do_guest_openat(CPUArchState *cpu_env, int dirfd, const char *pathname, - } - } - -- -+#if defined(TARGET_NR_openat2) - static int do_openat2(CPUArchState *cpu_env, abi_long dirfd, - abi_ptr guest_pathname, abi_ptr guest_open_how, - abi_ulong guest_size) -@@ -8522,6 +8526,7 @@ static int do_openat2(CPUArchState *cpu_env, abi_long dirfd, - unlock_user(pathname, guest_pathname, 0); - return ret; - } -+#endif - - ssize_t do_guest_readlink(const char *pathname, char *buf, size_t bufsiz) - { -@@ -9295,9 +9300,11 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, - fd_trans_unregister(ret); - unlock_user(p, arg2, 0); - return ret; -+#if defined(TARGET_NR_openat2) - case TARGET_NR_openat2: - ret = do_openat2(cpu_env, arg1, arg2, arg3, arg4); - return ret; -+#endif - #if defined(TARGET_NR_name_to_handle_at) && defined(CONFIG_OPEN_BY_HANDLE) - case TARGET_NR_name_to_handle_at: - ret = do_name_to_handle_at(arg1, arg2, arg3, arg4, arg5); --- -2.47.0 - diff --git a/qemu.spec b/qemu.spec index 0573cc3..7397ceb 100644 --- a/qemu.spec +++ b/qemu.spec @@ -174,6 +174,11 @@ %endif %endif +%define have_qatzip 0 +%ifarch x86_64 +%define have_qatzip 1 +%endif + # LTO still has issues with qemu on armv7hl and aarch64 # https://bugzilla.redhat.com/show_bug.cgi?id=1952483 %global _lto_cflags %{nil} @@ -349,6 +354,8 @@ %{obsoletes_block_gluster} \ %{obsoletes_block_rbd} \ %{obsoletes_package_virtiofsd} \ +Obsoletes: %{name}-system-cris <= %{epoch}:%{version}-%{release} \ +Obsoletes: %{name}-system-cris-core <= %{epoch}:%{version}-%{release} \ Obsoletes: %{name}-system-lm32 <= %{epoch}:%{version}-%{release} \ Obsoletes: %{name}-system-lm32-core <= %{epoch}:%{version}-%{release} \ Obsoletes: %{name}-system-moxie <= %{epoch}:%{version}-%{release} \ @@ -360,18 +367,18 @@ Obsoletes: %{name}-system-unicore32-core <= %{epoch}:%{version}-%{release} \ Obsoletes: sgabios-bin <= 1:0.20180715git-10.fc38 # Release candidate version tracking -# global rcver rc4 +%global rcver rc1 %if 0%{?rcver:1} %global rcrel .%{rcver} %global rcstr -%{rcver} %endif # To prevent rpmdev-bumpspec breakage -%global baserelease 2 +%global baserelease 0.1 Summary: QEMU is a FAST! processor emulator Name: qemu -Version: 9.1.1 +Version: 9.2.0 Release: %{baserelease}%{?rcrel}%{?dist} Epoch: 2 License: %{shrink: @@ -423,17 +430,6 @@ Patch: 0001-Disable-9p-local-tests-that-fail-on-copr-aarch64.patch # Fix compat with new glibc (not upstream yet) Patch: schedattr.patch -# Openat2 support (upstream commit 9651cea) -Patch: 0001-linux-user-add-openat2-support-in-linux-user.patch -# linux-user-cris support for openat2, can be removed once "cris" is -# removed (after v9.1.0) -Patch: 0001-linux-user-guard-openat2-with-if-defined-TARGET_NR_o.patch - -# Fix spice audio with qemu 9.1.1 -# https://lists.gnu.org/archive/html/qemu-devel/2024-11/msg00906.html -# https://gitlab.com/qemu-project/qemu/-/issues/2639 -Patch: 0001-hw-audio-hda-avoid-unnecessary-re-open-stream-on-rec.patch - BuildRequires: gnupg2 BuildRequires: meson >= %{meson_version} BuildRequires: bison @@ -603,6 +599,12 @@ BuildRequires: rutabaga-gfx-ffi-devel # Builds on centos-stream 9 require python-tomli BuildRequires: python-tomli %endif +%if %{have_qatzip} +# --enable-qatzip +BuildRequires: qatzip-devel +%endif +# --enable-libcbor +BuildRequires: libcbor-devel %if %{user_static} BuildRequires: glibc-static @@ -619,7 +621,6 @@ Requires: %{name}-system-aarch64 = %{epoch}:%{version}-%{release} Requires: %{name}-system-alpha = %{epoch}:%{version}-%{release} Requires: %{name}-system-arm = %{epoch}:%{version}-%{release} Requires: %{name}-system-avr = %{epoch}:%{version}-%{release} -Requires: %{name}-system-cris = %{epoch}:%{version}-%{release} Requires: %{name}-system-loongarch64 = %{epoch}:%{version}-%{release} Requires: %{name}-system-m68k = %{epoch}:%{version}-%{release} Requires: %{name}-system-microblaze = %{epoch}:%{version}-%{release} @@ -1108,7 +1109,6 @@ Requires(postun): systemd-units Requires: qemu-user-static-aarch64 Requires: qemu-user-static-alpha Requires: qemu-user-static-arm -Requires: qemu-user-static-cris Requires: qemu-user-static-hexagon Requires: qemu-user-static-hppa Requires: qemu-user-static-loongarch64 @@ -1124,6 +1124,7 @@ Requires: qemu-user-static-sparc Requires: qemu-user-static-x86 Requires: qemu-user-static-xtensa Obsoletes: qemu-user-static-nios2 <= %{epoch}:%{version}-%{release} +Obsoletes: qemu-user-static-cris <= %{epoch}:%{version}-%{release} %description user-static @@ -1148,12 +1149,6 @@ Summary: QEMU user mode emulation of arm qemu targets static build This package provides the arm user mode emulation of qemu targets built as static binaries -%package user-static-cris -Summary: QEMU user mode emulation of cris qemu targets static build -%description user-static-cris -This package provides the cris user mode emulation of qemu targets built as -static binaries - %package user-static-hexagon Summary: QEMU user mode emulation of hexagon qemu targets static build %description user-static-hexagon @@ -1302,20 +1297,6 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} This package provides the QEMU system emulator for AVR systems. -%package system-cris -Summary: QEMU system emulator for CRIS -Requires: %{name}-system-cris-core = %{epoch}:%{version}-%{release} -%{requires_all_modules} -%description system-cris -This package provides the system emulator for CRIS systems. - -%package system-cris-core -Summary: QEMU system emulator for CRIS -Requires: %{name}-common = %{epoch}:%{version}-%{release} -%description system-cris-core -This package provides the system emulator for CRIS boards. - - %package system-hppa Summary: QEMU system emulator for HPPA Requires: %{name}-system-hppa-core = %{epoch}:%{version}-%{release} @@ -1559,6 +1540,7 @@ mkdir -p %{static_builddir} --audio-drv-list= \\\ --disable-af-xdp \\\ --disable-alsa \\\ + --disable-asan \\\ --disable-attr \\\ --disable-auth-pam \\\ --disable-avx2 \\\ @@ -1610,6 +1592,7 @@ mkdir -p %{static_builddir} --disable-jack \\\ --disable-kvm \\\ --disable-l2tpv3 \\\ + --disable-libcbor \\\ --disable-libdaxctl \\\ --disable-libdw \\\ --disable-libkeyutils \\\ @@ -1651,10 +1634,10 @@ mkdir -p %{static_builddir} --disable-rdma \\\ --disable-relocatable \\\ --disable-replication \\\ + --disable-rust \\\ --disable-rutabaga-gfx \\\ --disable-rng-none \\\ --disable-safe-stack \\\ - --disable-sanitizers \\\ --disable-sdl \\\ --disable-sdl-image \\\ --disable-seccomp \\\ @@ -1667,6 +1650,7 @@ mkdir -p %{static_builddir} --disable-sparse \\\ --disable-spice \\\ --disable-spice-protocol \\\ + --disable-strict-rust-lints \\\ --disable-strip \\\ --disable-system \\\ --disable-tcg \\\ @@ -1675,6 +1659,7 @@ mkdir -p %{static_builddir} --disable-tsan \\\ --disable-uadk \\\ --disable-u2f \\\ + --disable-ubsan \\\ --disable-usb-redir \\\ --disable-user \\\ --disable-vpc \\\ @@ -1783,6 +1768,7 @@ run_configure \ %endif --enable-kvm \ --enable-l2tpv3 \ + --enable-libcbor \ --enable-libiscsi \ %if %{have_pmem} --enable-libpmem \ @@ -1871,6 +1857,9 @@ run_configure \ --enable-linux-user \ --enable-multiprocess \ --enable-parallels \ +%if %{have_qatzip} + --enable-qatzip \ +%endif --enable-qcow1 \ --enable-qed \ --enable-qom-cast-debug \ @@ -1896,7 +1885,6 @@ run_configure \ %endif --enable-vhdx \ --enable-virtfs \ - --enable-virtfs-proxy-helper \ --enable-vpc \ --enable-vnc-jpeg \ --enable-vte \ @@ -2217,11 +2205,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %postun user-static-arm /bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : -%post user-static-cris -/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : -%postun user-static-cris -/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : - %post user-static-hexagon /bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : %postun user-static-hexagon @@ -2394,8 +2377,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ # Fedora specific %{_datadir}/applications/qemu.desktop %exclude %{_datadir}/%{name}/qemu-nsis.bmp -%{_libexecdir}/virtfs-proxy-helper -%{_mandir}/man1/virtfs-proxy-helper.1* %files tests @@ -2550,7 +2531,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_bindir}/qemu-alpha %{_bindir}/qemu-arm %{_bindir}/qemu-armeb -%{_bindir}/qemu-cris %{_bindir}/qemu-hppa %{_bindir}/qemu-hexagon %{_bindir}/qemu-loongarch64 @@ -2593,9 +2573,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_datadir}/systemtap/tapset/qemu-arm.stp %{_datadir}/systemtap/tapset/qemu-arm-log.stp %{_datadir}/systemtap/tapset/qemu-arm-simpletrace.stp -%{_datadir}/systemtap/tapset/qemu-cris.stp -%{_datadir}/systemtap/tapset/qemu-cris-log.stp -%{_datadir}/systemtap/tapset/qemu-cris-simpletrace.stp %{_datadir}/systemtap/tapset/qemu-hexagon.stp %{_datadir}/systemtap/tapset/qemu-hexagon-log.stp %{_datadir}/systemtap/tapset/qemu-hexagon-simpletrace.stp @@ -2724,12 +2701,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %endif %{_exec_prefix}/lib/binfmt.d/qemu-armeb-static.conf -%files user-static-cris -%{_bindir}/qemu-cris-static -%{_datadir}/systemtap/tapset/qemu-cris-log-static.stp -%{_datadir}/systemtap/tapset/qemu-cris-simpletrace-static.stp -%{_datadir}/systemtap/tapset/qemu-cris-static.stp - %files user-static-hexagon %{_bindir}/qemu-hexagon-static %{_datadir}/systemtap/tapset/qemu-hexagon-log-static.stp @@ -2948,15 +2919,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_mandir}/man1/qemu-system-avr.1* -%files system-cris -%files system-cris-core -%{_bindir}/qemu-system-cris -%{_datadir}/systemtap/tapset/qemu-system-cris.stp -%{_datadir}/systemtap/tapset/qemu-system-cris-log.stp -%{_datadir}/systemtap/tapset/qemu-system-cris-simpletrace.stp -%{_mandir}/man1/qemu-system-cris.1* - - %files system-hppa %files system-hppa-core %{_bindir}/qemu-system-hppa @@ -3089,7 +3051,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_datadir}/systemtap/tapset/qemu-system-s390x-simpletrace.stp %{_mandir}/man1/qemu-system-s390x.1* %{_datadir}/%{name}/s390-ccw.img -%{_datadir}/%{name}/s390-netboot.img %files system-sh4 @@ -3179,6 +3140,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Mon Nov 25 2024 Cole Robinson - 9.2.0-0.1.rc1 +- Rebase to qemu 9.2.0-rc1 + * Tue Nov 05 2024 Cole Robinson - 9.1.1-2 - Fix spice audio regression with qemu 9.1.1 diff --git a/sources b/sources index 3d9bf5b..74de18b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (qemu-9.1.1.tar.xz) = cbf2e43d54eafe776dd8245a91ff3c28bbe6206b62205addb25b49ffaac79cefc49c9df082c28aedc17ffc4a67db6352fc7a97895887ccbbb1ce198981e242b4 -SHA512 (qemu-9.1.1.tar.xz.sig) = 54ae84bc7c3703c4d1cc163c8f5e6d7cf355e1a709552585b383394a89492693c745ef0c465cf193e7da35978d89cd7d2bfe7ed4032e5013ee93295f786ed1ed +SHA512 (qemu-9.2.0-rc1.tar.xz) = 7075009bacc4302ab355b415a39ccd19054eb31d7a6f371b9dd446ec54e0dee2c60d3eb0bc34262f0ad2c27fe0caa7afa29494b463548e304442f96ae7b7fb4e +SHA512 (qemu-9.2.0-rc1.tar.xz.sig) = 0b3150ed45fcec187d7704acd09ba765f6ba7a3e8b85cc37ce277aef127357beda53b3cbb773155e3e520014cf4a66b01dc98c6b46d9371a9e0e123843015cfa From aa1afc93255ca5be1d243b2cc6c8cf1e1f8204ff Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Nov 26 2024 20:59:45 +0000 Subject: [PATCH 3/12] Disable test suite on i686 Discussed here: https://src.fedoraproject.org/rpms/qemu/pull-request/71 Signed-off-by: Cole Robinson --- diff --git a/qemu.spec b/qemu.spec index 7397ceb..cfba92b 100644 --- a/qemu.spec +++ b/qemu.spec @@ -2151,7 +2151,12 @@ echo "Testing %{name}-build" # ppc64le random qtest segfaults with no discernable pattern # Last check: 2023-10 # Added: 2022-06 -%ifnarch %{power64} +# +# i686 test failing as of qemu-9.2.0-rcX. Discussed here: +# https://src.fedoraproject.org/rpms/qemu/pull-request/71 +# Decided to disable i686 tests entirely, en route to fully +# removing i686 support in the future +%ifnarch %{power64} %{ix86} %make_build check %endif From 737c06be4b45ed5efd71d3162829d0e7af6a66f6 Mon Sep 17 00:00:00 2001 From: Daniel P. Berrangé Date: Nov 29 2024 09:50:06 +0000 Subject: [PATCH 4/12] Fix crash processing virtio-balloon stats Signed-off-by: Daniel P. Berrangé --- diff --git a/0001-hw-virtio-fix-crash-in-processing-balloon-stats.patch b/0001-hw-virtio-fix-crash-in-processing-balloon-stats.patch new file mode 100644 index 0000000..98940b0 --- /dev/null +++ b/0001-hw-virtio-fix-crash-in-processing-balloon-stats.patch @@ -0,0 +1,86 @@ +From 231345d9109bcc6601d570e9e04585493b125b67 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= +Date: Fri, 29 Nov 2024 09:29:23 +0000 +Subject: [PATCH] hw/virtio: fix crash in processing balloon stats +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +balloon_stats_get_all will iterate over guest stats upto the max +VIRTIO_BALLOON_S_NR value, calling visit_type_uint64 to populate +the QObject dict. The dict keys are obtained from the static +array balloon_stat_names which is VIRTIO_BALLOON_S_NR in size. + +Unfortunately the way that array is declared results in any +unassigned stats getting a NULL name, which will then cause +visit_type_uint64 to trigger an assert in qobject_output_add_obj. + +The balloon_stat_names array was fortunately fully populated with +names until recently: + + commit 0d2eeef77a33315187df8519491a900bde4a3d83 + Author: Bibo Mao + Date: Mon Oct 28 10:38:09 2024 +0800 + + linux-headers: Update to Linux v6.12-rc5 + +pulled a change to include/standard-headers/linux/virtio_balloon.h +which increased VIRTIO_BALLOON_S_NR by 6, and failed to add the new +names to balloon_stat_names. + +This commit fills in the missing names, and uses a static assert to +guarantee that any future changes to VIRTIO_BALLOON_S_NR will cause +a build failure until balloon_stat_names is updated. + +This problem was detected by the Cockpit Project's automated +integration tests on QEMU 9.2.0-rc1. + +Fixes: 0d2eeef77a33315187df8519491a900bde4a3d83 +Reported-by: Martin Pitt +Signed-off-by: Daniel P. Berrangé +--- + hw/virtio/virtio-balloon.c | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c +index 609e39a821..afd2ad6dd6 100644 +--- a/hw/virtio/virtio-balloon.c ++++ b/hw/virtio/virtio-balloon.c +@@ -167,19 +167,33 @@ static void balloon_deflate_page(VirtIOBalloon *balloon, + } + } + ++/* ++ * All stats upto VIRTIO_BALLOON_S_NR /must/ have a ++ * non-NULL name declared here, since these are used ++ * as keys for populating the QDict with stats ++ */ + static const char *balloon_stat_names[] = { + [VIRTIO_BALLOON_S_SWAP_IN] = "stat-swap-in", + [VIRTIO_BALLOON_S_SWAP_OUT] = "stat-swap-out", + [VIRTIO_BALLOON_S_MAJFLT] = "stat-major-faults", + [VIRTIO_BALLOON_S_MINFLT] = "stat-minor-faults", + [VIRTIO_BALLOON_S_MEMFREE] = "stat-free-memory", ++ + [VIRTIO_BALLOON_S_MEMTOT] = "stat-total-memory", + [VIRTIO_BALLOON_S_AVAIL] = "stat-available-memory", + [VIRTIO_BALLOON_S_CACHES] = "stat-disk-caches", + [VIRTIO_BALLOON_S_HTLB_PGALLOC] = "stat-htlb-pgalloc", + [VIRTIO_BALLOON_S_HTLB_PGFAIL] = "stat-htlb-pgfail", +- [VIRTIO_BALLOON_S_NR] = NULL ++ ++ [VIRTIO_BALLOON_S_OOM_KILL] = "stat-oom-kills", ++ [VIRTIO_BALLOON_S_ALLOC_STALL] = "stat-alloc-stalls", ++ [VIRTIO_BALLOON_S_ASYNC_SCAN] = "stat-async-scans", ++ [VIRTIO_BALLOON_S_DIRECT_SCAN] = "stat-direct-scans", ++ [VIRTIO_BALLOON_S_ASYNC_RECLAIM] = "stat-async-reclaims", ++ ++ [VIRTIO_BALLOON_S_DIRECT_RECLAIM] = "stat-direct-reclaims", + }; ++G_STATIC_ASSERT(G_N_ELEMENTS(balloon_stat_names) == VIRTIO_BALLOON_S_NR); + + /* + * reset_stats - Mark all items in the stats array as unset +-- +2.46.0 + diff --git a/qemu.spec b/qemu.spec index cfba92b..5c937f5 100644 --- a/qemu.spec +++ b/qemu.spec @@ -374,7 +374,7 @@ Obsoletes: sgabios-bin <= 1:0.20180715git-10.fc38 %endif # To prevent rpmdev-bumpspec breakage -%global baserelease 0.1 +%global baserelease 0.2 Summary: QEMU is a FAST! processor emulator Name: qemu @@ -429,6 +429,8 @@ Source36: README.tests Patch: 0001-Disable-9p-local-tests-that-fail-on-copr-aarch64.patch # Fix compat with new glibc (not upstream yet) Patch: schedattr.patch +# Crash with virtio-balloon stats +Patch: 0001-hw-virtio-fix-crash-in-processing-balloon-stats.patch BuildRequires: gnupg2 BuildRequires: meson >= %{meson_version} @@ -3145,6 +3147,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Fri Nov 29 2024 Daniel P. Berrangé - 9.2.0-0.2.rc1 +- Fix crash querying virtio-balloon stats + * Mon Nov 25 2024 Cole Robinson - 9.2.0-0.1.rc1 - Rebase to qemu 9.2.0-rc1 From 12457ec1dd96f1fc52ceb10d8406d0e07751bba4 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Dec 02 2024 14:29:43 +0000 Subject: [PATCH 5/12] Remove edk2 dependency on arm (32 bit) (RHBZ#2329331) Turn it into 'Obsoletes' so edk2-arm is actually uninstalled, because of concerns for CVEs in this package. Fixes: https://src.fedoraproject.org/rpms/qemu/pull-request/73 Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2329331 Signed-off-by: Richard W.M. Jones --- diff --git a/qemu.spec b/qemu.spec index 5c937f5..29173eb 100644 --- a/qemu.spec +++ b/qemu.spec @@ -136,7 +136,7 @@ # Matches edk2.spec ExclusiveArch %global have_edk2 0 -%ifarch %{ix86} x86_64 %{arm} aarch64 riscv64 +%ifarch %{ix86} x86_64 aarch64 riscv64 %global have_edk2 1 %endif @@ -374,7 +374,7 @@ Obsoletes: sgabios-bin <= 1:0.20180715git-10.fc38 %endif # To prevent rpmdev-bumpspec breakage -%global baserelease 0.2 +%global baserelease 0.3 Summary: QEMU is a FAST! processor emulator Name: qemu @@ -1278,9 +1278,8 @@ This package provides the QEMU system emulator for ARM systems. %package system-arm-core Summary: QEMU system emulator for ARM Requires: %{name}-common = %{epoch}:%{version}-%{release} -%if %{have_edk2} -Requires: edk2-arm -%endif +# Drop the next line in Fedora >= 44. +Obsoletes: edk2-arm <= 20241117-2.fc42 %description system-arm-core This package provides the QEMU system emulator for ARM boards. @@ -3147,6 +3146,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Mon Dec 02 2024 Richard W.M. Jones - 9.2.0-0.3.rc1 +- Remove edk2 dependency on arm (32 bit) (RHBZ#2329331) + * Fri Nov 29 2024 Daniel P. Berrangé - 9.2.0-0.2.rc1 - Fix crash querying virtio-balloon stats From f98adcd28f6b42cb502512399742c1e1c50eaf9e Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Dec 02 2024 19:58:52 +0000 Subject: [PATCH 6/12] libcbor is missing on centos-stream-9, make it conditional Signed-off-by: Cole Robinson --- diff --git a/qemu.spec b/qemu.spec index 29173eb..2a34e8d 100644 --- a/qemu.spec +++ b/qemu.spec @@ -179,6 +179,13 @@ %define have_qatzip 1 %endif +%global have_libcbor 1 +%if 0%{?rhel} +# libcbor missing on centos stream 9 +%global have_libcbor 0 +%endif + + # LTO still has issues with qemu on armv7hl and aarch64 # https://bugzilla.redhat.com/show_bug.cgi?id=1952483 %global _lto_cflags %{nil} @@ -605,8 +612,10 @@ BuildRequires: python-tomli # --enable-qatzip BuildRequires: qatzip-devel %endif +%if %{have_libcbor} # --enable-libcbor BuildRequires: libcbor-devel +%endif %if %{user_static} BuildRequires: glibc-static @@ -1769,7 +1778,9 @@ run_configure \ %endif --enable-kvm \ --enable-l2tpv3 \ +%if %{have_libcbor} --enable-libcbor \ +%endif --enable-libiscsi \ %if %{have_pmem} --enable-libpmem \ From 2bc7bc3ddfd444a221ab4e1b1650de5d7a7cfb28 Mon Sep 17 00:00:00 2001 From: Andrea Bolognani Date: Dec 03 2024 09:49:25 +0000 Subject: [PATCH 7/12] Increase test timeout on riscv64 Builds fail otherwise because the hardware that's currently available is not quite fast enough to keep up. Signed-off-by: Andrea Bolognani --- diff --git a/qemu.spec b/qemu.spec index 2a34e8d..8a19ce7 100644 --- a/qemu.spec +++ b/qemu.spec @@ -381,7 +381,7 @@ Obsoletes: sgabios-bin <= 1:0.20180715git-10.fc38 %endif # To prevent rpmdev-bumpspec breakage -%global baserelease 0.3 +%global baserelease 0.4 Summary: QEMU is a FAST! processor emulator Name: qemu @@ -2155,6 +2155,14 @@ rm -rf %{static_buildroot} # tests have been flakey in the past export MTESTARGS="--no-suite block" +# Most architectures can use the default timeouts, but in some cases +# the hardware that's currently available is too slow and we need to +# allow tests to run for a little bit longer +%define timeout_multiplier 1 +%ifarch riscv64 +%define timeout_multiplier 3 +%endif + %if %{with check} %if !%{tools_only} @@ -2169,7 +2177,7 @@ echo "Testing %{name}-build" # Decided to disable i686 tests entirely, en route to fully # removing i686 support in the future %ifnarch %{power64} %{ix86} -%make_build check +%make_build check TIMEOUT_MULTIPLIER=%{timeout_multiplier} %endif popd @@ -3157,6 +3165,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Tue Dec 03 2024 Andrea Bolognani - 9.2.0-0.4.rc1 +- Increase test timeout on riscv64 + * Mon Dec 02 2024 Richard W.M. Jones - 9.2.0-0.3.rc1 - Remove edk2 dependency on arm (32 bit) (RHBZ#2329331) From 2ec48f070b8056a84bc36c99ceb0070152ba7cdc Mon Sep 17 00:00:00 2001 From: Daniel P. Berrangé Date: Dec 06 2024 16:22:50 +0000 Subject: [PATCH 8/12] Update to 9.2.0-rc3 Signed-off-by: Daniel P. Berrangé --- diff --git a/0001-Disable-9p-local-tests-that-fail-on-copr-aarch64.patch b/0001-Disable-9p-local-tests-that-fail-on-copr-aarch64.patch index c1bbf76..ddf37ca 100644 --- a/0001-Disable-9p-local-tests-that-fail-on-copr-aarch64.patch +++ b/0001-Disable-9p-local-tests-that-fail-on-copr-aarch64.patch @@ -1,46 +1,33 @@ -From 34acc8e0028bf059c9c4e725c653df56eac7c296 Mon Sep 17 00:00:00 2001 -Message-ID: <34acc8e0028bf059c9c4e725c653df56eac7c296.1724767601.git.crobinso@redhat.com> +From 63d3792ebe5202121526d5a2077eb42e16f53b79 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 26 Aug 2024 14:06:14 -0400 Subject: [PATCH] Disable 9p `local` tests that fail on copr aarch64 -Content-type: text/plain Upstream issue: https://gitlab.com/qemu-project/qemu/-/issues/2541 Signed-off-by: Cole Robinson --- - tests/qtest/virtio-9p-test.c | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) + tests/qtest/virtio-9p-test.c | 2 ++ + 1 file changed, 2 insertions(+) diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c -index 3c8cd235cf..1d550eafb1 100644 +index ab3a12c816..261b0c17f1 100644 --- a/tests/qtest/virtio-9p-test.c +++ b/tests/qtest/virtio-9p-test.c -@@ -748,16 +748,16 @@ static void register_virtio_9p_test(void) +@@ -792,6 +792,7 @@ static void register_virtio_9p_test(void) /* 9pfs test cases using the 'local' filesystem driver */ opts.before = assign_9p_local_driver; qos_add_test("local/config", "virtio-9p", pci_config, &opts); -- qos_add_test("local/create_dir", "virtio-9p", fs_create_dir, &opts); -- qos_add_test("local/unlinkat_dir", "virtio-9p", fs_unlinkat_dir, &opts); -- qos_add_test("local/create_file", "virtio-9p", fs_create_file, &opts); -- qos_add_test("local/unlinkat_file", "virtio-9p", fs_unlinkat_file, &opts); -- qos_add_test("local/symlink_file", "virtio-9p", fs_symlink_file, &opts); -- qos_add_test("local/unlinkat_symlink", "virtio-9p", fs_unlinkat_symlink, -- &opts); -- qos_add_test("local/hardlink_file", "virtio-9p", fs_hardlink_file, &opts); -- qos_add_test("local/unlinkat_hardlink", "virtio-9p", fs_unlinkat_hardlink, -- &opts); -+ /* qos_add_test("local/create_dir", "virtio-9p", fs_create_dir, &opts); */ -+ /* qos_add_test("local/unlinkat_dir", "virtio-9p", fs_unlinkat_dir, &opts); */ -+ /* qos_add_test("local/create_file", "virtio-9p", fs_create_file, &opts); */ -+ /* qos_add_test("local/unlinkat_file", "virtio-9p", fs_unlinkat_file, &opts); */ -+ /* qos_add_test("local/symlink_file", "virtio-9p", fs_symlink_file, &opts); */ -+ /* qos_add_test("local/unlinkat_symlink", "virtio-9p", fs_unlinkat_symlink, */ -+ /* &opts); */ -+ /* qos_add_test("local/hardlink_file", "virtio-9p", fs_hardlink_file, &opts); */ -+ /* qos_add_test("local/unlinkat_hardlink", "virtio-9p", fs_unlinkat_hardlink, */ -+ /* &opts); */ ++#if 0 + qos_add_test("local/create_dir", "virtio-9p", fs_create_dir, &opts); + qos_add_test("local/unlinkat_dir", "virtio-9p", fs_unlinkat_dir, &opts); + qos_add_test("local/create_file", "virtio-9p", fs_create_file, &opts); +@@ -804,6 +805,7 @@ static void register_virtio_9p_test(void) + &opts); + qos_add_test("local/use_after_unlink", "virtio-9p", fs_use_after_unlink, + &opts); ++#endif } libqos_init(register_virtio_9p_test); diff --git a/0001-hw-virtio-fix-crash-in-processing-balloon-stats.patch b/0001-hw-virtio-fix-crash-in-processing-balloon-stats.patch deleted file mode 100644 index 98940b0..0000000 --- a/0001-hw-virtio-fix-crash-in-processing-balloon-stats.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 231345d9109bcc6601d570e9e04585493b125b67 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= -Date: Fri, 29 Nov 2024 09:29:23 +0000 -Subject: [PATCH] hw/virtio: fix crash in processing balloon stats -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -balloon_stats_get_all will iterate over guest stats upto the max -VIRTIO_BALLOON_S_NR value, calling visit_type_uint64 to populate -the QObject dict. The dict keys are obtained from the static -array balloon_stat_names which is VIRTIO_BALLOON_S_NR in size. - -Unfortunately the way that array is declared results in any -unassigned stats getting a NULL name, which will then cause -visit_type_uint64 to trigger an assert in qobject_output_add_obj. - -The balloon_stat_names array was fortunately fully populated with -names until recently: - - commit 0d2eeef77a33315187df8519491a900bde4a3d83 - Author: Bibo Mao - Date: Mon Oct 28 10:38:09 2024 +0800 - - linux-headers: Update to Linux v6.12-rc5 - -pulled a change to include/standard-headers/linux/virtio_balloon.h -which increased VIRTIO_BALLOON_S_NR by 6, and failed to add the new -names to balloon_stat_names. - -This commit fills in the missing names, and uses a static assert to -guarantee that any future changes to VIRTIO_BALLOON_S_NR will cause -a build failure until balloon_stat_names is updated. - -This problem was detected by the Cockpit Project's automated -integration tests on QEMU 9.2.0-rc1. - -Fixes: 0d2eeef77a33315187df8519491a900bde4a3d83 -Reported-by: Martin Pitt -Signed-off-by: Daniel P. Berrangé ---- - hw/virtio/virtio-balloon.c | 16 +++++++++++++++- - 1 file changed, 15 insertions(+), 1 deletion(-) - -diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c -index 609e39a821..afd2ad6dd6 100644 ---- a/hw/virtio/virtio-balloon.c -+++ b/hw/virtio/virtio-balloon.c -@@ -167,19 +167,33 @@ static void balloon_deflate_page(VirtIOBalloon *balloon, - } - } - -+/* -+ * All stats upto VIRTIO_BALLOON_S_NR /must/ have a -+ * non-NULL name declared here, since these are used -+ * as keys for populating the QDict with stats -+ */ - static const char *balloon_stat_names[] = { - [VIRTIO_BALLOON_S_SWAP_IN] = "stat-swap-in", - [VIRTIO_BALLOON_S_SWAP_OUT] = "stat-swap-out", - [VIRTIO_BALLOON_S_MAJFLT] = "stat-major-faults", - [VIRTIO_BALLOON_S_MINFLT] = "stat-minor-faults", - [VIRTIO_BALLOON_S_MEMFREE] = "stat-free-memory", -+ - [VIRTIO_BALLOON_S_MEMTOT] = "stat-total-memory", - [VIRTIO_BALLOON_S_AVAIL] = "stat-available-memory", - [VIRTIO_BALLOON_S_CACHES] = "stat-disk-caches", - [VIRTIO_BALLOON_S_HTLB_PGALLOC] = "stat-htlb-pgalloc", - [VIRTIO_BALLOON_S_HTLB_PGFAIL] = "stat-htlb-pgfail", -- [VIRTIO_BALLOON_S_NR] = NULL -+ -+ [VIRTIO_BALLOON_S_OOM_KILL] = "stat-oom-kills", -+ [VIRTIO_BALLOON_S_ALLOC_STALL] = "stat-alloc-stalls", -+ [VIRTIO_BALLOON_S_ASYNC_SCAN] = "stat-async-scans", -+ [VIRTIO_BALLOON_S_DIRECT_SCAN] = "stat-direct-scans", -+ [VIRTIO_BALLOON_S_ASYNC_RECLAIM] = "stat-async-reclaims", -+ -+ [VIRTIO_BALLOON_S_DIRECT_RECLAIM] = "stat-direct-reclaims", - }; -+G_STATIC_ASSERT(G_N_ELEMENTS(balloon_stat_names) == VIRTIO_BALLOON_S_NR); - - /* - * reset_stats - Mark all items in the stats array as unset --- -2.46.0 - diff --git a/qemu.spec b/qemu.spec index 8a19ce7..8a858b4 100644 --- a/qemu.spec +++ b/qemu.spec @@ -374,14 +374,14 @@ Obsoletes: %{name}-system-unicore32-core <= %{epoch}:%{version}-%{release} \ Obsoletes: sgabios-bin <= 1:0.20180715git-10.fc38 # Release candidate version tracking -%global rcver rc1 +%global rcver rc3 %if 0%{?rcver:1} %global rcrel .%{rcver} %global rcstr -%{rcver} %endif # To prevent rpmdev-bumpspec breakage -%global baserelease 0.4 +%global baserelease 0.5 Summary: QEMU is a FAST! processor emulator Name: qemu @@ -436,8 +436,6 @@ Source36: README.tests Patch: 0001-Disable-9p-local-tests-that-fail-on-copr-aarch64.patch # Fix compat with new glibc (not upstream yet) Patch: schedattr.patch -# Crash with virtio-balloon stats -Patch: 0001-hw-virtio-fix-crash-in-processing-balloon-stats.patch BuildRequires: gnupg2 BuildRequires: meson >= %{meson_version} @@ -3165,6 +3163,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Fri Dec 6 2024 Daniel P. Berrangé - 9.2.0-0.5.rc3 +- Rebase to qemu 9.2.0-rc3 + * Tue Dec 03 2024 Andrea Bolognani - 9.2.0-0.4.rc1 - Increase test timeout on riscv64 diff --git a/sources b/sources index 74de18b..4928f82 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (qemu-9.2.0-rc1.tar.xz) = 7075009bacc4302ab355b415a39ccd19054eb31d7a6f371b9dd446ec54e0dee2c60d3eb0bc34262f0ad2c27fe0caa7afa29494b463548e304442f96ae7b7fb4e -SHA512 (qemu-9.2.0-rc1.tar.xz.sig) = 0b3150ed45fcec187d7704acd09ba765f6ba7a3e8b85cc37ce277aef127357beda53b3cbb773155e3e520014cf4a66b01dc98c6b46d9371a9e0e123843015cfa +SHA512 (qemu-9.2.0-rc3.tar.xz) = 4424b95d9aba25ef580e10551abfb98396e78c5ad0750c478084c96e264f0e2690506287a79075f4bc56c0a9936e066c6b69f31931096c1a5dcd93cc0db6f781 +SHA512 (qemu-9.2.0-rc3.tar.xz.sig) = 96cc1b1f062cd12161edafb07015132688d57332d2d7aaec63862a8bd0f37dcba19b63d3d294393e97a9a867c84b5a47e4a0dc37cfa361aea9adb85c54ca24d3 From 8f713f34c77d29e69c330bc19e76c441dd2bd770 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Dec 11 2024 12:01:49 +0000 Subject: [PATCH 9/12] Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) --- diff --git a/qemu.spec b/qemu.spec index 8a858b4..23a344c 100644 --- a/qemu.spec +++ b/qemu.spec @@ -381,7 +381,7 @@ Obsoletes: sgabios-bin <= 1:0.20180715git-10.fc38 %endif # To prevent rpmdev-bumpspec breakage -%global baserelease 0.5 +%global baserelease 0.6 Summary: QEMU is a FAST! processor emulator Name: qemu @@ -3163,6 +3163,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Wed Dec 11 2024 Richard W.M. Jones - 2:9.2.0-0.6.rc3 +- Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) + * Fri Dec 6 2024 Daniel P. Berrangé - 9.2.0-0.5.rc3 - Rebase to qemu 9.2.0-rc3 From 4ed5b3f7e59461d4a29f5a4ceec414144cf3795c Mon Sep 17 00:00:00 2001 From: Daniel P. Berrangé Date: Dec 12 2024 15:39:11 +0000 Subject: [PATCH 10/12] Update to 9.2.0 final release Signed-off-by: Daniel P. Berrangé --- diff --git a/qemu.spec b/qemu.spec index 23a344c..828c73e 100644 --- a/qemu.spec +++ b/qemu.spec @@ -374,14 +374,14 @@ Obsoletes: %{name}-system-unicore32-core <= %{epoch}:%{version}-%{release} \ Obsoletes: sgabios-bin <= 1:0.20180715git-10.fc38 # Release candidate version tracking -%global rcver rc3 +#global rcver rc0 %if 0%{?rcver:1} %global rcrel .%{rcver} %global rcstr -%{rcver} %endif # To prevent rpmdev-bumpspec breakage -%global baserelease 0.6 +%global baserelease 1 Summary: QEMU is a FAST! processor emulator Name: qemu @@ -3163,6 +3163,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Thu Dec 12 2024 Daniel P. Berrangé - 9.2.0-1 +- Rebase to qemu 9.2.0 + * Wed Dec 11 2024 Richard W.M. Jones - 2:9.2.0-0.6.rc3 - Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) diff --git a/sources b/sources index 4928f82..0161870 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (qemu-9.2.0-rc3.tar.xz) = 4424b95d9aba25ef580e10551abfb98396e78c5ad0750c478084c96e264f0e2690506287a79075f4bc56c0a9936e066c6b69f31931096c1a5dcd93cc0db6f781 -SHA512 (qemu-9.2.0-rc3.tar.xz.sig) = 96cc1b1f062cd12161edafb07015132688d57332d2d7aaec63862a8bd0f37dcba19b63d3d294393e97a9a867c84b5a47e4a0dc37cfa361aea9adb85c54ca24d3 +SHA512 (qemu-9.2.0.tar.xz) = f92548623e4e31400c823a2d78417a8a4ecfccb07f3ee4883e2f2ad33054539d2a37d076dbc64df42c6c86c08fa7c2c975cd6e823aa14d5f20cef83348006813 +SHA512 (qemu-9.2.0.tar.xz.sig) = 0200d0b88c423bbde2ae279f33a9bfda8b3f44da5f36f79fa687fa301f62e130ff88c12a6f984d74efb6af7609cd77e6501a3779f7536093f012d25920ff59e0 From 65c3252d31b287c825111dd3dd984b7d46e4e262 Mon Sep 17 00:00:00 2001 From: Richard W.M. Jones Date: Dec 13 2024 14:05:58 +0000 Subject: [PATCH 11/12] Rebuild for libnfs 6 (soname changed from 14 to 16) Signed-off-by: Richard W.M. Jones --- diff --git a/qemu.spec b/qemu.spec index 828c73e..25e8da2 100644 --- a/qemu.spec +++ b/qemu.spec @@ -381,7 +381,7 @@ Obsoletes: sgabios-bin <= 1:0.20180715git-10.fc38 %endif # To prevent rpmdev-bumpspec breakage -%global baserelease 1 +%global baserelease 2 Summary: QEMU is a FAST! processor emulator Name: qemu @@ -3163,6 +3163,9 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Fri Dec 13 2024 Richard W.M. Jones - 2:9.2.0-2 +- Rebuild for libnfs 6 (soname changed from 14 to 16) + * Thu Dec 12 2024 Daniel P. Berrangé - 9.2.0-1 - Rebase to qemu 9.2.0 From 2326013154ae0772b25e7428c61ee2d9079d9846 Mon Sep 17 00:00:00 2001 From: Roberto Campesato Date: Dec 20 2024 11:36:25 +0000 Subject: [PATCH 12/12] Merge remote-tracking branch 'upstream/rawhide' into qemu-hyperscale-9.2.0 --- diff --git a/0001-Disable-9p-local-tests-that-fail-on-copr-aarch64.patch b/0001-Disable-9p-local-tests-that-fail-on-copr-aarch64.patch index c1bbf76..ddf37ca 100644 --- a/0001-Disable-9p-local-tests-that-fail-on-copr-aarch64.patch +++ b/0001-Disable-9p-local-tests-that-fail-on-copr-aarch64.patch @@ -1,46 +1,33 @@ -From 34acc8e0028bf059c9c4e725c653df56eac7c296 Mon Sep 17 00:00:00 2001 -Message-ID: <34acc8e0028bf059c9c4e725c653df56eac7c296.1724767601.git.crobinso@redhat.com> +From 63d3792ebe5202121526d5a2077eb42e16f53b79 Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Mon, 26 Aug 2024 14:06:14 -0400 Subject: [PATCH] Disable 9p `local` tests that fail on copr aarch64 -Content-type: text/plain Upstream issue: https://gitlab.com/qemu-project/qemu/-/issues/2541 Signed-off-by: Cole Robinson --- - tests/qtest/virtio-9p-test.c | 20 ++++++++++---------- - 1 file changed, 10 insertions(+), 10 deletions(-) + tests/qtest/virtio-9p-test.c | 2 ++ + 1 file changed, 2 insertions(+) diff --git a/tests/qtest/virtio-9p-test.c b/tests/qtest/virtio-9p-test.c -index 3c8cd235cf..1d550eafb1 100644 +index ab3a12c816..261b0c17f1 100644 --- a/tests/qtest/virtio-9p-test.c +++ b/tests/qtest/virtio-9p-test.c -@@ -748,16 +748,16 @@ static void register_virtio_9p_test(void) +@@ -792,6 +792,7 @@ static void register_virtio_9p_test(void) /* 9pfs test cases using the 'local' filesystem driver */ opts.before = assign_9p_local_driver; qos_add_test("local/config", "virtio-9p", pci_config, &opts); -- qos_add_test("local/create_dir", "virtio-9p", fs_create_dir, &opts); -- qos_add_test("local/unlinkat_dir", "virtio-9p", fs_unlinkat_dir, &opts); -- qos_add_test("local/create_file", "virtio-9p", fs_create_file, &opts); -- qos_add_test("local/unlinkat_file", "virtio-9p", fs_unlinkat_file, &opts); -- qos_add_test("local/symlink_file", "virtio-9p", fs_symlink_file, &opts); -- qos_add_test("local/unlinkat_symlink", "virtio-9p", fs_unlinkat_symlink, -- &opts); -- qos_add_test("local/hardlink_file", "virtio-9p", fs_hardlink_file, &opts); -- qos_add_test("local/unlinkat_hardlink", "virtio-9p", fs_unlinkat_hardlink, -- &opts); -+ /* qos_add_test("local/create_dir", "virtio-9p", fs_create_dir, &opts); */ -+ /* qos_add_test("local/unlinkat_dir", "virtio-9p", fs_unlinkat_dir, &opts); */ -+ /* qos_add_test("local/create_file", "virtio-9p", fs_create_file, &opts); */ -+ /* qos_add_test("local/unlinkat_file", "virtio-9p", fs_unlinkat_file, &opts); */ -+ /* qos_add_test("local/symlink_file", "virtio-9p", fs_symlink_file, &opts); */ -+ /* qos_add_test("local/unlinkat_symlink", "virtio-9p", fs_unlinkat_symlink, */ -+ /* &opts); */ -+ /* qos_add_test("local/hardlink_file", "virtio-9p", fs_hardlink_file, &opts); */ -+ /* qos_add_test("local/unlinkat_hardlink", "virtio-9p", fs_unlinkat_hardlink, */ -+ /* &opts); */ ++#if 0 + qos_add_test("local/create_dir", "virtio-9p", fs_create_dir, &opts); + qos_add_test("local/unlinkat_dir", "virtio-9p", fs_unlinkat_dir, &opts); + qos_add_test("local/create_file", "virtio-9p", fs_create_file, &opts); +@@ -804,6 +805,7 @@ static void register_virtio_9p_test(void) + &opts); + qos_add_test("local/use_after_unlink", "virtio-9p", fs_use_after_unlink, + &opts); ++#endif } libqos_init(register_virtio_9p_test); diff --git a/0001-linux-user-add-openat2-support-in-linux-user.patch b/0001-linux-user-add-openat2-support-in-linux-user.patch deleted file mode 100644 index ea4760a..0000000 --- a/0001-linux-user-add-openat2-support-in-linux-user.patch +++ /dev/null @@ -1,228 +0,0 @@ -From 9651cead2f1bb34b9b72f9c2c5dc81baea2b082e Mon Sep 17 00:00:00 2001 -From: Michael Vogt -Date: Tue, 1 Oct 2024 17:14:53 +0200 -Subject: [PATCH] linux-user: add openat2 support in linux-user - -This commit adds support for the `openat2()` syscall in the -`linux-user` userspace emulator. - -It is implemented by extracting a new helper `maybe_do_fake_open()` -out of the exiting `do_guest_openat()` and share that with the -new `do_guest_openat2()`. Unfortunately we cannot just make -do_guest_openat2() a superset of do_guest_openat() because the -openat2() syscall is stricter with the argument checking and -will return an error for invalid flags or mode combinations (which -open()/openat() will ignore). - -The implementation is similar to SYSCALL_DEFINE(openat2), i.e. -a new `copy_struct_from_user()` is used that works the same -as the kernels version to support backwards-compatibility -for struct syscall argument. - -Instead of including openat2.h we create a copy of `open_how` -as `open_how_ver0` to ensure that if the structure grows we -can log a LOG_UNIMP warning. - -Note that in this commit using openat2() for a "faked" file in -/proc will honor the "resolve" flags for -RESOLVE_NO_{MAGIC,SYM}LINKS for path based access to /proc/self/exe -(which is the only magic link we support for faked files). -Note it will not catch special access via e.g. dirfd. This is not -great but it seems similar to the exiting behavior when openat() -is called with a dirfd to "/proc". Here too the fake file lookup -may not catch the special file because no dirfd is used to -determine if the path is in /proc. - -Signed-off-by: Michael Vogt -Buglink: https://github.com/osbuild/bootc-image-builder/issues/619 -Reviewed-by: Laurent Vivier -Message-ID: <1c2c8c9db3731ed4c6fd9b10c63637c3e4caf8f5.1727795334.git.mvogt@redhat.com> -Signed-off-by: Richard Henderson ---- - linux-user/syscall.c | 105 +++++++++++++++++++++++++++++++++++++- - linux-user/syscall_defs.h | 13 +++++ - 2 files changed, 116 insertions(+), 2 deletions(-) - -diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index a666986189..2febc3bc3f 100644 ---- a/linux-user/syscall.c -+++ b/linux-user/syscall.c -@@ -602,6 +602,34 @@ static int check_zeroed_user(abi_long addr, size_t ksize, size_t usize) - return 1; - } - -+/* -+ * Copies a target struct to a host struct, in a way that guarantees -+ * backwards-compatibility for struct syscall arguments. -+ * -+ * Similar to kernels uaccess.h:copy_struct_from_user() -+ */ -+static int -+copy_struct_from_user(void *dst, size_t ksize, abi_ptr src, size_t usize) -+{ -+ size_t size = MIN(ksize, usize); -+ size_t rest = MAX(ksize, usize) - size; -+ -+ /* Deal with trailing bytes. */ -+ if (usize < ksize) { -+ memset(dst + size, 0, rest); -+ } else if (usize > ksize) { -+ int ret = check_zeroed_user(src, ksize, usize); -+ if (ret <= 0) { -+ return ret ?: -TARGET_E2BIG; -+ } -+ } -+ /* Copy the interoperable parts of the struct. */ -+ if (copy_from_user(dst, src, size)) { -+ return -TARGET_EFAULT; -+ } -+ return 0; -+} -+ - #define safe_syscall0(type, name) \ - static type safe_##name(void) \ - { \ -@@ -653,6 +681,15 @@ safe_syscall3(ssize_t, read, int, fd, void *, buff, size_t, count) - safe_syscall3(ssize_t, write, int, fd, const void *, buff, size_t, count) - safe_syscall4(int, openat, int, dirfd, const char *, pathname, \ - int, flags, mode_t, mode) -+ -+struct open_how_ver0 { -+ __u64 flags; -+ __u64 mode; -+ __u64 resolve; -+}; -+safe_syscall4(int, openat2, int, dirfd, const char *, pathname, \ -+ const struct open_how_ver0 *, how, size_t, size) -+ - #if defined(TARGET_NR_wait4) || defined(TARGET_NR_waitpid) - safe_syscall4(pid_t, wait4, pid_t, pid, int *, status, int, options, \ - struct rusage *, rusage) -@@ -8332,8 +8369,9 @@ static int open_net_route(CPUArchState *cpu_env, int fd) - } - #endif - --int do_guest_openat(CPUArchState *cpu_env, int dirfd, const char *fname, -- int flags, mode_t mode, bool safe) -+static int maybe_do_fake_open(CPUArchState *cpu_env, int dirfd, -+ const char *fname, int flags, mode_t mode, -+ int openat2_resolve, bool safe) - { - g_autofree char *proc_name = NULL; - const char *pathname; -@@ -8370,6 +8408,12 @@ int do_guest_openat(CPUArchState *cpu_env, int dirfd, const char *fname, - } - - if (is_proc_myself(pathname, "exe")) { -+ /* Honor openat2 resolve flags */ -+ if ((openat2_resolve & RESOLVE_NO_MAGICLINKS) || -+ (openat2_resolve & RESOLVE_NO_SYMLINKS)) { -+ errno = ELOOP; -+ return -1; -+ } - if (safe) { - return safe_openat(dirfd, exec_path, flags, mode); - } else { -@@ -8416,6 +8460,17 @@ int do_guest_openat(CPUArchState *cpu_env, int dirfd, const char *fname, - return fd; - } - -+ return -2; -+} -+ -+int do_guest_openat(CPUArchState *cpu_env, int dirfd, const char *pathname, -+ int flags, mode_t mode, bool safe) -+{ -+ int fd = maybe_do_fake_open(cpu_env, dirfd, pathname, flags, mode, 0, safe); -+ if (fd > -2) { -+ return fd; -+ } -+ - if (safe) { - return safe_openat(dirfd, path(pathname), flags, mode); - } else { -@@ -8423,6 +8478,49 @@ int do_guest_openat(CPUArchState *cpu_env, int dirfd, const char *fname, - } - } - -+ -+static int do_openat2(CPUArchState *cpu_env, abi_long dirfd, -+ abi_ptr guest_pathname, abi_ptr guest_open_how, -+ abi_ulong guest_size) -+{ -+ struct open_how_ver0 how = {0}; -+ char *pathname; -+ int ret; -+ -+ if (guest_size < sizeof(struct target_open_how_ver0)) { -+ return -TARGET_EINVAL; -+ } -+ ret = copy_struct_from_user(&how, sizeof(how), guest_open_how, guest_size); -+ if (ret) { -+ if (ret == -TARGET_E2BIG) { -+ qemu_log_mask(LOG_UNIMP, -+ "Unimplemented openat2 open_how size: " -+ TARGET_ABI_FMT_lu "\n", guest_size); -+ } -+ return ret; -+ } -+ pathname = lock_user_string(guest_pathname); -+ if (!pathname) { -+ return -TARGET_EFAULT; -+ } -+ -+ how.flags = target_to_host_bitmask(tswap64(how.flags), fcntl_flags_tbl); -+ how.mode = tswap64(how.mode); -+ how.resolve = tswap64(how.resolve); -+ int fd = maybe_do_fake_open(cpu_env, dirfd, pathname, how.flags, how.mode, -+ how.resolve, true); -+ if (fd > -2) { -+ ret = get_errno(fd); -+ } else { -+ ret = get_errno(safe_openat2(dirfd, pathname, &how, -+ sizeof(struct open_how_ver0))); -+ } -+ -+ fd_trans_unregister(ret); -+ unlock_user(pathname, guest_pathname, 0); -+ return ret; -+} -+ - ssize_t do_guest_readlink(const char *pathname, char *buf, size_t bufsiz) - { - ssize_t ret; -@@ -9195,6 +9293,9 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, - fd_trans_unregister(ret); - unlock_user(p, arg2, 0); - return ret; -+ case TARGET_NR_openat2: -+ ret = do_openat2(cpu_env, arg1, arg2, arg3, arg4); -+ return ret; - #if defined(TARGET_NR_name_to_handle_at) && defined(CONFIG_OPEN_BY_HANDLE) - case TARGET_NR_name_to_handle_at: - ret = do_name_to_handle_at(arg1, arg2, arg3, arg4, arg5); -diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h -index e08d088740..de5091c977 100644 ---- a/linux-user/syscall_defs.h -+++ b/linux-user/syscall_defs.h -@@ -2748,4 +2748,17 @@ struct target_sched_param { - abi_int sched_priority; - }; - -+/* from kernel's include/uapi/linux/openat2.h */ -+struct target_open_how_ver0 { -+ abi_ullong flags; -+ abi_ullong mode; -+ abi_ullong resolve; -+}; -+#ifndef RESOLVE_NO_MAGICLINKS -+#define RESOLVE_NO_MAGICLINKS 0x02 -+#endif -+#ifndef RESOLVE_NO_SYMLINKS -+#define RESOLVE_NO_SYMLINKS 0x04 -+#endif -+ - #endif --- -2.47.0 - diff --git a/0001-linux-user-guard-openat2-with-if-defined-TARGET_NR_o.patch b/0001-linux-user-guard-openat2-with-if-defined-TARGET_NR_o.patch deleted file mode 100644 index 83d159e..0000000 --- a/0001-linux-user-guard-openat2-with-if-defined-TARGET_NR_o.patch +++ /dev/null @@ -1,85 +0,0 @@ -From b5aa46fc7bb03877bbea711903e19ad4e27e8259 Mon Sep 17 00:00:00 2001 -From: Michael Vogt -Date: Wed, 23 Oct 2024 09:50:56 +0200 -Subject: [PATCH] linux-user: guard openat2 with `#if - defined(TARGET_NR_openat2)` - -This commit adds a bunch of `#ifdef` around the openat2 support. -We need this to build the `cris-linux-user` target which is still -present in this version but got dropped from upstream in commit -44e4075bf4 but is still present in v9.1.0. - -This patch can be dropped once cris is also removed from the -package. ---- - linux-user/syscall.c | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/linux-user/syscall.c b/linux-user/syscall.c -index 85d61db546..22e5ad3c5f 100644 ---- a/linux-user/syscall.c -+++ b/linux-user/syscall.c -@@ -608,6 +608,7 @@ static int check_zeroed_user(abi_long addr, size_t ksize, size_t usize) - * - * Similar to kernels uaccess.h:copy_struct_from_user() - */ -+#if defined(TARGET_NR_openat2) - static int - copy_struct_from_user(void *dst, size_t ksize, abi_ptr src, size_t usize) - { -@@ -629,6 +630,7 @@ copy_struct_from_user(void *dst, size_t ksize, abi_ptr src, size_t usize) - } - return 0; - } -+#endif - - #define safe_syscall0(type, name) \ - static type safe_##name(void) \ -@@ -682,6 +684,7 @@ safe_syscall3(ssize_t, write, int, fd, const void *, buff, size_t, count) - safe_syscall4(int, openat, int, dirfd, const char *, pathname, \ - int, flags, mode_t, mode) - -+#if defined(TARGET_NR_openat2) - struct open_how_ver0 { - __u64 flags; - __u64 mode; -@@ -689,6 +692,7 @@ struct open_how_ver0 { - }; - safe_syscall4(int, openat2, int, dirfd, const char *, pathname, \ - const struct open_how_ver0 *, how, size_t, size) -+#endif - - #if defined(TARGET_NR_wait4) || defined(TARGET_NR_waitpid) - safe_syscall4(pid_t, wait4, pid_t, pid, int *, status, int, options, \ -@@ -8480,7 +8484,7 @@ int do_guest_openat(CPUArchState *cpu_env, int dirfd, const char *pathname, - } - } - -- -+#if defined(TARGET_NR_openat2) - static int do_openat2(CPUArchState *cpu_env, abi_long dirfd, - abi_ptr guest_pathname, abi_ptr guest_open_how, - abi_ulong guest_size) -@@ -8522,6 +8526,7 @@ static int do_openat2(CPUArchState *cpu_env, abi_long dirfd, - unlock_user(pathname, guest_pathname, 0); - return ret; - } -+#endif - - ssize_t do_guest_readlink(const char *pathname, char *buf, size_t bufsiz) - { -@@ -9295,9 +9300,11 @@ static abi_long do_syscall1(CPUArchState *cpu_env, int num, abi_long arg1, - fd_trans_unregister(ret); - unlock_user(p, arg2, 0); - return ret; -+#if defined(TARGET_NR_openat2) - case TARGET_NR_openat2: - ret = do_openat2(cpu_env, arg1, arg2, arg3, arg4); - return ret; -+#endif - #if defined(TARGET_NR_name_to_handle_at) && defined(CONFIG_OPEN_BY_HANDLE) - case TARGET_NR_name_to_handle_at: - ret = do_name_to_handle_at(arg1, arg2, arg3, arg4, arg5); --- -2.47.0 - diff --git a/0006-change_kvm_readonly_mem_allowed_check_for_AMD_SEV_SNP.patch b/0006-change_kvm_readonly_mem_allowed_check_for_AMD_SEV_SNP.patch deleted file mode 100644 index e2637d8..0000000 --- a/0006-change_kvm_readonly_mem_allowed_check_for_AMD_SEV_SNP.patch +++ /dev/null @@ -1,40 +0,0 @@ -From: Roberto Campesato -diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c -index bcd2094944..8f6318aa3d 100644 ---- a/accel/kvm/kvm-all.c -+++ b/accel/kvm/kvm-all.c -@@ -2461,12 +2461,6 @@ static int kvm_init(MachineState *ms) - s->nr_slots = 32; - } - -- s->nr_as = kvm_check_extension(s, KVM_CAP_MULTI_ADDRESS_SPACE); -- if (s->nr_as <= 1) { -- s->nr_as = 1; -- } -- s->as = g_new0(struct KVMAs, s->nr_as); -- - if (object_property_find(OBJECT(current_machine), "kvm-type")) { - g_autofree char *kvm_type = object_property_get_str(OBJECT(current_machine), - "kvm-type", -@@ -2515,6 +2509,12 @@ static int kvm_init(MachineState *ms) - - s->vmfd = ret; - -+ s->nr_as = kvm_vm_check_extension(s, KVM_CAP_MULTI_ADDRESS_SPACE); -+ if (s->nr_as <= 1) { -+ s->nr_as = 1; -+ } -+ s->as = g_new0(struct KVMAs, s->nr_as); -+ - /* check the vcpu limits */ - soft_vcpus_limit = kvm_recommended_vcpus(s); - hard_vcpus_limit = kvm_max_vcpus(s); -@@ -2603,7 +2603,7 @@ static int kvm_init(MachineState *ms) - } - - kvm_readonly_mem_allowed = -- (kvm_check_extension(s, KVM_CAP_READONLY_MEM) > 0); -+ (kvm_vm_check_extension(s, KVM_CAP_READONLY_MEM) > 0); - - kvm_resamplefds_allowed = - (kvm_check_extension(s, KVM_CAP_IRQFD_RESAMPLE) > 0); diff --git a/0c0baf37eaaccff09f8b75015cad0dacc997ff87.patch b/0c0baf37eaaccff09f8b75015cad0dacc997ff87.patch new file mode 100644 index 0000000..a785241 --- /dev/null +++ b/0c0baf37eaaccff09f8b75015cad0dacc997ff87.patch @@ -0,0 +1,78 @@ +From 0c0baf37eaaccff09f8b75015cad0dacc997ff87 Mon Sep 17 00:00:00 2001 +From: Fabiano Rosas +Date: Fri, 13 Dec 2024 10:30:40 -0300 +Subject: [PATCH] migration/multifd: Fix compat with QEMU < 9.0 + +Commit f5f48a7891 ("migration/multifd: Separate SYNC request with +normal jobs") changed the multifd source side to stop sending data +along with the MULTIFD_FLAG_SYNC, effectively introducing the concept +of a SYNC-only packet. Relying on that, commit d7e58f412c +("migration/multifd: Don't send ram data during SYNC") later came +along and skipped reading data from SYNC packets. + +In a versions timeline like this: + + 8.2 f5f48a7 9.0 9.1 d7e58f41 9.2 + +The issue arises that QEMUs < 9.0 still send data along with SYNC, but +QEMUs > 9.1 don't gather that data anymore. This leads to various +kinds of migration failures due to desync/missing data. + +Stop checking for a SYNC packet on the destination and unconditionally +unfill the packet. + +From now on: + +old -> new: +the source sends data + sync, destination reads normally + +new -> new: +source sends only sync, destination reads zeros + +new -> old: +source sends only sync, destination reads zeros + +CC: qemu-stable@nongnu.org +Fixes: d7e58f412c ("migration/multifd: Don't send ram data during SYNC") +Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2720 +Signed-off-by: Fabiano Rosas +--- + migration/multifd.c | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) + +diff --git a/migration/multifd.c b/migration/multifd.c +index 498e71fd102..8d0a763a720 100644 +--- a/migration/multifd.c ++++ b/migration/multifd.c +@@ -252,9 +252,8 @@ static int multifd_recv_unfill_packet(MultiFDRecvParams *p, Error **errp) + p->packet_num = be64_to_cpu(packet->packet_num); + p->packets_recved++; + +- if (!(p->flags & MULTIFD_FLAG_SYNC)) { +- ret = multifd_ram_unfill_packet(p, errp); +- } ++ /* Always unfill, old QEMUs (<9.0) send data along with SYNC */ ++ ret = multifd_ram_unfill_packet(p, errp); + + trace_multifd_recv_unfill(p->id, p->packet_num, p->flags, + p->next_packet_size); +@@ -1151,9 +1150,13 @@ static void *multifd_recv_thread(void *opaque) + flags = p->flags; + /* recv methods don't know how to handle the SYNC flag */ + p->flags &= ~MULTIFD_FLAG_SYNC; +- if (!(flags & MULTIFD_FLAG_SYNC)) { +- has_data = p->normal_num || p->zero_num; +- } ++ ++ /* ++ * Even if it's a SYNC packet, this needs to be set ++ * because older QEMUs (<9.0) still send data along with ++ * the SYNC packet. ++ */ ++ has_data = p->normal_num || p->zero_num; + qemu_mutex_unlock(&p->mutex); + } else { + /* +-- +GitLab + diff --git a/qemu.spec b/qemu.spec index 67bc81d..af77a68 100644 --- a/qemu.spec +++ b/qemu.spec @@ -134,7 +134,7 @@ # Matches edk2.spec ExclusiveArch %global have_edk2 0 -%ifarch %{ix86} x86_64 %{arm} aarch64 riscv64 +%ifarch %{ix86} x86_64 aarch64 riscv64 %global have_edk2 1 %endif @@ -172,6 +172,18 @@ %endif %endif +%define have_qatzip 0 +%ifarch x86_64 +%define have_qatzip 1 +%endif + +%global have_libcbor 1 +%if 0%{?rhel} +# libcbor missing on centos stream 9 +%global have_libcbor 0 +%endif + + # LTO still has issues with qemu on armv7hl and aarch64 # https://bugzilla.redhat.com/show_bug.cgi?id=1952483 %global _lto_cflags %{nil} @@ -347,6 +359,8 @@ %{obsoletes_block_gluster} \ %{obsoletes_block_rbd} \ %{obsoletes_package_virtiofsd} \ +Obsoletes: %{name}-system-cris <= %{epoch}:%{version}-%{release} \ +Obsoletes: %{name}-system-cris-core <= %{epoch}:%{version}-%{release} \ Obsoletes: %{name}-system-lm32 <= %{epoch}:%{version}-%{release} \ Obsoletes: %{name}-system-lm32-core <= %{epoch}:%{version}-%{release} \ Obsoletes: %{name}-system-moxie <= %{epoch}:%{version}-%{release} \ @@ -358,7 +372,7 @@ Obsoletes: %{name}-system-unicore32-core <= %{epoch}:%{version}-%{release} \ Obsoletes: sgabios-bin <= 1:0.20180715git-10.fc38 # Release candidate version tracking -# global rcver rc4 +#global rcver rc0 %if 0%{?rcver:1} %global rcrel .%{rcver} %global rcstr -%{rcver} @@ -372,7 +386,7 @@ Obsoletes: sgabios-bin <= 1:0.20180715git-10.fc38 Summary: QEMU is a FAST! processor emulator Name: qemu -Version: 9.1.1 +Version: 9.2.0 Release: %{baserelease}%{?rcrel}%{?hsrel}%{?dist} Epoch: 2 License: %{shrink: @@ -425,7 +439,6 @@ Patch: 0004-BTRFS_V2_IOCTLS.patch # Include experimental changes based AMD patches for SEV/SNP to make PCI passthrough # work with SNP Patch: 0005-disable_ram_block_discard_for_pci_passthrough_on_AMD_SEV_SNP.patch -Patch: 0006-change_kvm_readonly_mem_allowed_check_for_AMD_SEV_SNP.patch %endif @@ -446,11 +459,9 @@ Patch: 0001-Disable-9p-local-tests-that-fail-on-copr-aarch64.patch # Fix compat with new glibc (not upstream yet) Patch: schedattr.patch -# Openat2 support (upstream commit 9651cea) -Patch: 0001-linux-user-add-openat2-support-in-linux-user.patch -# linux-user-cris support for openat2, can be removed once "cris" is -# removed (after v9.1.0) -Patch: 0001-linux-user-guard-openat2-with-if-defined-TARGET_NR_o.patch +# Fix migration from qemu 7.x, 8.x to 9.2+ +# https://gitlab.com/qemu-project/qemu/-/issues/2720 +Patch: 0c0baf37eaaccff09f8b75015cad0dacc997ff87.patch BuildRequires: gnupg2 BuildRequires: meson >= %{meson_version} @@ -621,6 +632,14 @@ BuildRequires: rutabaga-gfx-ffi-devel # Builds on centos-stream 9 require python-tomli BuildRequires: python-tomli %endif +%if %{have_qatzip} +# --enable-qatzip +BuildRequires: qatzip-devel +%endif +%if %{have_libcbor} +# --enable-libcbor +BuildRequires: libcbor-devel +%endif %if %{user_static} BuildRequires: glibc-static @@ -637,7 +656,6 @@ Requires: %{name}-system-aarch64 = %{epoch}:%{version}-%{release} Requires: %{name}-system-alpha = %{epoch}:%{version}-%{release} Requires: %{name}-system-arm = %{epoch}:%{version}-%{release} Requires: %{name}-system-avr = %{epoch}:%{version}-%{release} -Requires: %{name}-system-cris = %{epoch}:%{version}-%{release} Requires: %{name}-system-loongarch64 = %{epoch}:%{version}-%{release} Requires: %{name}-system-m68k = %{epoch}:%{version}-%{release} Requires: %{name}-system-microblaze = %{epoch}:%{version}-%{release} @@ -1126,7 +1144,6 @@ Requires(postun): systemd-units Requires: qemu-user-static-aarch64 Requires: qemu-user-static-alpha Requires: qemu-user-static-arm -Requires: qemu-user-static-cris Requires: qemu-user-static-hexagon Requires: qemu-user-static-hppa Requires: qemu-user-static-loongarch64 @@ -1142,6 +1159,7 @@ Requires: qemu-user-static-sparc Requires: qemu-user-static-x86 Requires: qemu-user-static-xtensa Obsoletes: qemu-user-static-nios2 <= %{epoch}:%{version}-%{release} +Obsoletes: qemu-user-static-cris <= %{epoch}:%{version}-%{release} %description user-static @@ -1166,12 +1184,6 @@ Summary: QEMU user mode emulation of arm qemu targets static build This package provides the arm user mode emulation of qemu targets built as static binaries -%package user-static-cris -Summary: QEMU user mode emulation of cris qemu targets static build -%description user-static-cris -This package provides the cris user mode emulation of qemu targets built as -static binaries - %package user-static-hexagon Summary: QEMU user mode emulation of hexagon qemu targets static build %description user-static-hexagon @@ -1299,9 +1311,8 @@ This package provides the QEMU system emulator for ARM systems. %package system-arm-core Summary: QEMU system emulator for ARM Requires: %{name}-common = %{epoch}:%{version}-%{release} -%if %{have_edk2} -Requires: edk2-arm -%endif +# Drop the next line in Fedora >= 44. +Obsoletes: edk2-arm <= 20241117-2.fc42 %description system-arm-core This package provides the QEMU system emulator for ARM boards. @@ -1320,20 +1331,6 @@ Requires: %{name}-common = %{epoch}:%{version}-%{release} This package provides the QEMU system emulator for AVR systems. -%package system-cris -Summary: QEMU system emulator for CRIS -Requires: %{name}-system-cris-core = %{epoch}:%{version}-%{release} -%{requires_all_modules} -%description system-cris -This package provides the system emulator for CRIS systems. - -%package system-cris-core -Summary: QEMU system emulator for CRIS -Requires: %{name}-common = %{epoch}:%{version}-%{release} -%description system-cris-core -This package provides the system emulator for CRIS boards. - - %package system-hppa Summary: QEMU system emulator for HPPA Requires: %{name}-system-hppa-core = %{epoch}:%{version}-%{release} @@ -1577,6 +1574,7 @@ mkdir -p %{static_builddir} --audio-drv-list= \\\ --disable-af-xdp \\\ --disable-alsa \\\ + --disable-asan \\\ --disable-attr \\\ --disable-auth-pam \\\ --disable-avx2 \\\ @@ -1628,6 +1626,7 @@ mkdir -p %{static_builddir} --disable-jack \\\ --disable-kvm \\\ --disable-l2tpv3 \\\ + --disable-libcbor \\\ --disable-libdaxctl \\\ --disable-libdw \\\ --disable-libkeyutils \\\ @@ -1669,10 +1668,10 @@ mkdir -p %{static_builddir} --disable-rdma \\\ --disable-relocatable \\\ --disable-replication \\\ + --disable-rust \\\ --disable-rutabaga-gfx \\\ --disable-rng-none \\\ --disable-safe-stack \\\ - --disable-sanitizers \\\ --disable-sdl \\\ --disable-sdl-image \\\ --disable-seccomp \\\ @@ -1685,6 +1684,7 @@ mkdir -p %{static_builddir} --disable-sparse \\\ --disable-spice \\\ --disable-spice-protocol \\\ + --disable-strict-rust-lints \\\ --disable-strip \\\ --disable-system \\\ --disable-tcg \\\ @@ -1693,6 +1693,7 @@ mkdir -p %{static_builddir} --disable-tsan \\\ --disable-uadk \\\ --disable-u2f \\\ + --disable-ubsan \\\ --disable-usb-redir \\\ --disable-user \\\ --disable-vpc \\\ @@ -1801,6 +1802,9 @@ run_configure \ %endif --enable-kvm \ --enable-l2tpv3 \ +%if %{have_libcbor} + --enable-libcbor \ +%endif --enable-libiscsi \ %if %{have_pmem} --enable-libpmem \ @@ -1889,6 +1893,9 @@ run_configure \ --enable-linux-user \ --enable-multiprocess \ --enable-parallels \ +%if %{have_qatzip} + --enable-qatzip \ +%endif --enable-qcow1 \ --enable-qed \ --enable-qom-cast-debug \ @@ -1914,7 +1921,6 @@ run_configure \ %endif --enable-vhdx \ --enable-virtfs \ - --enable-virtfs-proxy-helper \ --enable-vpc \ --enable-vnc-jpeg \ --enable-vte \ @@ -2173,6 +2179,14 @@ rm -rf %{static_buildroot} # tests have been flakey in the past export MTESTARGS="--no-suite block" +# Most architectures can use the default timeouts, but in some cases +# the hardware that's currently available is too slow and we need to +# allow tests to run for a little bit longer +%define timeout_multiplier 1 +%ifarch riscv64 +%define timeout_multiplier 3 +%endif + %if %{with check} %if !%{tools_only} @@ -2181,8 +2195,13 @@ echo "Testing %{name}-build" # ppc64le random qtest segfaults with no discernable pattern # Last check: 2023-10 # Added: 2022-06 -%ifnarch %{power64} -%make_build check +# +# i686 test failing as of qemu-9.2.0-rcX. Discussed here: +# https://src.fedoraproject.org/rpms/qemu/pull-request/71 +# Decided to disable i686 tests entirely, en route to fully +# removing i686 support in the future +%ifnarch %{power64} %{ix86} +%make_build check TIMEOUT_MULTIPLIER=%{timeout_multiplier} %endif popd @@ -2235,11 +2254,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %postun user-static-arm /bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : -%post user-static-cris -/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : -%postun user-static-cris -/bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : - %post user-static-hexagon /bin/systemctl --system try-restart systemd-binfmt.service &>/dev/null || : %postun user-static-hexagon @@ -2412,8 +2426,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ # Fedora specific %{_datadir}/applications/qemu.desktop %exclude %{_datadir}/%{name}/qemu-nsis.bmp -%{_libexecdir}/virtfs-proxy-helper -%{_mandir}/man1/virtfs-proxy-helper.1* %files tests @@ -2568,7 +2580,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_bindir}/qemu-alpha %{_bindir}/qemu-arm %{_bindir}/qemu-armeb -%{_bindir}/qemu-cris %{_bindir}/qemu-hppa %{_bindir}/qemu-hexagon %{_bindir}/qemu-loongarch64 @@ -2611,9 +2622,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_datadir}/systemtap/tapset/qemu-arm.stp %{_datadir}/systemtap/tapset/qemu-arm-log.stp %{_datadir}/systemtap/tapset/qemu-arm-simpletrace.stp -%{_datadir}/systemtap/tapset/qemu-cris.stp -%{_datadir}/systemtap/tapset/qemu-cris-log.stp -%{_datadir}/systemtap/tapset/qemu-cris-simpletrace.stp %{_datadir}/systemtap/tapset/qemu-hexagon.stp %{_datadir}/systemtap/tapset/qemu-hexagon-log.stp %{_datadir}/systemtap/tapset/qemu-hexagon-simpletrace.stp @@ -2742,12 +2750,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %endif %{_exec_prefix}/lib/binfmt.d/qemu-armeb-static.conf -%files user-static-cris -%{_bindir}/qemu-cris-static -%{_datadir}/systemtap/tapset/qemu-cris-log-static.stp -%{_datadir}/systemtap/tapset/qemu-cris-simpletrace-static.stp -%{_datadir}/systemtap/tapset/qemu-cris-static.stp - %files user-static-hexagon %{_bindir}/qemu-hexagon-static %{_datadir}/systemtap/tapset/qemu-hexagon-log-static.stp @@ -2966,15 +2968,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_mandir}/man1/qemu-system-avr.1* -%files system-cris -%files system-cris-core -%{_bindir}/qemu-system-cris -%{_datadir}/systemtap/tapset/qemu-system-cris.stp -%{_datadir}/systemtap/tapset/qemu-system-cris-log.stp -%{_datadir}/systemtap/tapset/qemu-system-cris-simpletrace.stp -%{_mandir}/man1/qemu-system-cris.1* - - %files system-hppa %files system-hppa-core %{_bindir}/qemu-system-hppa @@ -3107,7 +3100,6 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %{_datadir}/systemtap/tapset/qemu-system-s390x-simpletrace.stp %{_mandir}/man1/qemu-system-s390x.1* %{_datadir}/%{name}/s390-ccw.img -%{_datadir}/%{name}/s390-netboot.img %files system-sh4 @@ -3197,6 +3189,38 @@ useradd -r -u 107 -g qemu -G kvm -d / -s /sbin/nologin \ %changelog +* Fri Dec 20 2024 Roberto Campesato - 2:9.2.0-2.1 +- Merge latest changes from Fedora +- Remove fb-only patch already included upstream +- Include fix for multifd migration regression https://gitlab.com/qemu-project/qemu/-/issues/2720 + +* Fri Dec 13 2024 Richard W.M. Jones - 2:9.2.0-2 +- Rebuild for libnfs 6 (soname changed from 14 to 16) + +* Thu Dec 12 2024 Daniel P. Berrangé - 9.2.0-1 +- Rebase to qemu 9.2.0 + +* Wed Dec 11 2024 Richard W.M. Jones - 2:9.2.0-0.6.rc3 +- Rebuild to fix qemu-aarch64-static SIGSEGV (RHBZ#2330793) + +* Fri Dec 6 2024 Daniel P. Berrangé - 9.2.0-0.5.rc3 +- Rebase to qemu 9.2.0-rc3 + +* Tue Dec 03 2024 Andrea Bolognani - 9.2.0-0.4.rc1 +- Increase test timeout on riscv64 + +* Mon Dec 02 2024 Richard W.M. Jones - 9.2.0-0.3.rc1 +- Remove edk2 dependency on arm (32 bit) (RHBZ#2329331) + +* Fri Nov 29 2024 Daniel P. Berrangé - 9.2.0-0.2.rc1 +- Fix crash querying virtio-balloon stats + +* Mon Nov 25 2024 Cole Robinson - 9.2.0-0.1.rc1 +- Rebase to qemu 9.2.0-rc1 + +* Tue Nov 05 2024 Cole Robinson - 9.1.1-2 +- Fix spice audio regression with qemu 9.1.1 + * Fri Oct 25 2024 Roberto Campesato - 9.1.1-1.1 - Merge latest changes from Fedora - Added fb-only patch based on experimental AMD changes for SEV/SNP diff --git a/sources b/sources index 3d9bf5b..0161870 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (qemu-9.1.1.tar.xz) = cbf2e43d54eafe776dd8245a91ff3c28bbe6206b62205addb25b49ffaac79cefc49c9df082c28aedc17ffc4a67db6352fc7a97895887ccbbb1ce198981e242b4 -SHA512 (qemu-9.1.1.tar.xz.sig) = 54ae84bc7c3703c4d1cc163c8f5e6d7cf355e1a709552585b383394a89492693c745ef0c465cf193e7da35978d89cd7d2bfe7ed4032e5013ee93295f786ed1ed +SHA512 (qemu-9.2.0.tar.xz) = f92548623e4e31400c823a2d78417a8a4ecfccb07f3ee4883e2f2ad33054539d2a37d076dbc64df42c6c86c08fa7c2c975cd6e823aa14d5f20cef83348006813 +SHA512 (qemu-9.2.0.tar.xz.sig) = 0200d0b88c423bbde2ae279f33a9bfda8b3f44da5f36f79fa687fa301f62e130ff88c12a6f984d74efb6af7609cd77e6501a3779f7536093f012d25920ff59e0