* [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0
@ 2026-05-05 0:16 Quan.Sun
2026-05-05 7:43 ` Richard Purdie
0 siblings, 1 reply; 13+ messages in thread
From: Quan.Sun @ 2026-05-05 0:16 UTC (permalink / raw)
To: openembedded-core
From: Quan Sun <Quan.Sun@windriver.com>
Signed-off-by: Quan Sun <Quan.Sun@windriver.com>
---
...native_10.2.0.bb => qemu-native_11.0.0.bb} | 0
...10.2.0.bb => qemu-system-native_11.0.0.bb} | 4 +-
meta/recipes-devtools/qemu/qemu.inc | 7 ++-
...load.c-Correction-to-HWCAP2-accessor.patch | 42 ---------------
...n-environment-space-to-boot-loader-q.patch | 6 +--
.../0002-apic-fixup-fallthrough-to-PIC.patch | 6 +--
...mu-Do-not-include-file-if-not-exists.patch | 6 +--
...er-space-mmap-tweaks-to-address-musl.patch | 22 +++-----
.../qemu/0006-qemu-Determinism-fixes.patch | 2 +-
...d-use-relative-path-to-refer-to-file.patch | 6 +--
...and-MAP_SHARED_VALIDATE-on-needed-li.patch | 2 +-
...gure-lookup-meson-exutable-from-PATH.patch | 10 ++--
...ject-include-paths-for-standalone-bu.patch | 52 +++++++++++++++++++
...and-the-python-venv-aren-t-used-for-.patch | 10 ++--
.../qemu/qemu/fix-strerrorname_np.patch | 35 -------------
.../qemu/{qemu_10.2.0.bb => qemu_11.0.0.bb} | 0
16 files changed, 87 insertions(+), 123 deletions(-)
rename meta/recipes-devtools/qemu/{qemu-native_10.2.0.bb => qemu-native_11.0.0.bb} (100%)
rename meta/recipes-devtools/qemu/{qemu-system-native_10.2.0.bb => qemu-system-native_11.0.0.bb} (86%)
delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
create mode 100644 meta/recipes-devtools/qemu/qemu/0010-meson-fix-subproject-include-paths-for-standalone-bu.patch
delete mode 100644 meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
rename meta/recipes-devtools/qemu/{qemu_10.2.0.bb => qemu_11.0.0.bb} (100%)
diff --git a/meta/recipes-devtools/qemu/qemu-native_10.2.0.bb b/meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
similarity index 100%
rename from meta/recipes-devtools/qemu/qemu-native_10.2.0.bb
rename to meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
diff --git a/meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
similarity index 86%
rename from meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb
rename to meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
index 2e4f7328ad..506559a09b 100644
--- a/meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb
+++ b/meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
@@ -26,8 +26,6 @@ do_install:append() {
rm -rf ${D}${datadir}/icons/
rm -rf ${D}${includedir}/qemu-plugin.h
- # Install qmp.py to be used with testimage
- install -d ${D}${libdir}/qemu-python/qmp/
- install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
+ # The qemu.qmp library from the main QEMU repository has now been removed.
}
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 7aa593bc5d..5cadbaa03e 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -22,7 +22,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a3b50d8b88dcc0eb3d7d39b760b9e821 \
SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
file://powerpc_rom.bin \
file://run-ptest \
- file://fix-strerrorname_np.patch \
file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
file://0002-apic-fixup-fallthrough-to-PIC.patch \
file://0004-qemu-Do-not-include-file-if-not-exists.patch \
@@ -32,15 +31,15 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
file://0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \
file://0010-configure-lookup-meson-exutable-from-PATH.patch \
file://0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch \
- file://0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch \
file://qemu-guest-agent.init \
file://qemu-guest-agent.udev \
+ file://0010-meson-fix-subproject-include-paths-for-standalone-bu.patch \
"
# file index at download.qemu.org isn't reliable: https://gitlab.com/qemu-project/qemu-web/-/issues/9
UPSTREAM_CHECK_URI = "https://www.qemu.org"
UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
-SRC_URI[sha256sum] = "9e30ad1b8b9f7b4463001582d1ab297f39cfccea5d08540c0ca6d6672785883a"
+SRC_URI[sha256sum] = "c04ca36012653f32d11c674d370cf52a710e7d3f18c2d8b63e4932052a4854d6"
CVE_STATUS[CVE-2007-0998] = "not-applicable-config: The VNC server can expose host files uder some circumstances. We don't enable it by default."
@@ -74,7 +73,7 @@ do_install_ptest() {
find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {}
# Don't check the file genreated by configure
- sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh
+ sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemble-aml.sh
# Strip the paths from the QEMU variable, we can use PATH
makfiles=$(find ${D}${PTEST_PATH} -name "*.mak")
diff --git a/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch b/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
deleted file mode 100644
index 47d6f41385..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From c333f9c4ee212297f3b9a8a6ef62396a63c48e61 Mon Sep 17 00:00:00 2001
-From: Jim MacArthur <jim.macarthur@linaro.org>
-Date: Tue, 6 Jan 2026 15:40:48 +0000
-Subject: [PATCH] linux-user/elfload.c: Correction to HWCAP2 accessor
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-get_elf_hwcap was used when get_elf_hwcap2 should have been.
-
-Cc: qemu-stable@nongnu.org
-Fixes: fcac98d0ba8b ("linux-user: Remove ELF_HWCAP2")
-Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3259
-Signed-off-by: Jim MacArthur <jim.macarthur@linaro.org>
-Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
-Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-Message-ID: <20260106-fix-hwcap2-sve2-v1-1-1d70dff63370@linaro.org>
-
-Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/c333f9c4ee212297f3b9a8a6ef62396a63c48e61]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- linux-user/elfload.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/linux-user/elfload.c b/linux-user/elfload.c
-index 0002d5be2f..35471c0c9a 100644
---- a/linux-user/elfload.c
-+++ b/linux-user/elfload.c
-@@ -708,7 +708,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
- NEW_AUX_ENT(AT_EXECFN, info->file_string);
-
- if (HAVE_ELF_HWCAP2) {
-- NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap(thread_cpu));
-+ NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap2(thread_cpu));
- }
- if (u_base_platform) {
- NEW_AUX_ENT(AT_BASE_PLATFORM, u_base_platform);
---
-2.34.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
index bc8dace013..98aa6b6387 100644
--- a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
+++ b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
@@ -1,4 +1,4 @@
-From f2d9bc614f7edf66412209aba78aa086e65dc75e Mon Sep 17 00:00:00 2001
+From a84184c98cf296954e0c757604e969b8565eb474 Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
Date: Fri, 28 Mar 2014 17:42:43 +0800
Subject: [PATCH] qemu: Add addition environment space to boot loader
@@ -18,10 +18,10 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
-index cbdbb2105..62681fdae 100644
+index 812ff64d8..daf929943 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
-@@ -65,7 +65,7 @@
+@@ -66,7 +66,7 @@
#define ENVP_PADDR 0x2000
#define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
#define ENVP_NB_ENTRIES 16
diff --git a/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
index bfc85f4842..ad00f24482 100644
--- a/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
+++ b/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
@@ -1,4 +1,4 @@
-From 945af9ecc80653955cbdbb7d3e28dce61795b251 Mon Sep 17 00:00:00 2001
+From 0a688e763d91c2e0e11cbe960f405442a9f35417 Mon Sep 17 00:00:00 2001
From: Mark Asselstine <mark.asselstine@windriver.com>
Date: Tue, 26 Feb 2013 11:43:28 -0500
Subject: [PATCH] apic: fixup fallthrough to PIC
@@ -33,10 +33,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
-index aad253a..212b01f 100644
+index 8766ed00b..581fc6deb 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
-@@ -740,7 +740,7 @@ int apic_accept_pic_intr(APICCommonState *s)
+@@ -741,7 +741,7 @@ int apic_accept_pic_intr(APICCommonState *s)
{
uint32_t lvt0;
diff --git a/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch b/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
index 2e738abaa3..4b6ac54445 100644
--- a/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
+++ b/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
@@ -1,4 +1,4 @@
-From f8c1614b204c1d64af906dc70dbf4a1534eb6b38 Mon Sep 17 00:00:00 2001
+From b38315a5a6f9fc033c72bb94ff258bb4b1ac8dd3 Mon Sep 17 00:00:00 2001
From: Oleksiy Obitotskyy <oobitots@cisco.com>
Date: Wed, 25 Mar 2020 21:21:35 +0200
Subject: [PATCH] qemu: Do not include file if not exists
@@ -16,10 +16,10 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
1 file changed, 2 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index c236b2834..2a3527a87 100644
+index f4b74ad35..3da51ea83 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
-@@ -119,7 +119,9 @@
+@@ -117,7 +117,9 @@
#include <linux/blkpg.h>
#include <netpacket/packet.h>
#include <linux/netlink.h>
diff --git a/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch b/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
index ffbbb1ab32..f270c6a035 100644
--- a/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
+++ b/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
@@ -1,4 +1,4 @@
-From 3621615790270449bf9c8a0777e8ef28eb762bf9 Mon Sep 17 00:00:00 2001
+From e4abb937ba5a6a476d31886e71e67006df22a664 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Fri, 8 Jan 2021 17:27:06 +0000
Subject: [PATCH] qemu: Add some user space mmap tweaks to address musl 32 bit
@@ -18,30 +18,22 @@ rather than ENOMEM so adjust the other part of the test to this.
Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01355.html]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
---
- linux-user/mmap.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
+ linux-user/mmap.c | 5 +++++
+ 1 file changed, 5 insertions(+)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
-index 002e1e668..912839dec 100644
+index b635b6a21..a5a617516 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
-@@ -1109,12 +1109,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
+@@ -1113,6 +1113,11 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
int prot;
void *host_addr;
-- if (!guest_range_valid_untagged(old_addr, old_size) ||
-- ((flags & MREMAP_FIXED) &&
+ if (!guest_range_valid_untagged(old_addr, old_size)) {
+ errno = EFAULT;
+ return -1;
+ }
-+
-+ if (((flags & MREMAP_FIXED) &&
++
+ if (((flags & MREMAP_FIXED) &&
!guest_range_valid_untagged(new_addr, new_size)) ||
((flags & MREMAP_MAYMOVE) == 0 &&
- !guest_range_valid_untagged(old_addr, new_size))) {
-- errno = ENOMEM;
-+ errno = EINVAL;
- return -1;
- }
-
diff --git a/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch b/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
index 5b24c18916..b54149cb8a 100644
--- a/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
+++ b/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
@@ -1,4 +1,4 @@
-From 8b28a9376074067bc2d84d4f77d5c7a42433b31b Mon Sep 17 00:00:00 2001
+From e891928d2248e186c65979cf5a2ba0cff9d00824 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Mon, 1 Mar 2021 13:00:47 +0000
Subject: [PATCH] qemu: Determinism fixes
diff --git a/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
index a58c936d06..275c500894 100644
--- a/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
+++ b/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
@@ -1,4 +1,4 @@
-From 097b75ad8310143decab92f6d1744144e7a4809f Mon Sep 17 00:00:00 2001
+From ac9a866ac807cb1542f26df07b4aad3a06342a99 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 14 Jan 2021 06:33:04 +0000
Subject: [PATCH] tests/meson.build: use relative path to refer to files
@@ -17,10 +17,10 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
-index d5248ae51..2c581f055 100644
+index 41e8b06c3..ce5df4957 100644
--- a/tests/unit/meson.build
+++ b/tests/unit/meson.build
-@@ -127,17 +127,17 @@ endif
+@@ -124,17 +124,17 @@ endif
if have_system
tests += {
diff --git a/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
index af0eafb65f..f6e563ad80 100644
--- a/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
+++ b/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
@@ -1,4 +1,4 @@
-From 9d5deb767523ea0d1aeecb9960244c702530acad Mon Sep 17 00:00:00 2001
+From c0bfd2c5556afcf4413c81b3fda54a62f2bdd8c8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 21 Mar 2022 10:09:38 -0700
Subject: [PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux
diff --git a/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch b/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
index db88766cf6..430b1aa509 100644
--- a/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
+++ b/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
@@ -1,4 +1,4 @@
-From aaec67c133dddda7204d23964732b4b788cbc9ce Mon Sep 17 00:00:00 2001
+From e357ac91b04f733148defe8c133ae8b2085a9a23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <martin@geanix.com>
Date: Wed, 22 May 2024 14:02:55 +0200
Subject: [PATCH] configure: lookup meson exutable from PATH
@@ -13,10 +13,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/configure b/configure
-index 82cace1..83bbda9 100755
+index eea903067..217af781f 100755
--- a/configure
+++ b/configure
-@@ -993,10 +993,7 @@ get_pwd() {
+@@ -981,10 +981,7 @@ get_pwd() {
fi
}
@@ -26,5 +26,5 @@ index 82cace1..83bbda9 100755
-fi
+meson=`which meson`
- # Conditionally ensure Sphinx is installed.
-
+ # On Haiku, meson might show up in a "non-packaged" subfolder instead, see
+ # https://github.com/haiku/haiku/blob/r1beta5/docs/user/storage/storageintro.dox
diff --git a/meta/recipes-devtools/qemu/qemu/0010-meson-fix-subproject-include-paths-for-standalone-bu.patch b/meta/recipes-devtools/qemu/qemu/0010-meson-fix-subproject-include-paths-for-standalone-bu.patch
new file mode 100644
index 0000000000..b7d31f0ed7
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0010-meson-fix-subproject-include-paths-for-standalone-bu.patch
@@ -0,0 +1,52 @@
+From f013e84d382bc1bd7d49206bdf47c689b0c6fbb5 Mon Sep 17 00:00:00 2001
+From: Quan Sun <Quan.Sun@windriver.com>
+Date: Fri, 1 May 2026 13:53:24 -0700
+Subject: [PATCH] meson: fix subproject include paths for standalone builds
+
+Upstream-Status: Pending
+
+---
+ subprojects/libvduse/meson.build | 3 ++-
+ subprojects/libvhost-user/meson.build | 9 ++++++---
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/subprojects/libvduse/meson.build b/subprojects/libvduse/meson.build
+index 3e3b53da3..80114f431 100644
+--- a/subprojects/libvduse/meson.build
++++ b/subprojects/libvduse/meson.build
+@@ -10,7 +10,8 @@ add_project_arguments(cc.get_supported_arguments('-Wsign-compare',
+
+ libvduse = static_library('vduse',
+ files('libvduse.c'),
+- c_args: '-D_GNU_SOURCE')
++ c_args: '-D_GNU_SOURCE',
++ include_directories: include_directories('.', '../..', '../../include'))
+
+ libvduse_dep = declare_dependency(link_with: libvduse,
+ include_directories: include_directories('.'))
+diff --git a/subprojects/libvhost-user/meson.build b/subprojects/libvhost-user/meson.build
+index a18014e7f..6d469038c 100644
+--- a/subprojects/libvhost-user/meson.build
++++ b/subprojects/libvhost-user/meson.build
+@@ -14,15 +14,18 @@ glib = dependency('glib-2.0')
+ vhost_user = static_library('vhost-user',
+ files('libvhost-user.c'),
+ dependencies: threads,
+- c_args: '-D_GNU_SOURCE')
++ c_args: '-D_GNU_SOURCE',
++ include_directories: include_directories('.', '../..', '../../include'))
+
+ executable('link-test', files('link-test.c'),
+- link_whole: vhost_user)
++ link_whole: vhost_user,
++ include_directories: include_directories('.', '../..', '../../include'))
+
+ vhost_user_glib = static_library('vhost-user-glib',
+ files('libvhost-user-glib.c'),
+ link_with: vhost_user,
+- dependencies: glib)
++ dependencies: glib,
++ include_directories: include_directories('.', '../..', '../../include'))
+
+ vhost_user_dep = declare_dependency(link_with: vhost_user_glib,
+ dependencies: glib,
diff --git a/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch b/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
index d04596d313..040931a941 100644
--- a/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
+++ b/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
@@ -1,4 +1,4 @@
-From c9f174b2f7b43e59e91f88c75c8b3e2ee30bfcdd Mon Sep 17 00:00:00 2001
+From 70fa360e5bf72b28960747da47d9b85e650ad312 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed, 22 May 2024 13:58:23 +0200
Subject: [PATCH] qemu: Ensure pip and the python venv aren't used for meson
@@ -29,10 +29,10 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
-index 84e429409..1a9585e8e 100755
+index 217af781f..cf8666337 100755
--- a/configure
+++ b/configure
-@@ -981,14 +981,14 @@ python="$(command -v "$python")"
+@@ -951,14 +951,14 @@ python="$(command -v "$python")"
echo "python determined to be '$python'"
echo "python version: $($python --version)"
@@ -47,5 +47,5 @@ index 84e429409..1a9585e8e 100755
-mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
+mkvenv=true
- # Finish preparing the virtual environment using vendored .whl files
-
+ # Finish preparing the virtual environment using vendored .whl files.
+ # Even if PyPI is allowed, we disallow it here to force installation
diff --git a/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch b/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
deleted file mode 100644
index 524e20a3dd..0000000000
--- a/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 475dbdbee7ff878d113f45a1a623e9abbf0e55f3 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Wed, 18 Sep 2024 16:19:37 -0700
-Subject: [PATCH] target/riscv/kvm: do not use non-portable strerrorname_np()
-
-strerrorname_np is non-portable and breaks building with musl libc.
-
-Use strerror(errno) instead, like we do other places.
-
-Upstream-Status: Submitted [https://mail.gnu.org/archive/html/qemu-stable/2023-12/msg00069.html]
-
-Cc: qemu-stable@nongnu.org
-Fixes: commit 082e9e4a58ba (target/riscv/kvm: improve 'init_multiext_cfg' error
-msg)
-Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2041
-Buglink: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15541
-Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
----
- target/riscv/kvm/kvm-cpu.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c
-index e06d2126b..e1cc02fba 100644
---- a/target/riscv/kvm/kvm-cpu.c
-+++ b/target/riscv/kvm/kvm-cpu.c
-@@ -1994,8 +1994,7 @@ static bool kvm_cpu_realize(CPUState *cs, Error **errp)
- if (riscv_has_ext(&cpu->env, RVV)) {
- ret = prctl(PR_RISCV_V_SET_CONTROL, PR_RISCV_V_VSTATE_CTRL_ON);
- if (ret) {
-- error_setg(errp, "Error in prctl PR_RISCV_V_SET_CONTROL, code: %s",
-- strerrorname_np(errno));
-+ error_setg(errp, "Error in prctl PR_RISCV_V_SET_CONTROL, error %d", errno);
- return false;
- }
- }
diff --git a/meta/recipes-devtools/qemu/qemu_10.2.0.bb b/meta/recipes-devtools/qemu/qemu_11.0.0.bb
similarity index 100%
rename from meta/recipes-devtools/qemu/qemu_10.2.0.bb
rename to meta/recipes-devtools/qemu/qemu_11.0.0.bb
--
2.49.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0
2026-05-05 0:16 Quan.Sun
@ 2026-05-05 7:43 ` Richard Purdie
0 siblings, 0 replies; 13+ messages in thread
From: Richard Purdie @ 2026-05-05 7:43 UTC (permalink / raw)
To: Quan.Sun, openembedded-core
On Mon, 2026-05-04 at 17:16 -0700, Quan.Sun via lists.openembedded.org wrote:
> From: Quan Sun <Quan.Sun@windriver.com>
>
> Signed-off-by: Quan Sun <Quan.Sun@windriver.com>
The changelog should mention any key changes.
> @@ -26,8 +26,6 @@ do_install:append() {
> rm -rf ${D}${datadir}/icons/
> rm -rf ${D}${includedir}/qemu-plugin.h
>
> - # Install qmp.py to be used with testimage
> - install -d ${D}${libdir}/qemu-python/qmp/
> - install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
> + # The qemu.qmp library from the main QEMU repository has now been removed.
> }
This looks like a key change that should be mentioned!
Unfortunately, as the code says, testimage uses qmp. We therefore need
to find a new way to provide qmp for testimage. We can't simply delete
it and the comment you've left isn't useful either.
https://github.com/qemu/qemu/commit/e1e49b35b3c3cf6b7c68b6b1df18a477ac3183e5
mentioned we should be using:
https://gitlab.com/qemu-project/python-qemu-qmp/
> @@ -26,5 +26,5 @@ index 82cace1..83bbda9 100755
> -fi
> +meson=`which meson`
>
> - # Conditionally ensure Sphinx is installed.
> -
> + # On Haiku, meson might show up in a "non-packaged" subfolder instead, see
> + # https://github.com/haiku/haiku/blob/r1beta5/docs/user/storage/storageintro.dox
> diff --git a/meta/recipes-devtools/qemu/qemu/0010-meson-fix-subproject-include-paths-for-standalone-bu.patch b/meta/recipes-devtools/qemu/qemu/0010-meson-fix-subproject-include-paths-for-standalone-bu.patch
> new file mode 100644
> index 0000000000..b7d31f0ed7
> --- /dev/null
> +++ b/meta/recipes-devtools/qemu/qemu/0010-meson-fix-subproject-include-paths-for-standalone-bu.patch
> @@ -0,0 +1,52 @@
> +From f013e84d382bc1bd7d49206bdf47c689b0c6fbb5 Mon Sep 17 00:00:00 2001
> +From: Quan Sun <Quan.Sun@windriver.com>
> +Date: Fri, 1 May 2026 13:53:24 -0700
> +Subject: [PATCH] meson: fix subproject include paths for standalone builds
> +
> +Upstream-Status: Pending
Why Pending? Do we need to dicuss this issue with upstream?
Cheers,
Richard
^ permalink raw reply [flat|nested] 13+ messages in thread
* [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0
@ 2026-05-06 21:48 Quan.Sun
2026-05-07 10:34 ` Mathieu Dubois-Briand
2026-05-07 11:23 ` Alexander Kanavin
0 siblings, 2 replies; 13+ messages in thread
From: Quan.Sun @ 2026-05-06 21:48 UTC (permalink / raw)
To: openembedded-core
From: Quan Sun <Quan.Sun@windriver.com>
Key changes:
- The qemu.qmp library was removed from the main QEMU repository
(see commit e1e49b35b3c3). Source the standalone python-qemu-qmp
v0.0.6 from https://gitlab.com/qemu-project/python-qemu-qmp to
continue providing QMP support for testimage.
- Refresh patches for new version.
AI-Generated: Uses kiro-cli
Signed-off-by: Quan Sun <Quan.Sun@windriver.com>
---
...native_10.2.0.bb => qemu-native_11.0.0.bb} | 1 -
...10.2.0.bb => qemu-system-native_11.0.0.bb} | 10 ++--
meta/recipes-devtools/qemu/qemu.inc | 7 ++-
...load.c-Correction-to-HWCAP2-accessor.patch | 42 ---------------
...n-environment-space-to-boot-loader-q.patch | 6 +--
.../0002-apic-fixup-fallthrough-to-PIC.patch | 6 +--
...mu-Do-not-include-file-if-not-exists.patch | 6 +--
...er-space-mmap-tweaks-to-address-musl.patch | 22 +++-----
.../qemu/0006-qemu-Determinism-fixes.patch | 4 +-
...d-use-relative-path-to-refer-to-file.patch | 6 +--
...and-MAP_SHARED_VALIDATE-on-needed-li.patch | 2 +-
...gure-lookup-meson-exutable-from-PATH.patch | 10 ++--
...ject-include-paths-for-standalone-bu.patch | 53 +++++++++++++++++++
...and-the-python-venv-aren-t-used-for-.patch | 10 ++--
.../qemu/qemu/fix-strerrorname_np.patch | 35 ------------
.../qemu/{qemu_10.2.0.bb => qemu_11.0.0.bb} | 0
16 files changed, 96 insertions(+), 124 deletions(-)
rename meta/recipes-devtools/qemu/{qemu-native_10.2.0.bb => qemu-native_11.0.0.bb} (99%)
rename meta/recipes-devtools/qemu/{qemu-system-native_10.2.0.bb => qemu-system-native_11.0.0.bb} (68%)
delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
create mode 100644 meta/recipes-devtools/qemu/qemu/0010-meson-fix-subproject-include-paths-for-standalone-bu.patch
delete mode 100644 meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
rename meta/recipes-devtools/qemu/{qemu_10.2.0.bb => qemu_11.0.0.bb} (100%)
diff --git a/meta/recipes-devtools/qemu/qemu-native_10.2.0.bb b/meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
similarity index 99%
rename from meta/recipes-devtools/qemu/qemu-native_10.2.0.bb
rename to meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
index 26fa84c180..a77953529b 100644
--- a/meta/recipes-devtools/qemu/qemu-native_10.2.0.bb
+++ b/meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
@@ -7,4 +7,3 @@ require qemu-native.inc
EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-install-blobs --disable-guest-agent"
PACKAGECONFIG ??= "pie"
-
diff --git a/meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
similarity index 68%
rename from meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb
rename to meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
index 2e4f7328ad..c27d69d2cf 100644
--- a/meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb
+++ b/meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
@@ -7,6 +7,9 @@ require qemu-native.inc
# and avoid file clashes
DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native"
+SRC_URI += "git://gitlab.com/qemu-project/python-qemu-qmp.git;protocol=https;branch=main;destsuffix=python-qemu-qmp;name=qemu-qmp"
+SRCREV_qemu-qmp = "82006cb788d27b090a8b84fc7831feb9c528bcdc"
+
EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
PACKAGECONFIG ??= "fdt alsa kvm pie slirp png pixman sdl \
@@ -26,8 +29,9 @@ do_install:append() {
rm -rf ${D}${datadir}/icons/
rm -rf ${D}${includedir}/qemu-plugin.h
- # Install qmp.py to be used with testimage
+ # Install python-qemu-qmp for use with testimage (upstream removed
+ # qemu.qmp from the main QEMU repository in favor of the standalone
+ # project at https://gitlab.com/qemu-project/python-qemu-qmp)
install -d ${D}${libdir}/qemu-python/qmp/
- install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
+ cp -r ${UNPACKDIR}/python-qemu-qmp/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
}
-
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 7aa593bc5d..5cadbaa03e 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -22,7 +22,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a3b50d8b88dcc0eb3d7d39b760b9e821 \
SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
file://powerpc_rom.bin \
file://run-ptest \
- file://fix-strerrorname_np.patch \
file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
file://0002-apic-fixup-fallthrough-to-PIC.patch \
file://0004-qemu-Do-not-include-file-if-not-exists.patch \
@@ -32,15 +31,15 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
file://0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \
file://0010-configure-lookup-meson-exutable-from-PATH.patch \
file://0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch \
- file://0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch \
file://qemu-guest-agent.init \
file://qemu-guest-agent.udev \
+ file://0010-meson-fix-subproject-include-paths-for-standalone-bu.patch \
"
# file index at download.qemu.org isn't reliable: https://gitlab.com/qemu-project/qemu-web/-/issues/9
UPSTREAM_CHECK_URI = "https://www.qemu.org"
UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
-SRC_URI[sha256sum] = "9e30ad1b8b9f7b4463001582d1ab297f39cfccea5d08540c0ca6d6672785883a"
+SRC_URI[sha256sum] = "c04ca36012653f32d11c674d370cf52a710e7d3f18c2d8b63e4932052a4854d6"
CVE_STATUS[CVE-2007-0998] = "not-applicable-config: The VNC server can expose host files uder some circumstances. We don't enable it by default."
@@ -74,7 +73,7 @@ do_install_ptest() {
find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {}
# Don't check the file genreated by configure
- sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh
+ sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemble-aml.sh
# Strip the paths from the QEMU variable, we can use PATH
makfiles=$(find ${D}${PTEST_PATH} -name "*.mak")
diff --git a/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch b/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
deleted file mode 100644
index 47d6f41385..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From c333f9c4ee212297f3b9a8a6ef62396a63c48e61 Mon Sep 17 00:00:00 2001
-From: Jim MacArthur <jim.macarthur@linaro.org>
-Date: Tue, 6 Jan 2026 15:40:48 +0000
-Subject: [PATCH] linux-user/elfload.c: Correction to HWCAP2 accessor
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-get_elf_hwcap was used when get_elf_hwcap2 should have been.
-
-Cc: qemu-stable@nongnu.org
-Fixes: fcac98d0ba8b ("linux-user: Remove ELF_HWCAP2")
-Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3259
-Signed-off-by: Jim MacArthur <jim.macarthur@linaro.org>
-Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
-Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-Message-ID: <20260106-fix-hwcap2-sve2-v1-1-1d70dff63370@linaro.org>
-
-Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/c333f9c4ee212297f3b9a8a6ef62396a63c48e61]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- linux-user/elfload.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/linux-user/elfload.c b/linux-user/elfload.c
-index 0002d5be2f..35471c0c9a 100644
---- a/linux-user/elfload.c
-+++ b/linux-user/elfload.c
-@@ -708,7 +708,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
- NEW_AUX_ENT(AT_EXECFN, info->file_string);
-
- if (HAVE_ELF_HWCAP2) {
-- NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap(thread_cpu));
-+ NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap2(thread_cpu));
- }
- if (u_base_platform) {
- NEW_AUX_ENT(AT_BASE_PLATFORM, u_base_platform);
---
-2.34.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
index bc8dace013..98aa6b6387 100644
--- a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
+++ b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
@@ -1,4 +1,4 @@
-From f2d9bc614f7edf66412209aba78aa086e65dc75e Mon Sep 17 00:00:00 2001
+From a84184c98cf296954e0c757604e969b8565eb474 Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
Date: Fri, 28 Mar 2014 17:42:43 +0800
Subject: [PATCH] qemu: Add addition environment space to boot loader
@@ -18,10 +18,10 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
-index cbdbb2105..62681fdae 100644
+index 812ff64d8..daf929943 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
-@@ -65,7 +65,7 @@
+@@ -66,7 +66,7 @@
#define ENVP_PADDR 0x2000
#define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
#define ENVP_NB_ENTRIES 16
diff --git a/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
index bfc85f4842..ad00f24482 100644
--- a/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
+++ b/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
@@ -1,4 +1,4 @@
-From 945af9ecc80653955cbdbb7d3e28dce61795b251 Mon Sep 17 00:00:00 2001
+From 0a688e763d91c2e0e11cbe960f405442a9f35417 Mon Sep 17 00:00:00 2001
From: Mark Asselstine <mark.asselstine@windriver.com>
Date: Tue, 26 Feb 2013 11:43:28 -0500
Subject: [PATCH] apic: fixup fallthrough to PIC
@@ -33,10 +33,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
-index aad253a..212b01f 100644
+index 8766ed00b..581fc6deb 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
-@@ -740,7 +740,7 @@ int apic_accept_pic_intr(APICCommonState *s)
+@@ -741,7 +741,7 @@ int apic_accept_pic_intr(APICCommonState *s)
{
uint32_t lvt0;
diff --git a/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch b/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
index 2e738abaa3..4b6ac54445 100644
--- a/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
+++ b/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
@@ -1,4 +1,4 @@
-From f8c1614b204c1d64af906dc70dbf4a1534eb6b38 Mon Sep 17 00:00:00 2001
+From b38315a5a6f9fc033c72bb94ff258bb4b1ac8dd3 Mon Sep 17 00:00:00 2001
From: Oleksiy Obitotskyy <oobitots@cisco.com>
Date: Wed, 25 Mar 2020 21:21:35 +0200
Subject: [PATCH] qemu: Do not include file if not exists
@@ -16,10 +16,10 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
1 file changed, 2 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index c236b2834..2a3527a87 100644
+index f4b74ad35..3da51ea83 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
-@@ -119,7 +119,9 @@
+@@ -117,7 +117,9 @@
#include <linux/blkpg.h>
#include <netpacket/packet.h>
#include <linux/netlink.h>
diff --git a/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch b/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
index ffbbb1ab32..f270c6a035 100644
--- a/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
+++ b/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
@@ -1,4 +1,4 @@
-From 3621615790270449bf9c8a0777e8ef28eb762bf9 Mon Sep 17 00:00:00 2001
+From e4abb937ba5a6a476d31886e71e67006df22a664 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Fri, 8 Jan 2021 17:27:06 +0000
Subject: [PATCH] qemu: Add some user space mmap tweaks to address musl 32 bit
@@ -18,30 +18,22 @@ rather than ENOMEM so adjust the other part of the test to this.
Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01355.html]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
---
- linux-user/mmap.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
+ linux-user/mmap.c | 5 +++++
+ 1 file changed, 5 insertions(+)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
-index 002e1e668..912839dec 100644
+index b635b6a21..a5a617516 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
-@@ -1109,12 +1109,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
+@@ -1113,6 +1113,11 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
int prot;
void *host_addr;
-- if (!guest_range_valid_untagged(old_addr, old_size) ||
-- ((flags & MREMAP_FIXED) &&
+ if (!guest_range_valid_untagged(old_addr, old_size)) {
+ errno = EFAULT;
+ return -1;
+ }
-+
-+ if (((flags & MREMAP_FIXED) &&
++
+ if (((flags & MREMAP_FIXED) &&
!guest_range_valid_untagged(new_addr, new_size)) ||
((flags & MREMAP_MAYMOVE) == 0 &&
- !guest_range_valid_untagged(old_addr, new_size))) {
-- errno = ENOMEM;
-+ errno = EINVAL;
- return -1;
- }
-
diff --git a/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch b/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
index 5b24c18916..0d7974fcdc 100644
--- a/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
+++ b/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
@@ -1,4 +1,4 @@
-From 8b28a9376074067bc2d84d4f77d5c7a42433b31b Mon Sep 17 00:00:00 2001
+From e891928d2248e186c65979cf5a2ba0cff9d00824 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Mon, 1 Mar 2021 13:00:47 +0000
Subject: [PATCH] qemu: Determinism fixes
@@ -11,6 +11,8 @@ meson to pass relative paths but we can fix that in the script.
Upstream-Status: Pending [some version of all/part of this may be accepted]
RP 2021/3/1
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
scripts/decodetree.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
index a58c936d06..275c500894 100644
--- a/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
+++ b/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
@@ -1,4 +1,4 @@
-From 097b75ad8310143decab92f6d1744144e7a4809f Mon Sep 17 00:00:00 2001
+From ac9a866ac807cb1542f26df07b4aad3a06342a99 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 14 Jan 2021 06:33:04 +0000
Subject: [PATCH] tests/meson.build: use relative path to refer to files
@@ -17,10 +17,10 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
-index d5248ae51..2c581f055 100644
+index 41e8b06c3..ce5df4957 100644
--- a/tests/unit/meson.build
+++ b/tests/unit/meson.build
-@@ -127,17 +127,17 @@ endif
+@@ -124,17 +124,17 @@ endif
if have_system
tests += {
diff --git a/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
index af0eafb65f..f6e563ad80 100644
--- a/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
+++ b/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
@@ -1,4 +1,4 @@
-From 9d5deb767523ea0d1aeecb9960244c702530acad Mon Sep 17 00:00:00 2001
+From c0bfd2c5556afcf4413c81b3fda54a62f2bdd8c8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 21 Mar 2022 10:09:38 -0700
Subject: [PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux
diff --git a/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch b/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
index db88766cf6..430b1aa509 100644
--- a/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
+++ b/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
@@ -1,4 +1,4 @@
-From aaec67c133dddda7204d23964732b4b788cbc9ce Mon Sep 17 00:00:00 2001
+From e357ac91b04f733148defe8c133ae8b2085a9a23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <martin@geanix.com>
Date: Wed, 22 May 2024 14:02:55 +0200
Subject: [PATCH] configure: lookup meson exutable from PATH
@@ -13,10 +13,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/configure b/configure
-index 82cace1..83bbda9 100755
+index eea903067..217af781f 100755
--- a/configure
+++ b/configure
-@@ -993,10 +993,7 @@ get_pwd() {
+@@ -981,10 +981,7 @@ get_pwd() {
fi
}
@@ -26,5 +26,5 @@ index 82cace1..83bbda9 100755
-fi
+meson=`which meson`
- # Conditionally ensure Sphinx is installed.
-
+ # On Haiku, meson might show up in a "non-packaged" subfolder instead, see
+ # https://github.com/haiku/haiku/blob/r1beta5/docs/user/storage/storageintro.dox
diff --git a/meta/recipes-devtools/qemu/qemu/0010-meson-fix-subproject-include-paths-for-standalone-bu.patch b/meta/recipes-devtools/qemu/qemu/0010-meson-fix-subproject-include-paths-for-standalone-bu.patch
new file mode 100644
index 0000000000..5258b6db5f
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/0010-meson-fix-subproject-include-paths-for-standalone-bu.patch
@@ -0,0 +1,53 @@
+From f013e84d382bc1bd7d49206bdf47c689b0c6fbb5 Mon Sep 17 00:00:00 2001
+From: Quan Sun <Quan.Sun@windriver.com>
+Date: Fri, 1 May 2026 13:53:24 -0700
+Subject: [PATCH] meson: fix subproject include paths for standalone builds
+
+Upstream-Status: Inappropriate [OE-specific]
+
+Signed-off-by: Quan Sun <Quan.Sun@windriver.com>
+---
+ subprojects/libvduse/meson.build | 3 ++-
+ subprojects/libvhost-user/meson.build | 9 ++++++---
+ 2 files changed, 8 insertions(+), 4 deletions(-)
+
+diff --git a/subprojects/libvduse/meson.build b/subprojects/libvduse/meson.build
+index 3e3b53da3..80114f431 100644
+--- a/subprojects/libvduse/meson.build
++++ b/subprojects/libvduse/meson.build
+@@ -10,7 +10,8 @@ add_project_arguments(cc.get_supported_arguments('-Wsign-compare',
+
+ libvduse = static_library('vduse',
+ files('libvduse.c'),
+- c_args: '-D_GNU_SOURCE')
++ c_args: '-D_GNU_SOURCE',
++ include_directories: include_directories('.', '../..', '../../include'))
+
+ libvduse_dep = declare_dependency(link_with: libvduse,
+ include_directories: include_directories('.'))
+diff --git a/subprojects/libvhost-user/meson.build b/subprojects/libvhost-user/meson.build
+index a18014e7f..6d469038c 100644
+--- a/subprojects/libvhost-user/meson.build
++++ b/subprojects/libvhost-user/meson.build
+@@ -14,15 +14,18 @@ glib = dependency('glib-2.0')
+ vhost_user = static_library('vhost-user',
+ files('libvhost-user.c'),
+ dependencies: threads,
+- c_args: '-D_GNU_SOURCE')
++ c_args: '-D_GNU_SOURCE',
++ include_directories: include_directories('.', '../..', '../../include'))
+
+ executable('link-test', files('link-test.c'),
+- link_whole: vhost_user)
++ link_whole: vhost_user,
++ include_directories: include_directories('.', '../..', '../../include'))
+
+ vhost_user_glib = static_library('vhost-user-glib',
+ files('libvhost-user-glib.c'),
+ link_with: vhost_user,
+- dependencies: glib)
++ dependencies: glib,
++ include_directories: include_directories('.', '../..', '../../include'))
+
+ vhost_user_dep = declare_dependency(link_with: vhost_user_glib,
+ dependencies: glib,
diff --git a/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch b/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
index d04596d313..040931a941 100644
--- a/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
+++ b/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
@@ -1,4 +1,4 @@
-From c9f174b2f7b43e59e91f88c75c8b3e2ee30bfcdd Mon Sep 17 00:00:00 2001
+From 70fa360e5bf72b28960747da47d9b85e650ad312 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed, 22 May 2024 13:58:23 +0200
Subject: [PATCH] qemu: Ensure pip and the python venv aren't used for meson
@@ -29,10 +29,10 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
-index 84e429409..1a9585e8e 100755
+index 217af781f..cf8666337 100755
--- a/configure
+++ b/configure
-@@ -981,14 +981,14 @@ python="$(command -v "$python")"
+@@ -951,14 +951,14 @@ python="$(command -v "$python")"
echo "python determined to be '$python'"
echo "python version: $($python --version)"
@@ -47,5 +47,5 @@ index 84e429409..1a9585e8e 100755
-mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
+mkvenv=true
- # Finish preparing the virtual environment using vendored .whl files
-
+ # Finish preparing the virtual environment using vendored .whl files.
+ # Even if PyPI is allowed, we disallow it here to force installation
diff --git a/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch b/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
deleted file mode 100644
index 524e20a3dd..0000000000
--- a/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 475dbdbee7ff878d113f45a1a623e9abbf0e55f3 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Wed, 18 Sep 2024 16:19:37 -0700
-Subject: [PATCH] target/riscv/kvm: do not use non-portable strerrorname_np()
-
-strerrorname_np is non-portable and breaks building with musl libc.
-
-Use strerror(errno) instead, like we do other places.
-
-Upstream-Status: Submitted [https://mail.gnu.org/archive/html/qemu-stable/2023-12/msg00069.html]
-
-Cc: qemu-stable@nongnu.org
-Fixes: commit 082e9e4a58ba (target/riscv/kvm: improve 'init_multiext_cfg' error
-msg)
-Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2041
-Buglink: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15541
-Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
----
- target/riscv/kvm/kvm-cpu.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c
-index e06d2126b..e1cc02fba 100644
---- a/target/riscv/kvm/kvm-cpu.c
-+++ b/target/riscv/kvm/kvm-cpu.c
-@@ -1994,8 +1994,7 @@ static bool kvm_cpu_realize(CPUState *cs, Error **errp)
- if (riscv_has_ext(&cpu->env, RVV)) {
- ret = prctl(PR_RISCV_V_SET_CONTROL, PR_RISCV_V_VSTATE_CTRL_ON);
- if (ret) {
-- error_setg(errp, "Error in prctl PR_RISCV_V_SET_CONTROL, code: %s",
-- strerrorname_np(errno));
-+ error_setg(errp, "Error in prctl PR_RISCV_V_SET_CONTROL, error %d", errno);
- return false;
- }
- }
diff --git a/meta/recipes-devtools/qemu/qemu_10.2.0.bb b/meta/recipes-devtools/qemu/qemu_11.0.0.bb
similarity index 100%
rename from meta/recipes-devtools/qemu/qemu_10.2.0.bb
rename to meta/recipes-devtools/qemu/qemu_11.0.0.bb
--
2.49.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0
2026-05-06 21:48 [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0 Quan.Sun
@ 2026-05-07 10:34 ` Mathieu Dubois-Briand
2026-05-07 20:49 ` Quan Sun
2026-05-07 11:23 ` Alexander Kanavin
1 sibling, 1 reply; 13+ messages in thread
From: Mathieu Dubois-Briand @ 2026-05-07 10:34 UTC (permalink / raw)
To: Quan.Sun, openembedded-core
On Wed May 6, 2026 at 11:48 PM CEST, Quan.Sun via lists.openembedded.org wrote:
> From: Quan Sun <Quan.Sun@windriver.com>
>
> Key changes:
> - The qemu.qmp library was removed from the main QEMU repository
> (see commit e1e49b35b3c3). Source the standalone python-qemu-qmp
> v0.0.6 from https://gitlab.com/qemu-project/python-qemu-qmp to
> continue providing QMP support for testimage.
> - Refresh patches for new version.
>
> AI-Generated: Uses kiro-cli
>
> Signed-off-by: Quan Sun <Quan.Sun@windriver.com>
> ---
Hi Quan,
Thanks for your patch.
It looks like the build is failing in some conditions:
ERROR: nativesdk-qemu-11.0.0-r0 do_configure: Execution of '/srv/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/i686-nativesdk-pokysdk-linux/nativesdk-qemu/11.0.0/temp/run.do_configure.663311' failed with exit code 1
...
| DEBUG: Executing shell function do_configure
| WARNING: unrecognized host CPU, proceeding with 'uname -m' output 'x86_64'
|
| ERROR: C compiler "i686-pokysdk-linux-gcc -march=i686 --sysroot=/srv/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/i686-nativesdk-pokysdk-linux/nativesdk-qemu/11.0.0/recipe-sysroot" either does not exist or does not work.
https://autobuilder.yoctoproject.org/valkyrie/#/builders/36/builds/3717
https://autobuilder.yoctoproject.org/valkyrie/#/builders/40/builds/3699
https://autobuilder.yoctoproject.org/valkyrie/#/builders/45/builds/1514
https://autobuilder.yoctoproject.org/valkyrie/#/builders/59/builds/3743
https://autobuilder.yoctoproject.org/valkyrie/#/builders/68/builds/3816
...
Can you have a look at the issue?
Thanks,
Mathieu
--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0
2026-05-06 21:48 [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0 Quan.Sun
2026-05-07 10:34 ` Mathieu Dubois-Briand
@ 2026-05-07 11:23 ` Alexander Kanavin
2026-05-07 15:01 ` Paul Barker
2026-05-07 20:29 ` Quan Sun
1 sibling, 2 replies; 13+ messages in thread
From: Alexander Kanavin @ 2026-05-07 11:23 UTC (permalink / raw)
To: Quan.Sun; +Cc: openembedded-core
On Wed, 6 May 2026 at 23:49, Quan.Sun via lists.openembedded.org
<Quan.Sun=windriver.com@lists.openembedded.org> wrote:
> +SRC_URI += "git://gitlab.com/qemu-project/python-qemu-qmp.git;protocol=https;branch=main;destsuffix=python-qemu-qmp;name=qemu-qmp"
> +SRCREV_qemu-qmp = "82006cb788d27b090a8b84fc7831feb9c528bcdc"
This component should be provided with a separate recipe.
> +From f013e84d382bc1bd7d49206bdf47c689b0c6fbb5 Mon Sep 17 00:00:00 2001
> +From: Quan Sun <Quan.Sun@windriver.com>
> +Date: Fri, 1 May 2026 13:53:24 -0700
> +Subject: [PATCH] meson: fix subproject include paths for standalone builds
> +
> +Upstream-Status: Inappropriate [OE-specific]
This should include an explanation of what makes it inappropriate.
Don't just say 'oe specific', a lot of other patches do it, but it
doesn't actually expain anything. What happens without the patch? Can
we find a solution that would be acceptable upstream? Adding
Inappropriate patches should be avoided if possible.
Alex
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0
2026-05-07 11:23 ` Alexander Kanavin
@ 2026-05-07 15:01 ` Paul Barker
2026-05-07 20:29 ` Quan Sun
1 sibling, 0 replies; 13+ messages in thread
From: Paul Barker @ 2026-05-07 15:01 UTC (permalink / raw)
To: alex.kanavin, Quan.Sun; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1270 bytes --]
On Thu, 2026-05-07 at 13:23 +0200, Alexander Kanavin via
lists.openembedded.org wrote:
> On Wed, 6 May 2026 at 23:49, Quan.Sun via lists.openembedded.org
> <Quan.Sun=windriver.com@lists.openembedded.org> wrote:
> > +SRC_URI += "git://gitlab.com/qemu-project/python-qemu-qmp.git;protocol=https;branch=main;destsuffix=python-qemu-qmp;name=qemu-qmp"
> > +SRCREV_qemu-qmp = "82006cb788d27b090a8b84fc7831feb9c528bcdc"
>
> This component should be provided with a separate recipe.
To explain this a little more:
- python-qemu-qmp has its own version numbers now that it has been
broken out into its own repository. So, it would be much better to
have a proper recipe for this with the correct version number
specified.
- In the README file, under "Who is this library for?" it says: "This
library was split out of the QEMU source tree in order to share a
reference version of a QMP library that was usable both within and
outside of the QEMU source tree." - so, python-qemu-qmp may be used by
other software packages in the future as well as being directly used
by qemu.
- Packaging may be cleaner if this Python library is a separate recipe.
Feel free to ask if you have any questions :)
Best regards,
--
Paul Barker
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0
2026-05-07 11:23 ` Alexander Kanavin
2026-05-07 15:01 ` Paul Barker
@ 2026-05-07 20:29 ` Quan Sun
2026-05-08 20:08 ` Alexander Kanavin
1 sibling, 1 reply; 13+ messages in thread
From: Quan Sun @ 2026-05-07 20:29 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: openembedded-core
On 5/7/26 07:23, Alexander Kanavin wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Wed, 6 May 2026 at 23:49, Quan.Sun via lists.openembedded.org
> <Quan.Sun=windriver.com@lists.openembedded.org> wrote:
>> +SRC_URI += "git://gitlab.com/qemu-project/python-qemu-qmp.git;protocol=https;branch=main;destsuffix=python-qemu-qmp;name=qemu-qmp"
>> +SRCREV_qemu-qmp = "82006cb788d27b090a8b84fc7831feb9c528bcdc"
> This component should be provided with a separate recipe.
Yes, will do.
>> +From f013e84d382bc1bd7d49206bdf47c689b0c6fbb5 Mon Sep 17 00:00:00 2001
>> +From: Quan Sun <Quan.Sun@windriver.com>
>> +Date: Fri, 1 May 2026 13:53:24 -0700
>> +Subject: [PATCH] meson: fix subproject include paths for standalone builds
>> +
>> +Upstream-Status: Inappropriate [OE-specific]
> This should include an explanation of what makes it inappropriate.
> Don't just say 'oe specific', a lot of other patches do it, but it
> doesn't actually expain anything. What happens without the patch? Can
> we find a solution that would be acceptable upstream? Adding
> Inappropriate patches should be avoided if possible.
When these subprojects are built standalone (outside the main QEMU meson
project), they fail to compile because they cannot find headers from the
top-level QEMU source tree (e.g. include/standard-headers/ or root-level
headers). In a normal upstream build, the parent project provides these
paths implicitly. OE's build environment triggers standalone subproject
builds, requiring explicit include paths.
This is unlikely to be accepted upstream because QEMU does not support
building these subprojects standalone — they are intended to be built
only as part of the full QEMU tree. The standalone meson.build files
exist for use as subprojects in *other* projects (like DPDK), where
those projects provide their own compatible headers.
Thanks,
Quan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0
2026-05-07 10:34 ` Mathieu Dubois-Briand
@ 2026-05-07 20:49 ` Quan Sun
0 siblings, 0 replies; 13+ messages in thread
From: Quan Sun @ 2026-05-07 20:49 UTC (permalink / raw)
To: Mathieu Dubois-Briand, openembedded-core
On 5/7/26 06:34, Mathieu Dubois-Briand wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Wed May 6, 2026 at 11:48 PM CEST, Quan.Sun via lists.openembedded.org wrote:
>> From: Quan Sun <Quan.Sun@windriver.com>
>>
>> Key changes:
>> - The qemu.qmp library was removed from the main QEMU repository
>> (see commit e1e49b35b3c3). Source the standalone python-qemu-qmp
>> v0.0.6 from https://gitlab.com/qemu-project/python-qemu-qmp to
>> continue providing QMP support for testimage.
>> - Refresh patches for new version.
>>
>> AI-Generated: Uses kiro-cli
>>
>> Signed-off-by: Quan Sun <Quan.Sun@windriver.com>
>> ---
> Hi Quan,
>
> Thanks for your patch.
>
> It looks like the build is failing in some conditions:
>
> ERROR: nativesdk-qemu-11.0.0-r0 do_configure: Execution of '/srv/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/i686-nativesdk-pokysdk-linux/nativesdk-qemu/11.0.0/temp/run.do_configure.663311' failed with exit code 1
> ...
> | DEBUG: Executing shell function do_configure
> | WARNING: unrecognized host CPU, proceeding with 'uname -m' output 'x86_64'
> |
> | ERROR: C compiler "i686-pokysdk-linux-gcc -march=i686 --sysroot=/srv/pokybuild/yocto-worker/qemuarm64/build/build/tmp/work/i686-nativesdk-pokysdk-linux/nativesdk-qemu/11.0.0/recipe-sysroot" either does not exist or does not work.
>
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/36/builds/3717
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/40/builds/3699
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/45/builds/1514
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/59/builds/3743
> https://autobuilder.yoctoproject.org/valkyrie/#/builders/68/builds/3816
> ...
>
> Can you have a look at the issue?
>
> Thanks,
> Mathieu
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
Hi Mathieu,
Currently there are quite a few qemu boot related issues, and we suspect
upgrading to the latest version 11.0.0 would solve some of them (at
least one of them will definitely disappear immediately, see
https://bugzilla.yoctoproject.org/show_bug.cgi?id=16259). Due to some
complexities upgrading to a major new qemu version, I'm temporarily
pausing this upgrade work to plan to bring the relevant qemu commit to
the version 10.2.0, and I'll come back later to investigate these build
issues.
Thanks,
Quan
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0
2026-05-07 20:29 ` Quan Sun
@ 2026-05-08 20:08 ` Alexander Kanavin
2026-05-08 21:35 ` Quan Sun
0 siblings, 1 reply; 13+ messages in thread
From: Alexander Kanavin @ 2026-05-08 20:08 UTC (permalink / raw)
To: Quan Sun; +Cc: openembedded-core
On Thu, 7 May 2026 at 22:29, Quan Sun <Quan.Sun@windriver.com> wrote:
> When these subprojects are built standalone (outside the main QEMU meson
> project), they fail to compile because they cannot find headers from the
> top-level QEMU source tree (e.g. include/standard-headers/ or root-level
> headers). In a normal upstream build, the parent project provides these
> paths implicitly. OE's build environment triggers standalone subproject
> builds, requiring explicit include paths.
I'm afraid I don't understand, and I can't reproduce the issue. I
deleted this patch from SRC_URI, and qemu-native, qemu-system-native
and qemu (target) still build just fine.
What kind of error are you observing? How can it be reproduced? What
exactly triggers the 'standalone build' and how does it look like
compared to 'normal upstream build'?
What I see is that qemu recipe just runs the top level qemu meson
build, and these are built as regular subprojects of it:
log.do_configure:
Executing subproject libvduse
libvduse| Project name: libvduse
libvduse| Project version: undefined
libvduse| C compiler for the host machine: x86_64-poky-linux-gcc -m64
-march=x86-64-v3 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2
-Wformat -Wformat-security -Werror=format-security
--sysroot=/srv/storage/alex/yocto/build-64-alt/tmp/work/x86-64-v3-poky-linux/qemu/11.0.0/recipe-sysroot
-m64 (gcc 15.2.0 "x86_64-poky-linux-gcc (GCC) 15.2.0")
libvduse| C linker for the host machine: x86_64-poky-linux-gcc -m64
-march=x86-64-v3 -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2
-Wformat -Wformat-security -Werror=format-security
--sysroot=/srv/storage/alex/yocto/build-64-alt/tmp/work/x86-64-v3-poky-linux/qemu/11.0.0/recipe-sysroot
-m64 ld.bfd 2.46
libvduse| C compiler for the build machine: gcc (gcc 14.2.0 "gcc
(Debian 14.2.0-19) 14.2.0")
libvduse| C linker for the build machine: gcc ld.bfd 2.44
libvduse| Compiler for C supports arguments -Wsign-compare: YES (cached)
libvduse| Compiler for C supports arguments
-Wdeclaration-after-statement: YES (cached)
libvduse| Compiler for C supports arguments -Wstrict-aliasing: YES (cached)
libvduse| Build targets in project: 5
libvduse| Subproject libvduse finished.
log.do_compile:
[744/5268] Compiling C object subprojects/libvduse/libvduse.a.p/libvduse.c.o
...
[817/5268] Linking static target subprojects/libvduse/libvduse.a
Alex
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0
2026-05-08 20:08 ` Alexander Kanavin
@ 2026-05-08 21:35 ` Quan Sun
0 siblings, 0 replies; 13+ messages in thread
From: Quan Sun @ 2026-05-08 21:35 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: openembedded-core
On 5/8/26 16:08, Alexander Kanavin wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Thu, 7 May 2026 at 22:29, Quan Sun <Quan.Sun@windriver.com> wrote:
>
>> When these subprojects are built standalone (outside the main QEMU meson
>> project), they fail to compile because they cannot find headers from the
>> top-level QEMU source tree (e.g. include/standard-headers/ or root-level
>> headers). In a normal upstream build, the parent project provides these
>> paths implicitly. OE's build environment triggers standalone subproject
>> builds, requiring explicit include paths.
> I'm afraid I don't understand, and I can't reproduce the issue. I
> deleted this patch from SRC_URI, and qemu-native, qemu-system-native
> and qemu (target) still build just fine.
>
> What kind of error are you observing? How can it be reproduced? What
> exactly triggers the 'standalone build' and how does it look like
> compared to 'normal upstream build'?
It's weird when I was working with the upgrade using the devtool, I
clearly got build errors and that's why I added that patch. But as you
said here, by removing that patch file, the build does succeed. I've
verified that the patch is not needed. The libvduse and libvhost-user
subprojects are actually built as meson subprojects of the top-level
QEMU build, not as standalone projects. I've tested qemu-native,
qemu-system-native, and qemu (target) without this patch and all build
successfully. So Dropping that patch file. Thanks a lot!
^ permalink raw reply [flat|nested] 13+ messages in thread
* [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0
@ 2026-05-15 15:48 Quan.Sun
2026-05-15 16:24 ` Alexander Kanavin
0 siblings, 1 reply; 13+ messages in thread
From: Quan.Sun @ 2026-05-15 15:48 UTC (permalink / raw)
To: openembedded-core
From: Quan Sun <Quan.Sun@windriver.com>
Upgrade QEMU to version 11.0.0.
Main changes:
- Add python3-qemu-qmp recipe (0.0.6) as a separate package. The QMP
Python library was removed from the QEMU source tree in 11.0.0 and
split into its own upstream project. This is needed by
qemu-system-native for testimage integration.
- QEMU 11.0.0 has officially dropped all support for 32-bit host systems.
This includes the ability to build the system emulator (softmmu) on
any 32-bit host architecture. Add COMPATIBLE_HOST:class-target to
restrict target builds to 64-bit architectures.
Note: QEMU 11.0.0 still supports emulating 32-bit guest architectures
(such as qemu-system-i386 or qemu-system-arm) as long as they are
running on a 64-bit host.
- qemu-targets.inc: skip linux-user targets when HOST_ARCH is not in the
set of architectures supported by QEMU 11.0.0's linux-user mode
(64-bit only: aarch64, loongarch64, mips64, ppc64, riscv64, s390x,
sparc64, x86_64).
- Add --cpu=${TUNE_ARCH} to EXTRA_OECONF for class-target, and add
--cpu=${SDK_ARCH} to nativesdk configure options to fix build
failure. QEMU 11's configure script falls back to 'uname -m' (x86_64)
when it cannot detect the host CPU.
- Drop fix-strerrorname_np.patch (fixed upstream).
Drop 0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
(fixed upstream).
Drop 0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch
(fixed upstream).
AI-Generated: kiro-cli
Signed-off-by: Quan Sun <Quan.Sun@windriver.com>
---
.../qemu/python3-qemu-qmp_0.0.6.bb | 30 ++
...native_10.2.0.bb => qemu-native_11.0.0.bb} | 1 -
...10.2.0.bb => qemu-system-native_11.0.0.bb} | 7 +-
meta/recipes-devtools/qemu/qemu-targets.inc | 4 +
meta/recipes-devtools/qemu/qemu.inc | 17 +-
...tlb_to_section-for-different-Address.patch | 274 ------------------
...load.c-Correction-to-HWCAP2-accessor.patch | 42 ---
...n-environment-space-to-boot-loader-q.patch | 8 +-
.../0002-apic-fixup-fallthrough-to-PIC.patch | 6 +-
...mu-Do-not-include-file-if-not-exists.patch | 6 +-
...er-space-mmap-tweaks-to-address-musl.patch | 24 +-
.../qemu/0006-qemu-Determinism-fixes.patch | 4 +-
...d-use-relative-path-to-refer-to-file.patch | 6 +-
...and-MAP_SHARED_VALIDATE-on-needed-li.patch | 2 +-
...gure-lookup-meson-exutable-from-PATH.patch | 10 +-
...and-the-python-venv-aren-t-used-for-.patch | 10 +-
.../qemu/qemu/fix-strerrorname_np.patch | 35 ---
.../qemu/{qemu_10.2.0.bb => qemu_11.0.0.bb} | 0
18 files changed, 79 insertions(+), 407 deletions(-)
create mode 100644 meta/recipes-devtools/qemu/python3-qemu-qmp_0.0.6.bb
rename meta/recipes-devtools/qemu/{qemu-native_10.2.0.bb => qemu-native_11.0.0.bb} (99%)
rename meta/recipes-devtools/qemu/{qemu-system-native_10.2.0.bb => qemu-system-native_11.0.0.bb} (85%)
delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch
delete mode 100644 meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
delete mode 100644 meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
rename meta/recipes-devtools/qemu/{qemu_10.2.0.bb => qemu_11.0.0.bb} (100%)
diff --git a/meta/recipes-devtools/qemu/python3-qemu-qmp_0.0.6.bb b/meta/recipes-devtools/qemu/python3-qemu-qmp_0.0.6.bb
new file mode 100644
index 0000000000..b328f61ea0
--- /dev/null
+++ b/meta/recipes-devtools/qemu/python3-qemu-qmp_0.0.6.bb
@@ -0,0 +1,30 @@
+SUMMARY = "QEMU Monitor Protocol Python library"
+DESCRIPTION = "An asyncio library for communicating with QEMU Monitor Protocol (QMP). \
+This library was split out of the QEMU source tree to provide a reference QMP \
+implementation usable both within and outside of the QEMU source tree."
+HOMEPAGE = "https://gitlab.com/qemu-project/python-qemu-qmp"
+LICENSE = "LGPL-2.0-only & GPL-2.0-only"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4cf66a4984120007c9881cc871cf49db"
+
+SRC_URI = "git://gitlab.com/qemu-project/python-qemu-qmp.git;protocol=https;branch=main"
+SRCREV = "82006cb788d27b090a8b84fc7831feb9c528bcdc"
+
+inherit python_setuptools_build_meta
+
+DEPENDS += "python3-setuptools-scm-native"
+
+# setuptools_scm needs this when building from git without tags in the clone
+SETUPTOOLS_SCM_PRETEND_VERSION = "0.0.6"
+
+RDEPENDS:${PN} += "python3-core python3-asyncio"
+
+# Install to the custom path expected by oeqa/utils/qemurunner.py
+# which imports "qmp.legacy" from ${libdir}/qemu-python/
+do_install:append:class-native() {
+ install -d ${D}${libdir}/qemu-python/qmp/
+ cp -R --no-dereference --preserve=mode,links ${S}/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
+}
+
+FILES:${PN}:append:class-native = " ${libdir}/qemu-python"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/qemu/qemu-native_10.2.0.bb b/meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
similarity index 99%
rename from meta/recipes-devtools/qemu/qemu-native_10.2.0.bb
rename to meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
index 26fa84c180..a77953529b 100644
--- a/meta/recipes-devtools/qemu/qemu-native_10.2.0.bb
+++ b/meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
@@ -7,4 +7,3 @@ require qemu-native.inc
EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-install-blobs --disable-guest-agent"
PACKAGECONFIG ??= "pie"
-
diff --git a/meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
similarity index 85%
rename from meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb
rename to meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
index 2e4f7328ad..7947499c5f 100644
--- a/meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb
+++ b/meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
@@ -5,7 +5,7 @@ require qemu-native.inc
# As some of the files installed by qemu-native and qemu-system-native
# are the same, we depend on qemu-native to get the full installation set
# and avoid file clashes
-DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native"
+DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native python3-qemu-qmp-native"
EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
@@ -25,9 +25,4 @@ do_install:append() {
rm -rf ${D}${datadir}/qemu/dtb
rm -rf ${D}${datadir}/icons/
rm -rf ${D}${includedir}/qemu-plugin.h
-
- # Install qmp.py to be used with testimage
- install -d ${D}${libdir}/qemu-python/qmp/
- install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
}
-
diff --git a/meta/recipes-devtools/qemu/qemu-targets.inc b/meta/recipes-devtools/qemu/qemu-targets.inc
index 50e5eb6796..937ef1a911 100644
--- a/meta/recipes-devtools/qemu/qemu-targets.inc
+++ b/meta/recipes-devtools/qemu/qemu-targets.inc
@@ -25,6 +25,10 @@ def get_qemu_target_list(d):
archs.remove(arch)
if 'linux' not in tos:
return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',')
+ # QEMU 11.0.0+ only supports linux-user on 64-bit host architectures
+ linux_user_hosts = ['aarch64', 'loongarch64', 'mips64', 'ppc64', 'riscv64', 's390x', 'sparc64', 'x86_64']
+ if tarch not in linux_user_hosts:
+ return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',')
return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',')
def get_qemu_usermode_target_list(d):
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 5f30416a48..1e5890f15a 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -4,6 +4,7 @@ machine's processor through dynamic binary translation and provides a set \
of different hardware and device models for the machine, enabling it to run \
a variety of guest operating systems"
HOMEPAGE = "http://qemu.org"
+BUGTRACKER = "https://gitlab.com/qemu-project/qemu/-/issues"
LICENSE = "GPL-2.0-only & LGPL-2.1-only"
DEPENDS += "bison-native meson-native ninja-native"
@@ -22,7 +23,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a3b50d8b88dcc0eb3d7d39b760b9e821 \
SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
file://powerpc_rom.bin \
file://run-ptest \
- file://fix-strerrorname_np.patch \
file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
file://0002-apic-fixup-fallthrough-to-PIC.patch \
file://0004-qemu-Do-not-include-file-if-not-exists.patch \
@@ -32,8 +32,6 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
file://0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \
file://0010-configure-lookup-meson-exutable-from-PATH.patch \
file://0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch \
- file://0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch \
- file://0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch \
file://qemu-guest-agent.init \
file://qemu-guest-agent.udev \
"
@@ -41,7 +39,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
UPSTREAM_CHECK_URI = "https://www.qemu.org"
UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
-SRC_URI[sha256sum] = "9e30ad1b8b9f7b4463001582d1ab297f39cfccea5d08540c0ca6d6672785883a"
+SRC_URI[sha256sum] = "c04ca36012653f32d11c674d370cf52a710e7d3f18c2d8b63e4932052a4854d6"
CVE_STATUS[CVE-2007-0998] = "not-applicable-config: The VNC server can expose host files uder some circumstances. We don't enable it by default."
@@ -61,6 +59,9 @@ COMPATIBLE_HOST:mipsarchn32 = "null"
COMPATIBLE_HOST:mipsarchn64 = "null"
COMPATIBLE_HOST:riscv32 = "null"
+# QEMU 11.0.0+ requires a 64-bit host architecture for emulator builds
+COMPATIBLE_HOST:class-target = "(aarch64|x86_64|ppc64|riscv64|loongarch64|mips64|s390x|sparc64).*-linux"
+
# Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html
# upstream states qemu doesn't work without optimization
DEBUG_BUILD = "0"
@@ -75,7 +76,7 @@ do_install_ptest() {
find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {}
# Don't check the file genreated by configure
- sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh
+ sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemble-aml.sh
# Strip the paths from the QEMU variable, we can use PATH
makfiles=$(find ${D}${PTEST_PATH} -name "*.mak")
@@ -119,8 +120,8 @@ EXTRA_OECONF = " \
${PACKAGECONFIG_CONFARGS} \
"
-EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX}"
-EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX}"
+EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX} --cpu=${TUNE_ARCH}"
+EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX} --cpu=${SDK_ARCH}"
B = "${WORKDIR}/build"
@@ -130,7 +131,7 @@ do_configure:prepend:class-native() {
# Append build host pkg-config paths for native target since the host may provide sdl
BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
- export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:$BHOST_PKGCONFIG_PATH
+ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
fi
}
diff --git a/meta/recipes-devtools/qemu/qemu/0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch b/meta/recipes-devtools/qemu/qemu/0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch
deleted file mode 100644
index d19f872fc3..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch
+++ /dev/null
@@ -1,274 +0,0 @@
-From 858e6bb252e075e09cca6e78299151d3af0bf5fb Mon Sep 17 00:00:00 2001
-From: Quan Sun <Quan.Sun@windriver.com>
-Date: Tue, 28 Apr 2026 14:56:36 -0400
-Subject: [PATCH] accel/tcg: Fix iotlb_to_section() for different AddressSpace
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-'CPUTLBEntryFull.xlat_section' stores section_index in last 12 bits to
-find the correct section when CPU access the IO region over the IOTLB.
-However, section_index is only unique inside single AddressSpace. If
-address space translation is over IOMMUMemoryRegion, it could return
-section from other AddressSpace. 'iotlb_to_section()' API only finds the
-sections from CPU's AddressSpace so that it couldn't find section in
-other AddressSpace. Thus, using 'iotlb_to_section()' API will find the
-wrong section and QEMU will have wrong load/store access.
-
-To fix this bug of iotlb_to_section(), store complete MemoryRegionSection
-pointer in CPUTLBEntryFull to replace the section_index in xlat_section.
-Rename 'xlat_section' to 'xlat_offset' as we remove last 12 bits
-section_index inside. Also, since we directly use section pointer in the
-CPUTLBEntryFull (full->section), we can remove the unused functions:
-iotlb_to_section(), memory_region_section_get_iotlb().
-
-This bug occurs only when
-(1) IOMMUMemoryRegion is in the path of CPU access.
-(2) IOMMUMemoryRegion returns different target_as and the section is in
-the IO region.
-
-This patch incorporates prerequisite changes from upstream commit
-94c6e9cf0440 ("accel/tcg: Send the CPUTLBEntryFull struct into
-io_prepare()") needed for the fix to apply cleanly.
-
-Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/854cd16e318eed12de2995014b28d9f374c64bf7]
-
-Signed-off-by: Jim Shu <jim.shu@sifive.com>
-Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-Tested-by: Mark Burton <mburton@qti.qualcomm.com>
-Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
-Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-Signed-off-by: Quan Sun <Quan.Sun@windriver.com>
----
- accel/tcg/cputlb.c | 32 +++++++++++++++-----------------
- include/accel/tcg/iommu.h | 15 ---------------
- include/exec/cputlb.h | 4 ++--
- include/hw/core/cpu.h | 17 +++++++++--------
- system/physmem.c | 25 -------------------------
- 5 files changed, 26 insertions(+), 67 deletions(-)
-
-diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
-index fd1606c85..fa0f4d8b3 100644
---- a/accel/tcg/cputlb.c
-+++ b/accel/tcg/cputlb.c
-@@ -1089,7 +1089,7 @@ void tlb_set_page_full(CPUState *cpu, int mmu_idx,
- }
- } else {
- /* I/O or ROMD */
-- iotlb = memory_region_section_get_iotlb(cpu, section) + xlat;
-+ iotlb = xlat;
- /*
- * Writes to romd devices must go through MMIO to enable write.
- * Reads to romd devices go through the ram_ptr found above,
-@@ -1140,10 +1140,9 @@ void tlb_set_page_full(CPUState *cpu, int mmu_idx,
- /*
- * When memory region is ram, iotlb contains a TARGET_PAGE_BITS
- * aligned ram_addr_t of the page base of the target RAM.
-- * Otherwise, iotlb contains
-- * - a physical section number in the lower TARGET_PAGE_BITS
-- * - the offset within section->mr of the page base (I/O, ROMD) with the
-- * TARGET_PAGE_BITS masked off.
-+ * Otherwise, iotlb contains a TARGET_PAGE_BITS aligned
-+ * offset within section->mr of the page base (I/O, ROMD)
-+ *
- * We subtract addr_page (which is page aligned and thus won't
- * disturb the low bits) to give an offset which can be added to the
- * (non-page-aligned) vaddr of the eventual memory access to get
-@@ -1153,7 +1152,8 @@ void tlb_set_page_full(CPUState *cpu, int mmu_idx,
- */
- desc->fulltlb[index] = *full;
- full = &desc->fulltlb[index];
-- full->xlat_section = iotlb - addr_page;
-+ full->xlat_offset = iotlb - addr_page;
-+ full->section = section;
- full->phys_addr = paddr_page;
-
- /* Now calculate the new entry */
-@@ -1269,14 +1269,14 @@ static inline void cpu_unaligned_access(CPUState *cpu, vaddr addr,
- }
-
- static MemoryRegionSection *
--io_prepare(hwaddr *out_offset, CPUState *cpu, hwaddr xlat,
-+io_prepare(hwaddr *out_offset, CPUState *cpu, CPUTLBEntryFull *full,
- MemTxAttrs attrs, vaddr addr, uintptr_t retaddr)
- {
- MemoryRegionSection *section;
- hwaddr mr_offset;
-
-- section = iotlb_to_section(cpu, xlat, attrs);
-- mr_offset = (xlat & TARGET_PAGE_MASK) + addr;
-+ section = full->section;
-+ mr_offset = full->xlat_offset + addr;
- cpu->mem_io_pc = retaddr;
- if (!cpu->neg.can_do_io) {
- cpu_io_recompile(cpu, retaddr);
-@@ -1335,7 +1335,7 @@ static bool victim_tlb_hit(CPUState *cpu, size_t mmu_idx, size_t index,
- static void notdirty_write(CPUState *cpu, vaddr mem_vaddr, unsigned size,
- CPUTLBEntryFull *full, uintptr_t retaddr)
- {
-- ram_addr_t ram_addr = mem_vaddr + full->xlat_section;
-+ ram_addr_t ram_addr = mem_vaddr + full->xlat_offset;
-
- trace_memory_notdirty_write_access(mem_vaddr, ram_addr, size);
-
-@@ -1592,9 +1592,7 @@ bool tlb_plugin_lookup(CPUState *cpu, vaddr addr, int mmu_idx,
-
- /* We must have an iotlb entry for MMIO */
- if (tlb_addr & TLB_MMIO) {
-- MemoryRegionSection *section =
-- iotlb_to_section(cpu, full->xlat_section & ~TARGET_PAGE_MASK,
-- full->attrs);
-+ MemoryRegionSection *section = full->section;
- data->is_io = true;
- data->mr = section->mr;
- } else {
-@@ -1980,7 +1978,7 @@ static uint64_t do_ld_mmio_beN(CPUState *cpu, CPUTLBEntryFull *full,
- tcg_debug_assert(size > 0 && size <= 8);
-
- attrs = full->attrs;
-- section = io_prepare(&mr_offset, cpu, full->xlat_section, attrs, addr, ra);
-+ section = io_prepare(&mr_offset, cpu, full, attrs, addr, ra);
- mr = section->mr;
-
- BQL_LOCK_GUARD();
-@@ -2001,7 +1999,7 @@ static Int128 do_ld16_mmio_beN(CPUState *cpu, CPUTLBEntryFull *full,
- tcg_debug_assert(size > 8 && size <= 16);
-
- attrs = full->attrs;
-- section = io_prepare(&mr_offset, cpu, full->xlat_section, attrs, addr, ra);
-+ section = io_prepare(&mr_offset, cpu, full, attrs, addr, ra);
- mr = section->mr;
-
- BQL_LOCK_GUARD();
-@@ -2521,7 +2519,7 @@ static uint64_t do_st_mmio_leN(CPUState *cpu, CPUTLBEntryFull *full,
- tcg_debug_assert(size > 0 && size <= 8);
-
- attrs = full->attrs;
-- section = io_prepare(&mr_offset, cpu, full->xlat_section, attrs, addr, ra);
-+ section = io_prepare(&mr_offset, cpu, full, attrs, addr, ra);
- mr = section->mr;
-
- BQL_LOCK_GUARD();
-@@ -2541,7 +2539,7 @@ static uint64_t do_st16_mmio_leN(CPUState *cpu, CPUTLBEntryFull *full,
- tcg_debug_assert(size > 8 && size <= 16);
-
- attrs = full->attrs;
-- section = io_prepare(&mr_offset, cpu, full->xlat_section, attrs, addr, ra);
-+ section = io_prepare(&mr_offset, cpu, full, attrs, addr, ra);
- mr = section->mr;
-
- BQL_LOCK_GUARD();
-diff --git a/include/accel/tcg/iommu.h b/include/accel/tcg/iommu.h
-index 90cfd6c0e..547f8ea0e 100644
---- a/include/accel/tcg/iommu.h
-+++ b/include/accel/tcg/iommu.h
-@@ -14,18 +14,6 @@
- #include "exec/hwaddr.h"
- #include "exec/memattrs.h"
-
--/**
-- * iotlb_to_section:
-- * @cpu: CPU performing the access
-- * @index: TCG CPU IOTLB entry
-- *
-- * Given a TCG CPU IOTLB entry, return the MemoryRegionSection that
-- * it refers to. @index will have been initially created and returned
-- * by memory_region_section_get_iotlb().
-- */
--MemoryRegionSection *iotlb_to_section(CPUState *cpu,
-- hwaddr index, MemTxAttrs attrs);
--
- MemoryRegionSection *address_space_translate_for_iotlb(CPUState *cpu,
- int asidx,
- hwaddr addr,
-@@ -34,8 +22,5 @@ MemoryRegionSection *address_space_translate_for_iotlb(CPUState *cpu,
- MemTxAttrs attrs,
- int *prot);
-
--hwaddr memory_region_section_get_iotlb(CPUState *cpu,
-- MemoryRegionSection *section);
--
- #endif
-
-diff --git a/include/exec/cputlb.h b/include/exec/cputlb.h
-index 9bec0e789..16f866990 100644
---- a/include/exec/cputlb.h
-+++ b/include/exec/cputlb.h
-@@ -43,8 +43,8 @@ void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length);
- * @full: the details of the tlb entry
- *
- * Add an entry to @cpu tlb index @mmu_idx. All of the fields of
-- * @full must be filled, except for xlat_section, and constitute
-- * the complete description of the translated page.
-+ * @full must be filled, except for xlat_offset & section, and
-+ * constitute the complete description of the translated page.
- *
- * This is generally called by the target tlb_fill function after
- * having performed a successful page table walk to find the physical
-diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
-index 961505177..a3db3f66f 100644
---- a/include/hw/core/cpu.h
-+++ b/include/hw/core/cpu.h
-@@ -214,15 +214,16 @@ typedef uint32_t MMUIdxMap;
- */
- struct CPUTLBEntryFull {
- /*
-- * @xlat_section contains:
-- * - in the lower TARGET_PAGE_BITS, a physical section number
-- * - with the lower TARGET_PAGE_BITS masked off, an offset which
-- * must be added to the virtual address to obtain:
-- * + the ram_addr_t of the target RAM (if the physical section
-- * number is PHYS_SECTION_NOTDIRTY or PHYS_SECTION_ROM)
-- * + the offset within the target MemoryRegion (otherwise)
-+ * @xlat_offset: TARGET_PAGE_BITS aligned offset which must be added to
-+ * the virtual address to obtain:
-+ * + the ram_addr_t of the target RAM (if the physical section
-+ * number is PHYS_SECTION_NOTDIRTY or PHYS_SECTION_ROM)
-+ * + the offset within the target MemoryRegion (otherwise)
- */
-- hwaddr xlat_section;
-+ hwaddr xlat_offset;
-+
-+ /* @section contains physical section. */
-+ MemoryRegionSection *section;
-
- /*
- * @phys_addr contains the physical address in the address space
-diff --git a/system/physmem.c b/system/physmem.c
-index c9869e404..a21e7ca64 100644
---- a/system/physmem.c
-+++ b/system/physmem.c
-@@ -748,31 +748,6 @@ translate_fail:
- return &d->map.sections[PHYS_SECTION_UNASSIGNED];
- }
-
--MemoryRegionSection *iotlb_to_section(CPUState *cpu,
-- hwaddr index, MemTxAttrs attrs)
--{
-- int asidx = cpu_asidx_from_attrs(cpu, attrs);
-- CPUAddressSpace *cpuas = &cpu->cpu_ases[asidx];
-- AddressSpaceDispatch *d = address_space_to_dispatch(cpuas->as);
-- int section_index = index & ~TARGET_PAGE_MASK;
-- MemoryRegionSection *ret;
--
-- assert(section_index < d->map.sections_nb);
-- ret = d->map.sections + section_index;
-- assert(ret->mr);
-- assert(ret->mr->ops);
--
-- return ret;
--}
--
--/* Called from RCU critical section */
--hwaddr memory_region_section_get_iotlb(CPUState *cpu,
-- MemoryRegionSection *section)
--{
-- AddressSpaceDispatch *d = flatview_to_dispatch(section->fv);
-- return section - d->map.sections;
--}
--
- #endif /* CONFIG_TCG */
-
- void cpu_address_space_init(CPUState *cpu, int asidx,
---
-2.43.0
diff --git a/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch b/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
deleted file mode 100644
index 47d6f41385..0000000000
--- a/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From c333f9c4ee212297f3b9a8a6ef62396a63c48e61 Mon Sep 17 00:00:00 2001
-From: Jim MacArthur <jim.macarthur@linaro.org>
-Date: Tue, 6 Jan 2026 15:40:48 +0000
-Subject: [PATCH] linux-user/elfload.c: Correction to HWCAP2 accessor
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-get_elf_hwcap was used when get_elf_hwcap2 should have been.
-
-Cc: qemu-stable@nongnu.org
-Fixes: fcac98d0ba8b ("linux-user: Remove ELF_HWCAP2")
-Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3259
-Signed-off-by: Jim MacArthur <jim.macarthur@linaro.org>
-Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
-Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
-Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
-Message-ID: <20260106-fix-hwcap2-sve2-v1-1-1d70dff63370@linaro.org>
-
-Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/c333f9c4ee212297f3b9a8a6ef62396a63c48e61]
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- linux-user/elfload.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/linux-user/elfload.c b/linux-user/elfload.c
-index 0002d5be2f..35471c0c9a 100644
---- a/linux-user/elfload.c
-+++ b/linux-user/elfload.c
-@@ -708,7 +708,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
- NEW_AUX_ENT(AT_EXECFN, info->file_string);
-
- if (HAVE_ELF_HWCAP2) {
-- NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap(thread_cpu));
-+ NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap2(thread_cpu));
- }
- if (u_base_platform) {
- NEW_AUX_ENT(AT_BASE_PLATFORM, u_base_platform);
---
-2.34.1
-
diff --git a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
index bc8dace013..40b08cd247 100644
--- a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
+++ b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
@@ -1,10 +1,10 @@
-From f2d9bc614f7edf66412209aba78aa086e65dc75e Mon Sep 17 00:00:00 2001
+From a84184c98cf296954e0c757604e969b8565eb474 Mon Sep 17 00:00:00 2001
From: Jason Wessel <jason.wessel@windriver.com>
Date: Fri, 28 Mar 2014 17:42:43 +0800
Subject: [PATCH] qemu: Add addition environment space to boot loader
qemu-system-mips
-Upstream-Status: Inappropriate - OE uses deep paths
+Upstream-Status: Inappropriate [OE uses deep paths]
If you create a project with very long directory names like 128 characters
deep and use NFS, the kernel arguments will be truncated. The kernel will
@@ -18,10 +18,10 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/mips/malta.c b/hw/mips/malta.c
-index cbdbb2105..62681fdae 100644
+index 812ff64d8..daf929943 100644
--- a/hw/mips/malta.c
+++ b/hw/mips/malta.c
-@@ -65,7 +65,7 @@
+@@ -66,7 +66,7 @@
#define ENVP_PADDR 0x2000
#define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
#define ENVP_NB_ENTRIES 16
diff --git a/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
index bfc85f4842..ad00f24482 100644
--- a/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
+++ b/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
@@ -1,4 +1,4 @@
-From 945af9ecc80653955cbdbb7d3e28dce61795b251 Mon Sep 17 00:00:00 2001
+From 0a688e763d91c2e0e11cbe960f405442a9f35417 Mon Sep 17 00:00:00 2001
From: Mark Asselstine <mark.asselstine@windriver.com>
Date: Tue, 26 Feb 2013 11:43:28 -0500
Subject: [PATCH] apic: fixup fallthrough to PIC
@@ -33,10 +33,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
-index aad253a..212b01f 100644
+index 8766ed00b..581fc6deb 100644
--- a/hw/intc/apic.c
+++ b/hw/intc/apic.c
-@@ -740,7 +740,7 @@ int apic_accept_pic_intr(APICCommonState *s)
+@@ -741,7 +741,7 @@ int apic_accept_pic_intr(APICCommonState *s)
{
uint32_t lvt0;
diff --git a/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch b/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
index 2e738abaa3..4b6ac54445 100644
--- a/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
+++ b/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
@@ -1,4 +1,4 @@
-From f8c1614b204c1d64af906dc70dbf4a1534eb6b38 Mon Sep 17 00:00:00 2001
+From b38315a5a6f9fc033c72bb94ff258bb4b1ac8dd3 Mon Sep 17 00:00:00 2001
From: Oleksiy Obitotskyy <oobitots@cisco.com>
Date: Wed, 25 Mar 2020 21:21:35 +0200
Subject: [PATCH] qemu: Do not include file if not exists
@@ -16,10 +16,10 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
1 file changed, 2 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index c236b2834..2a3527a87 100644
+index f4b74ad35..3da51ea83 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
-@@ -119,7 +119,9 @@
+@@ -117,7 +117,9 @@
#include <linux/blkpg.h>
#include <netpacket/packet.h>
#include <linux/netlink.h>
diff --git a/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch b/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
index ffbbb1ab32..59236999f9 100644
--- a/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
+++ b/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
@@ -1,4 +1,4 @@
-From 3621615790270449bf9c8a0777e8ef28eb762bf9 Mon Sep 17 00:00:00 2001
+From e4abb937ba5a6a476d31886e71e67006df22a664 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Fri, 8 Jan 2021 17:27:06 +0000
Subject: [PATCH] qemu: Add some user space mmap tweaks to address musl 32 bit
@@ -16,32 +16,24 @@ A better return value for the other cases of invalid addresses is EINVAL
rather than ENOMEM so adjust the other part of the test to this.
Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01355.html]
-Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
- linux-user/mmap.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
+ linux-user/mmap.c | 5 +++++
+ 1 file changed, 5 insertions(+)
diff --git a/linux-user/mmap.c b/linux-user/mmap.c
-index 002e1e668..912839dec 100644
+index b635b6a21..a5a617516 100644
--- a/linux-user/mmap.c
+++ b/linux-user/mmap.c
-@@ -1109,12 +1109,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
+@@ -1113,6 +1113,11 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
int prot;
void *host_addr;
-- if (!guest_range_valid_untagged(old_addr, old_size) ||
-- ((flags & MREMAP_FIXED) &&
+ if (!guest_range_valid_untagged(old_addr, old_size)) {
+ errno = EFAULT;
+ return -1;
+ }
-+
-+ if (((flags & MREMAP_FIXED) &&
++
+ if (((flags & MREMAP_FIXED) &&
!guest_range_valid_untagged(new_addr, new_size)) ||
((flags & MREMAP_MAYMOVE) == 0 &&
- !guest_range_valid_untagged(old_addr, new_size))) {
-- errno = ENOMEM;
-+ errno = EINVAL;
- return -1;
- }
-
diff --git a/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch b/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
index 5b24c18916..0d7974fcdc 100644
--- a/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
+++ b/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
@@ -1,4 +1,4 @@
-From 8b28a9376074067bc2d84d4f77d5c7a42433b31b Mon Sep 17 00:00:00 2001
+From e891928d2248e186c65979cf5a2ba0cff9d00824 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Mon, 1 Mar 2021 13:00:47 +0000
Subject: [PATCH] qemu: Determinism fixes
@@ -11,6 +11,8 @@ meson to pass relative paths but we can fix that in the script.
Upstream-Status: Pending [some version of all/part of this may be accepted]
RP 2021/3/1
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
scripts/decodetree.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
index a58c936d06..275c500894 100644
--- a/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
+++ b/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
@@ -1,4 +1,4 @@
-From 097b75ad8310143decab92f6d1744144e7a4809f Mon Sep 17 00:00:00 2001
+From ac9a866ac807cb1542f26df07b4aad3a06342a99 Mon Sep 17 00:00:00 2001
From: Changqing Li <changqing.li@windriver.com>
Date: Thu, 14 Jan 2021 06:33:04 +0000
Subject: [PATCH] tests/meson.build: use relative path to refer to files
@@ -17,10 +17,10 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/unit/meson.build b/tests/unit/meson.build
-index d5248ae51..2c581f055 100644
+index 41e8b06c3..ce5df4957 100644
--- a/tests/unit/meson.build
+++ b/tests/unit/meson.build
-@@ -127,17 +127,17 @@ endif
+@@ -124,17 +124,17 @@ endif
if have_system
tests += {
diff --git a/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
index af0eafb65f..f6e563ad80 100644
--- a/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
+++ b/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
@@ -1,4 +1,4 @@
-From 9d5deb767523ea0d1aeecb9960244c702530acad Mon Sep 17 00:00:00 2001
+From c0bfd2c5556afcf4413c81b3fda54a62f2bdd8c8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 21 Mar 2022 10:09:38 -0700
Subject: [PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux
diff --git a/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch b/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
index db88766cf6..430b1aa509 100644
--- a/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
+++ b/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
@@ -1,4 +1,4 @@
-From aaec67c133dddda7204d23964732b4b788cbc9ce Mon Sep 17 00:00:00 2001
+From e357ac91b04f733148defe8c133ae8b2085a9a23 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <martin@geanix.com>
Date: Wed, 22 May 2024 14:02:55 +0200
Subject: [PATCH] configure: lookup meson exutable from PATH
@@ -13,10 +13,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/configure b/configure
-index 82cace1..83bbda9 100755
+index eea903067..217af781f 100755
--- a/configure
+++ b/configure
-@@ -993,10 +993,7 @@ get_pwd() {
+@@ -981,10 +981,7 @@ get_pwd() {
fi
}
@@ -26,5 +26,5 @@ index 82cace1..83bbda9 100755
-fi
+meson=`which meson`
- # Conditionally ensure Sphinx is installed.
-
+ # On Haiku, meson might show up in a "non-packaged" subfolder instead, see
+ # https://github.com/haiku/haiku/blob/r1beta5/docs/user/storage/storageintro.dox
diff --git a/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch b/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
index d04596d313..040931a941 100644
--- a/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
+++ b/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
@@ -1,4 +1,4 @@
-From c9f174b2f7b43e59e91f88c75c8b3e2ee30bfcdd Mon Sep 17 00:00:00 2001
+From 70fa360e5bf72b28960747da47d9b85e650ad312 Mon Sep 17 00:00:00 2001
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Date: Wed, 22 May 2024 13:58:23 +0200
Subject: [PATCH] qemu: Ensure pip and the python venv aren't used for meson
@@ -29,10 +29,10 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure b/configure
-index 84e429409..1a9585e8e 100755
+index 217af781f..cf8666337 100755
--- a/configure
+++ b/configure
-@@ -981,14 +981,14 @@ python="$(command -v "$python")"
+@@ -951,14 +951,14 @@ python="$(command -v "$python")"
echo "python determined to be '$python'"
echo "python version: $($python --version)"
@@ -47,5 +47,5 @@ index 84e429409..1a9585e8e 100755
-mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
+mkvenv=true
- # Finish preparing the virtual environment using vendored .whl files
-
+ # Finish preparing the virtual environment using vendored .whl files.
+ # Even if PyPI is allowed, we disallow it here to force installation
diff --git a/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch b/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
deleted file mode 100644
index 524e20a3dd..0000000000
--- a/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 475dbdbee7ff878d113f45a1a623e9abbf0e55f3 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Wed, 18 Sep 2024 16:19:37 -0700
-Subject: [PATCH] target/riscv/kvm: do not use non-portable strerrorname_np()
-
-strerrorname_np is non-portable and breaks building with musl libc.
-
-Use strerror(errno) instead, like we do other places.
-
-Upstream-Status: Submitted [https://mail.gnu.org/archive/html/qemu-stable/2023-12/msg00069.html]
-
-Cc: qemu-stable@nongnu.org
-Fixes: commit 082e9e4a58ba (target/riscv/kvm: improve 'init_multiext_cfg' error
-msg)
-Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2041
-Buglink: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15541
-Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
----
- target/riscv/kvm/kvm-cpu.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c
-index e06d2126b..e1cc02fba 100644
---- a/target/riscv/kvm/kvm-cpu.c
-+++ b/target/riscv/kvm/kvm-cpu.c
-@@ -1994,8 +1994,7 @@ static bool kvm_cpu_realize(CPUState *cs, Error **errp)
- if (riscv_has_ext(&cpu->env, RVV)) {
- ret = prctl(PR_RISCV_V_SET_CONTROL, PR_RISCV_V_VSTATE_CTRL_ON);
- if (ret) {
-- error_setg(errp, "Error in prctl PR_RISCV_V_SET_CONTROL, code: %s",
-- strerrorname_np(errno));
-+ error_setg(errp, "Error in prctl PR_RISCV_V_SET_CONTROL, error %d", errno);
- return false;
- }
- }
diff --git a/meta/recipes-devtools/qemu/qemu_10.2.0.bb b/meta/recipes-devtools/qemu/qemu_11.0.0.bb
similarity index 100%
rename from meta/recipes-devtools/qemu/qemu_10.2.0.bb
rename to meta/recipes-devtools/qemu/qemu_11.0.0.bb
--
2.49.0
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0
2026-05-15 15:48 Quan.Sun
@ 2026-05-15 16:24 ` Alexander Kanavin
2026-05-15 19:15 ` Quan Sun
0 siblings, 1 reply; 13+ messages in thread
From: Alexander Kanavin @ 2026-05-15 16:24 UTC (permalink / raw)
To: Quan.Sun; +Cc: openembedded-core
On Fri, 15 May 2026 at 17:49, Quan Sun via lists.openembedded.org
<Quan.Sun=windriver.com@lists.openembedded.org> wrote:
> - Add python3-qemu-qmp recipe (0.0.6) as a separate package. The QMP
> Python library was removed from the QEMU source tree in 11.0.0 and
> split into its own upstream project. This is needed by
> qemu-system-native for testimage integration.
> +++ b/meta/recipes-devtools/qemu/python3-qemu-qmp_0.0.6.bb
> @@ -0,0 +1,30 @@
> +SUMMARY = "QEMU Monitor Protocol Python library"
> +DESCRIPTION = "An asyncio library for communicating with QEMU Monitor Protocol (QMP). \
> +This library was split out of the QEMU source tree to provide a reference QMP \
> +implementation usable both within and outside of the QEMU source tree."
> +HOMEPAGE = "https://gitlab.com/qemu-project/python-qemu-qmp"
> +LICENSE = "LGPL-2.0-only & GPL-2.0-only"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=4cf66a4984120007c9881cc871cf49db"
> +
> +SRC_URI = "git://gitlab.com/qemu-project/python-qemu-qmp.git;protocol=https;branch=main"
> +SRCREV = "82006cb788d27b090a8b84fc7831feb9c528bcdc"
Thanks!
This is available on pypi:
https://pypi.org/project/qemu.qmp/
so the recipe should use the pypi bbclass to download the appropriate
package (there's lots of examples in oe-core).
Also newly added recipes need a maintainers.inc entry:
https://git.openembedded.org/openembedded-core/tree/meta/conf/distro/include/maintainers.inc
Alex
> +
> +inherit python_setuptools_build_meta
> +
> +DEPENDS += "python3-setuptools-scm-native"
> +
> +# setuptools_scm needs this when building from git without tags in the clone
> +SETUPTOOLS_SCM_PRETEND_VERSION = "0.0.6"
> +
> +RDEPENDS:${PN} += "python3-core python3-asyncio"
> +
> +# Install to the custom path expected by oeqa/utils/qemurunner.py
> +# which imports "qmp.legacy" from ${libdir}/qemu-python/
> +do_install:append:class-native() {
> + install -d ${D}${libdir}/qemu-python/qmp/
> + cp -R --no-dereference --preserve=mode,links ${S}/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
> +}
> +
> +FILES:${PN}:append:class-native = " ${libdir}/qemu-python"
> +
> +BBCLASSEXTEND = "native nativesdk"
> diff --git a/meta/recipes-devtools/qemu/qemu-native_10.2.0.bb b/meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
> similarity index 99%
> rename from meta/recipes-devtools/qemu/qemu-native_10.2.0.bb
> rename to meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
> index 26fa84c180..a77953529b 100644
> --- a/meta/recipes-devtools/qemu/qemu-native_10.2.0.bb
> +++ b/meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
> @@ -7,4 +7,3 @@ require qemu-native.inc
> EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-install-blobs --disable-guest-agent"
>
> PACKAGECONFIG ??= "pie"
> -
> diff --git a/meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
> similarity index 85%
> rename from meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb
> rename to meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
> index 2e4f7328ad..7947499c5f 100644
> --- a/meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb
> +++ b/meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
> @@ -5,7 +5,7 @@ require qemu-native.inc
> # As some of the files installed by qemu-native and qemu-system-native
> # are the same, we depend on qemu-native to get the full installation set
> # and avoid file clashes
> -DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native"
> +DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native python3-qemu-qmp-native"
>
> EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
>
> @@ -25,9 +25,4 @@ do_install:append() {
> rm -rf ${D}${datadir}/qemu/dtb
> rm -rf ${D}${datadir}/icons/
> rm -rf ${D}${includedir}/qemu-plugin.h
> -
> - # Install qmp.py to be used with testimage
> - install -d ${D}${libdir}/qemu-python/qmp/
> - install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
> }
> -
> diff --git a/meta/recipes-devtools/qemu/qemu-targets.inc b/meta/recipes-devtools/qemu/qemu-targets.inc
> index 50e5eb6796..937ef1a911 100644
> --- a/meta/recipes-devtools/qemu/qemu-targets.inc
> +++ b/meta/recipes-devtools/qemu/qemu-targets.inc
> @@ -25,6 +25,10 @@ def get_qemu_target_list(d):
> archs.remove(arch)
> if 'linux' not in tos:
> return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',')
> + # QEMU 11.0.0+ only supports linux-user on 64-bit host architectures
> + linux_user_hosts = ['aarch64', 'loongarch64', 'mips64', 'ppc64', 'riscv64', 's390x', 'sparc64', 'x86_64']
> + if tarch not in linux_user_hosts:
> + return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',')
> return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',')
>
> def get_qemu_usermode_target_list(d):
> diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
> index 5f30416a48..1e5890f15a 100644
> --- a/meta/recipes-devtools/qemu/qemu.inc
> +++ b/meta/recipes-devtools/qemu/qemu.inc
> @@ -4,6 +4,7 @@ machine's processor through dynamic binary translation and provides a set \
> of different hardware and device models for the machine, enabling it to run \
> a variety of guest operating systems"
> HOMEPAGE = "http://qemu.org"
> +BUGTRACKER = "https://gitlab.com/qemu-project/qemu/-/issues"
> LICENSE = "GPL-2.0-only & LGPL-2.1-only"
>
> DEPENDS += "bison-native meson-native ninja-native"
> @@ -22,7 +23,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a3b50d8b88dcc0eb3d7d39b760b9e821 \
> SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
> file://powerpc_rom.bin \
> file://run-ptest \
> - file://fix-strerrorname_np.patch \
> file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
> file://0002-apic-fixup-fallthrough-to-PIC.patch \
> file://0004-qemu-Do-not-include-file-if-not-exists.patch \
> @@ -32,8 +32,6 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
> file://0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \
> file://0010-configure-lookup-meson-exutable-from-PATH.patch \
> file://0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch \
> - file://0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch \
> - file://0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch \
> file://qemu-guest-agent.init \
> file://qemu-guest-agent.udev \
> "
> @@ -41,7 +39,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
> UPSTREAM_CHECK_URI = "https://www.qemu.org"
> UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
>
> -SRC_URI[sha256sum] = "9e30ad1b8b9f7b4463001582d1ab297f39cfccea5d08540c0ca6d6672785883a"
> +SRC_URI[sha256sum] = "c04ca36012653f32d11c674d370cf52a710e7d3f18c2d8b63e4932052a4854d6"
>
> CVE_STATUS[CVE-2007-0998] = "not-applicable-config: The VNC server can expose host files uder some circumstances. We don't enable it by default."
>
> @@ -61,6 +59,9 @@ COMPATIBLE_HOST:mipsarchn32 = "null"
> COMPATIBLE_HOST:mipsarchn64 = "null"
> COMPATIBLE_HOST:riscv32 = "null"
>
> +# QEMU 11.0.0+ requires a 64-bit host architecture for emulator builds
> +COMPATIBLE_HOST:class-target = "(aarch64|x86_64|ppc64|riscv64|loongarch64|mips64|s390x|sparc64).*-linux"
> +
> # Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html
> # upstream states qemu doesn't work without optimization
> DEBUG_BUILD = "0"
> @@ -75,7 +76,7 @@ do_install_ptest() {
> find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {}
>
> # Don't check the file genreated by configure
> - sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh
> + sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemble-aml.sh
>
> # Strip the paths from the QEMU variable, we can use PATH
> makfiles=$(find ${D}${PTEST_PATH} -name "*.mak")
> @@ -119,8 +120,8 @@ EXTRA_OECONF = " \
> ${PACKAGECONFIG_CONFARGS} \
> "
>
> -EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX}"
> -EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX}"
> +EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX} --cpu=${TUNE_ARCH}"
> +EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX} --cpu=${SDK_ARCH}"
>
> B = "${WORKDIR}/build"
>
> @@ -130,7 +131,7 @@ do_configure:prepend:class-native() {
> # Append build host pkg-config paths for native target since the host may provide sdl
> BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
> if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
> - export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:$BHOST_PKGCONFIG_PATH
> + export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
> fi
> }
>
> diff --git a/meta/recipes-devtools/qemu/qemu/0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch b/meta/recipes-devtools/qemu/qemu/0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch
> deleted file mode 100644
> index d19f872fc3..0000000000
> --- a/meta/recipes-devtools/qemu/qemu/0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch
> +++ /dev/null
> @@ -1,274 +0,0 @@
> -From 858e6bb252e075e09cca6e78299151d3af0bf5fb Mon Sep 17 00:00:00 2001
> -From: Quan Sun <Quan.Sun@windriver.com>
> -Date: Tue, 28 Apr 2026 14:56:36 -0400
> -Subject: [PATCH] accel/tcg: Fix iotlb_to_section() for different AddressSpace
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -'CPUTLBEntryFull.xlat_section' stores section_index in last 12 bits to
> -find the correct section when CPU access the IO region over the IOTLB.
> -However, section_index is only unique inside single AddressSpace. If
> -address space translation is over IOMMUMemoryRegion, it could return
> -section from other AddressSpace. 'iotlb_to_section()' API only finds the
> -sections from CPU's AddressSpace so that it couldn't find section in
> -other AddressSpace. Thus, using 'iotlb_to_section()' API will find the
> -wrong section and QEMU will have wrong load/store access.
> -
> -To fix this bug of iotlb_to_section(), store complete MemoryRegionSection
> -pointer in CPUTLBEntryFull to replace the section_index in xlat_section.
> -Rename 'xlat_section' to 'xlat_offset' as we remove last 12 bits
> -section_index inside. Also, since we directly use section pointer in the
> -CPUTLBEntryFull (full->section), we can remove the unused functions:
> -iotlb_to_section(), memory_region_section_get_iotlb().
> -
> -This bug occurs only when
> -(1) IOMMUMemoryRegion is in the path of CPU access.
> -(2) IOMMUMemoryRegion returns different target_as and the section is in
> -the IO region.
> -
> -This patch incorporates prerequisite changes from upstream commit
> -94c6e9cf0440 ("accel/tcg: Send the CPUTLBEntryFull struct into
> -io_prepare()") needed for the fix to apply cleanly.
> -
> -Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/854cd16e318eed12de2995014b28d9f374c64bf7]
> -
> -Signed-off-by: Jim Shu <jim.shu@sifive.com>
> -Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> -Tested-by: Mark Burton <mburton@qti.qualcomm.com>
> -Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
> -Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> -Signed-off-by: Quan Sun <Quan.Sun@windriver.com>
> ----
> - accel/tcg/cputlb.c | 32 +++++++++++++++-----------------
> - include/accel/tcg/iommu.h | 15 ---------------
> - include/exec/cputlb.h | 4 ++--
> - include/hw/core/cpu.h | 17 +++++++++--------
> - system/physmem.c | 25 -------------------------
> - 5 files changed, 26 insertions(+), 67 deletions(-)
> -
> -diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
> -index fd1606c85..fa0f4d8b3 100644
> ---- a/accel/tcg/cputlb.c
> -+++ b/accel/tcg/cputlb.c
> -@@ -1089,7 +1089,7 @@ void tlb_set_page_full(CPUState *cpu, int mmu_idx,
> - }
> - } else {
> - /* I/O or ROMD */
> -- iotlb = memory_region_section_get_iotlb(cpu, section) + xlat;
> -+ iotlb = xlat;
> - /*
> - * Writes to romd devices must go through MMIO to enable write.
> - * Reads to romd devices go through the ram_ptr found above,
> -@@ -1140,10 +1140,9 @@ void tlb_set_page_full(CPUState *cpu, int mmu_idx,
> - /*
> - * When memory region is ram, iotlb contains a TARGET_PAGE_BITS
> - * aligned ram_addr_t of the page base of the target RAM.
> -- * Otherwise, iotlb contains
> -- * - a physical section number in the lower TARGET_PAGE_BITS
> -- * - the offset within section->mr of the page base (I/O, ROMD) with the
> -- * TARGET_PAGE_BITS masked off.
> -+ * Otherwise, iotlb contains a TARGET_PAGE_BITS aligned
> -+ * offset within section->mr of the page base (I/O, ROMD)
> -+ *
> - * We subtract addr_page (which is page aligned and thus won't
> - * disturb the low bits) to give an offset which can be added to the
> - * (non-page-aligned) vaddr of the eventual memory access to get
> -@@ -1153,7 +1152,8 @@ void tlb_set_page_full(CPUState *cpu, int mmu_idx,
> - */
> - desc->fulltlb[index] = *full;
> - full = &desc->fulltlb[index];
> -- full->xlat_section = iotlb - addr_page;
> -+ full->xlat_offset = iotlb - addr_page;
> -+ full->section = section;
> - full->phys_addr = paddr_page;
> -
> - /* Now calculate the new entry */
> -@@ -1269,14 +1269,14 @@ static inline void cpu_unaligned_access(CPUState *cpu, vaddr addr,
> - }
> -
> - static MemoryRegionSection *
> --io_prepare(hwaddr *out_offset, CPUState *cpu, hwaddr xlat,
> -+io_prepare(hwaddr *out_offset, CPUState *cpu, CPUTLBEntryFull *full,
> - MemTxAttrs attrs, vaddr addr, uintptr_t retaddr)
> - {
> - MemoryRegionSection *section;
> - hwaddr mr_offset;
> -
> -- section = iotlb_to_section(cpu, xlat, attrs);
> -- mr_offset = (xlat & TARGET_PAGE_MASK) + addr;
> -+ section = full->section;
> -+ mr_offset = full->xlat_offset + addr;
> - cpu->mem_io_pc = retaddr;
> - if (!cpu->neg.can_do_io) {
> - cpu_io_recompile(cpu, retaddr);
> -@@ -1335,7 +1335,7 @@ static bool victim_tlb_hit(CPUState *cpu, size_t mmu_idx, size_t index,
> - static void notdirty_write(CPUState *cpu, vaddr mem_vaddr, unsigned size,
> - CPUTLBEntryFull *full, uintptr_t retaddr)
> - {
> -- ram_addr_t ram_addr = mem_vaddr + full->xlat_section;
> -+ ram_addr_t ram_addr = mem_vaddr + full->xlat_offset;
> -
> - trace_memory_notdirty_write_access(mem_vaddr, ram_addr, size);
> -
> -@@ -1592,9 +1592,7 @@ bool tlb_plugin_lookup(CPUState *cpu, vaddr addr, int mmu_idx,
> -
> - /* We must have an iotlb entry for MMIO */
> - if (tlb_addr & TLB_MMIO) {
> -- MemoryRegionSection *section =
> -- iotlb_to_section(cpu, full->xlat_section & ~TARGET_PAGE_MASK,
> -- full->attrs);
> -+ MemoryRegionSection *section = full->section;
> - data->is_io = true;
> - data->mr = section->mr;
> - } else {
> -@@ -1980,7 +1978,7 @@ static uint64_t do_ld_mmio_beN(CPUState *cpu, CPUTLBEntryFull *full,
> - tcg_debug_assert(size > 0 && size <= 8);
> -
> - attrs = full->attrs;
> -- section = io_prepare(&mr_offset, cpu, full->xlat_section, attrs, addr, ra);
> -+ section = io_prepare(&mr_offset, cpu, full, attrs, addr, ra);
> - mr = section->mr;
> -
> - BQL_LOCK_GUARD();
> -@@ -2001,7 +1999,7 @@ static Int128 do_ld16_mmio_beN(CPUState *cpu, CPUTLBEntryFull *full,
> - tcg_debug_assert(size > 8 && size <= 16);
> -
> - attrs = full->attrs;
> -- section = io_prepare(&mr_offset, cpu, full->xlat_section, attrs, addr, ra);
> -+ section = io_prepare(&mr_offset, cpu, full, attrs, addr, ra);
> - mr = section->mr;
> -
> - BQL_LOCK_GUARD();
> -@@ -2521,7 +2519,7 @@ static uint64_t do_st_mmio_leN(CPUState *cpu, CPUTLBEntryFull *full,
> - tcg_debug_assert(size > 0 && size <= 8);
> -
> - attrs = full->attrs;
> -- section = io_prepare(&mr_offset, cpu, full->xlat_section, attrs, addr, ra);
> -+ section = io_prepare(&mr_offset, cpu, full, attrs, addr, ra);
> - mr = section->mr;
> -
> - BQL_LOCK_GUARD();
> -@@ -2541,7 +2539,7 @@ static uint64_t do_st16_mmio_leN(CPUState *cpu, CPUTLBEntryFull *full,
> - tcg_debug_assert(size > 8 && size <= 16);
> -
> - attrs = full->attrs;
> -- section = io_prepare(&mr_offset, cpu, full->xlat_section, attrs, addr, ra);
> -+ section = io_prepare(&mr_offset, cpu, full, attrs, addr, ra);
> - mr = section->mr;
> -
> - BQL_LOCK_GUARD();
> -diff --git a/include/accel/tcg/iommu.h b/include/accel/tcg/iommu.h
> -index 90cfd6c0e..547f8ea0e 100644
> ---- a/include/accel/tcg/iommu.h
> -+++ b/include/accel/tcg/iommu.h
> -@@ -14,18 +14,6 @@
> - #include "exec/hwaddr.h"
> - #include "exec/memattrs.h"
> -
> --/**
> -- * iotlb_to_section:
> -- * @cpu: CPU performing the access
> -- * @index: TCG CPU IOTLB entry
> -- *
> -- * Given a TCG CPU IOTLB entry, return the MemoryRegionSection that
> -- * it refers to. @index will have been initially created and returned
> -- * by memory_region_section_get_iotlb().
> -- */
> --MemoryRegionSection *iotlb_to_section(CPUState *cpu,
> -- hwaddr index, MemTxAttrs attrs);
> --
> - MemoryRegionSection *address_space_translate_for_iotlb(CPUState *cpu,
> - int asidx,
> - hwaddr addr,
> -@@ -34,8 +22,5 @@ MemoryRegionSection *address_space_translate_for_iotlb(CPUState *cpu,
> - MemTxAttrs attrs,
> - int *prot);
> -
> --hwaddr memory_region_section_get_iotlb(CPUState *cpu,
> -- MemoryRegionSection *section);
> --
> - #endif
> -
> -diff --git a/include/exec/cputlb.h b/include/exec/cputlb.h
> -index 9bec0e789..16f866990 100644
> ---- a/include/exec/cputlb.h
> -+++ b/include/exec/cputlb.h
> -@@ -43,8 +43,8 @@ void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length);
> - * @full: the details of the tlb entry
> - *
> - * Add an entry to @cpu tlb index @mmu_idx. All of the fields of
> -- * @full must be filled, except for xlat_section, and constitute
> -- * the complete description of the translated page.
> -+ * @full must be filled, except for xlat_offset & section, and
> -+ * constitute the complete description of the translated page.
> - *
> - * This is generally called by the target tlb_fill function after
> - * having performed a successful page table walk to find the physical
> -diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
> -index 961505177..a3db3f66f 100644
> ---- a/include/hw/core/cpu.h
> -+++ b/include/hw/core/cpu.h
> -@@ -214,15 +214,16 @@ typedef uint32_t MMUIdxMap;
> - */
> - struct CPUTLBEntryFull {
> - /*
> -- * @xlat_section contains:
> -- * - in the lower TARGET_PAGE_BITS, a physical section number
> -- * - with the lower TARGET_PAGE_BITS masked off, an offset which
> -- * must be added to the virtual address to obtain:
> -- * + the ram_addr_t of the target RAM (if the physical section
> -- * number is PHYS_SECTION_NOTDIRTY or PHYS_SECTION_ROM)
> -- * + the offset within the target MemoryRegion (otherwise)
> -+ * @xlat_offset: TARGET_PAGE_BITS aligned offset which must be added to
> -+ * the virtual address to obtain:
> -+ * + the ram_addr_t of the target RAM (if the physical section
> -+ * number is PHYS_SECTION_NOTDIRTY or PHYS_SECTION_ROM)
> -+ * + the offset within the target MemoryRegion (otherwise)
> - */
> -- hwaddr xlat_section;
> -+ hwaddr xlat_offset;
> -+
> -+ /* @section contains physical section. */
> -+ MemoryRegionSection *section;
> -
> - /*
> - * @phys_addr contains the physical address in the address space
> -diff --git a/system/physmem.c b/system/physmem.c
> -index c9869e404..a21e7ca64 100644
> ---- a/system/physmem.c
> -+++ b/system/physmem.c
> -@@ -748,31 +748,6 @@ translate_fail:
> - return &d->map.sections[PHYS_SECTION_UNASSIGNED];
> - }
> -
> --MemoryRegionSection *iotlb_to_section(CPUState *cpu,
> -- hwaddr index, MemTxAttrs attrs)
> --{
> -- int asidx = cpu_asidx_from_attrs(cpu, attrs);
> -- CPUAddressSpace *cpuas = &cpu->cpu_ases[asidx];
> -- AddressSpaceDispatch *d = address_space_to_dispatch(cpuas->as);
> -- int section_index = index & ~TARGET_PAGE_MASK;
> -- MemoryRegionSection *ret;
> --
> -- assert(section_index < d->map.sections_nb);
> -- ret = d->map.sections + section_index;
> -- assert(ret->mr);
> -- assert(ret->mr->ops);
> --
> -- return ret;
> --}
> --
> --/* Called from RCU critical section */
> --hwaddr memory_region_section_get_iotlb(CPUState *cpu,
> -- MemoryRegionSection *section)
> --{
> -- AddressSpaceDispatch *d = flatview_to_dispatch(section->fv);
> -- return section - d->map.sections;
> --}
> --
> - #endif /* CONFIG_TCG */
> -
> - void cpu_address_space_init(CPUState *cpu, int asidx,
> ---
> -2.43.0
> diff --git a/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch b/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
> deleted file mode 100644
> index 47d6f41385..0000000000
> --- a/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
> +++ /dev/null
> @@ -1,42 +0,0 @@
> -From c333f9c4ee212297f3b9a8a6ef62396a63c48e61 Mon Sep 17 00:00:00 2001
> -From: Jim MacArthur <jim.macarthur@linaro.org>
> -Date: Tue, 6 Jan 2026 15:40:48 +0000
> -Subject: [PATCH] linux-user/elfload.c: Correction to HWCAP2 accessor
> -MIME-Version: 1.0
> -Content-Type: text/plain; charset=UTF-8
> -Content-Transfer-Encoding: 8bit
> -
> -get_elf_hwcap was used when get_elf_hwcap2 should have been.
> -
> -Cc: qemu-stable@nongnu.org
> -Fixes: fcac98d0ba8b ("linux-user: Remove ELF_HWCAP2")
> -Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3259
> -Signed-off-by: Jim MacArthur <jim.macarthur@linaro.org>
> -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> -Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> -Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> -Message-ID: <20260106-fix-hwcap2-sve2-v1-1-1d70dff63370@linaro.org>
> -
> -Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/c333f9c4ee212297f3b9a8a6ef62396a63c48e61]
> -
> -Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
> ----
> - linux-user/elfload.c | 2 +-
> - 1 file changed, 1 insertion(+), 1 deletion(-)
> -
> -diff --git a/linux-user/elfload.c b/linux-user/elfload.c
> -index 0002d5be2f..35471c0c9a 100644
> ---- a/linux-user/elfload.c
> -+++ b/linux-user/elfload.c
> -@@ -708,7 +708,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
> - NEW_AUX_ENT(AT_EXECFN, info->file_string);
> -
> - if (HAVE_ELF_HWCAP2) {
> -- NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap(thread_cpu));
> -+ NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap2(thread_cpu));
> - }
> - if (u_base_platform) {
> - NEW_AUX_ENT(AT_BASE_PLATFORM, u_base_platform);
> ---
> -2.34.1
> -
> diff --git a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
> index bc8dace013..40b08cd247 100644
> --- a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
> +++ b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
> @@ -1,10 +1,10 @@
> -From f2d9bc614f7edf66412209aba78aa086e65dc75e Mon Sep 17 00:00:00 2001
> +From a84184c98cf296954e0c757604e969b8565eb474 Mon Sep 17 00:00:00 2001
> From: Jason Wessel <jason.wessel@windriver.com>
> Date: Fri, 28 Mar 2014 17:42:43 +0800
> Subject: [PATCH] qemu: Add addition environment space to boot loader
> qemu-system-mips
>
> -Upstream-Status: Inappropriate - OE uses deep paths
> +Upstream-Status: Inappropriate [OE uses deep paths]
>
> If you create a project with very long directory names like 128 characters
> deep and use NFS, the kernel arguments will be truncated. The kernel will
> @@ -18,10 +18,10 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/mips/malta.c b/hw/mips/malta.c
> -index cbdbb2105..62681fdae 100644
> +index 812ff64d8..daf929943 100644
> --- a/hw/mips/malta.c
> +++ b/hw/mips/malta.c
> -@@ -65,7 +65,7 @@
> +@@ -66,7 +66,7 @@
> #define ENVP_PADDR 0x2000
> #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
> #define ENVP_NB_ENTRIES 16
> diff --git a/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
> index bfc85f4842..ad00f24482 100644
> --- a/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
> +++ b/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
> @@ -1,4 +1,4 @@
> -From 945af9ecc80653955cbdbb7d3e28dce61795b251 Mon Sep 17 00:00:00 2001
> +From 0a688e763d91c2e0e11cbe960f405442a9f35417 Mon Sep 17 00:00:00 2001
> From: Mark Asselstine <mark.asselstine@windriver.com>
> Date: Tue, 26 Feb 2013 11:43:28 -0500
> Subject: [PATCH] apic: fixup fallthrough to PIC
> @@ -33,10 +33,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/hw/intc/apic.c b/hw/intc/apic.c
> -index aad253a..212b01f 100644
> +index 8766ed00b..581fc6deb 100644
> --- a/hw/intc/apic.c
> +++ b/hw/intc/apic.c
> -@@ -740,7 +740,7 @@ int apic_accept_pic_intr(APICCommonState *s)
> +@@ -741,7 +741,7 @@ int apic_accept_pic_intr(APICCommonState *s)
> {
> uint32_t lvt0;
>
> diff --git a/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch b/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
> index 2e738abaa3..4b6ac54445 100644
> --- a/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
> +++ b/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
> @@ -1,4 +1,4 @@
> -From f8c1614b204c1d64af906dc70dbf4a1534eb6b38 Mon Sep 17 00:00:00 2001
> +From b38315a5a6f9fc033c72bb94ff258bb4b1ac8dd3 Mon Sep 17 00:00:00 2001
> From: Oleksiy Obitotskyy <oobitots@cisco.com>
> Date: Wed, 25 Mar 2020 21:21:35 +0200
> Subject: [PATCH] qemu: Do not include file if not exists
> @@ -16,10 +16,10 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
> 1 file changed, 2 insertions(+)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> -index c236b2834..2a3527a87 100644
> +index f4b74ad35..3da51ea83 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> -@@ -119,7 +119,9 @@
> +@@ -117,7 +117,9 @@
> #include <linux/blkpg.h>
> #include <netpacket/packet.h>
> #include <linux/netlink.h>
> diff --git a/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch b/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
> index ffbbb1ab32..59236999f9 100644
> --- a/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
> +++ b/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
> @@ -1,4 +1,4 @@
> -From 3621615790270449bf9c8a0777e8ef28eb762bf9 Mon Sep 17 00:00:00 2001
> +From e4abb937ba5a6a476d31886e71e67006df22a664 Mon Sep 17 00:00:00 2001
> From: Richard Purdie <richard.purdie@linuxfoundation.org>
> Date: Fri, 8 Jan 2021 17:27:06 +0000
> Subject: [PATCH] qemu: Add some user space mmap tweaks to address musl 32 bit
> @@ -16,32 +16,24 @@ A better return value for the other cases of invalid addresses is EINVAL
> rather than ENOMEM so adjust the other part of the test to this.
>
> Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01355.html]
> -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> - linux-user/mmap.c | 10 +++++++---
> - 1 file changed, 7 insertions(+), 3 deletions(-)
> + linux-user/mmap.c | 5 +++++
> + 1 file changed, 5 insertions(+)
>
> diff --git a/linux-user/mmap.c b/linux-user/mmap.c
> -index 002e1e668..912839dec 100644
> +index b635b6a21..a5a617516 100644
> --- a/linux-user/mmap.c
> +++ b/linux-user/mmap.c
> -@@ -1109,12 +1109,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
> +@@ -1113,6 +1113,11 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
> int prot;
> void *host_addr;
>
> -- if (!guest_range_valid_untagged(old_addr, old_size) ||
> -- ((flags & MREMAP_FIXED) &&
> + if (!guest_range_valid_untagged(old_addr, old_size)) {
> + errno = EFAULT;
> + return -1;
> + }
> -+
> -+ if (((flags & MREMAP_FIXED) &&
> ++
> + if (((flags & MREMAP_FIXED) &&
> !guest_range_valid_untagged(new_addr, new_size)) ||
> ((flags & MREMAP_MAYMOVE) == 0 &&
> - !guest_range_valid_untagged(old_addr, new_size))) {
> -- errno = ENOMEM;
> -+ errno = EINVAL;
> - return -1;
> - }
> -
> diff --git a/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch b/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
> index 5b24c18916..0d7974fcdc 100644
> --- a/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
> +++ b/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
> @@ -1,4 +1,4 @@
> -From 8b28a9376074067bc2d84d4f77d5c7a42433b31b Mon Sep 17 00:00:00 2001
> +From e891928d2248e186c65979cf5a2ba0cff9d00824 Mon Sep 17 00:00:00 2001
> From: Richard Purdie <richard.purdie@linuxfoundation.org>
> Date: Mon, 1 Mar 2021 13:00:47 +0000
> Subject: [PATCH] qemu: Determinism fixes
> @@ -11,6 +11,8 @@ meson to pass relative paths but we can fix that in the script.
>
> Upstream-Status: Pending [some version of all/part of this may be accepted]
> RP 2021/3/1
> +
> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> ---
> scripts/decodetree.py | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> diff --git a/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
> index a58c936d06..275c500894 100644
> --- a/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
> +++ b/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
> @@ -1,4 +1,4 @@
> -From 097b75ad8310143decab92f6d1744144e7a4809f Mon Sep 17 00:00:00 2001
> +From ac9a866ac807cb1542f26df07b4aad3a06342a99 Mon Sep 17 00:00:00 2001
> From: Changqing Li <changqing.li@windriver.com>
> Date: Thu, 14 Jan 2021 06:33:04 +0000
> Subject: [PATCH] tests/meson.build: use relative path to refer to files
> @@ -17,10 +17,10 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/unit/meson.build b/tests/unit/meson.build
> -index d5248ae51..2c581f055 100644
> +index 41e8b06c3..ce5df4957 100644
> --- a/tests/unit/meson.build
> +++ b/tests/unit/meson.build
> -@@ -127,17 +127,17 @@ endif
> +@@ -124,17 +124,17 @@ endif
>
> if have_system
> tests += {
> diff --git a/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
> index af0eafb65f..f6e563ad80 100644
> --- a/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
> +++ b/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
> @@ -1,4 +1,4 @@
> -From 9d5deb767523ea0d1aeecb9960244c702530acad Mon Sep 17 00:00:00 2001
> +From c0bfd2c5556afcf4413c81b3fda54a62f2bdd8c8 Mon Sep 17 00:00:00 2001
> From: Khem Raj <raj.khem@gmail.com>
> Date: Mon, 21 Mar 2022 10:09:38 -0700
> Subject: [PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux
> diff --git a/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch b/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
> index db88766cf6..430b1aa509 100644
> --- a/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
> +++ b/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
> @@ -1,4 +1,4 @@
> -From aaec67c133dddda7204d23964732b4b788cbc9ce Mon Sep 17 00:00:00 2001
> +From e357ac91b04f733148defe8c133ae8b2085a9a23 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <martin@geanix.com>
> Date: Wed, 22 May 2024 14:02:55 +0200
> Subject: [PATCH] configure: lookup meson exutable from PATH
> @@ -13,10 +13,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/configure b/configure
> -index 82cace1..83bbda9 100755
> +index eea903067..217af781f 100755
> --- a/configure
> +++ b/configure
> -@@ -993,10 +993,7 @@ get_pwd() {
> +@@ -981,10 +981,7 @@ get_pwd() {
> fi
> }
>
> @@ -26,5 +26,5 @@ index 82cace1..83bbda9 100755
> -fi
> +meson=`which meson`
>
> - # Conditionally ensure Sphinx is installed.
> -
> + # On Haiku, meson might show up in a "non-packaged" subfolder instead, see
> + # https://github.com/haiku/haiku/blob/r1beta5/docs/user/storage/storageintro.dox
> diff --git a/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch b/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
> index d04596d313..040931a941 100644
> --- a/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
> +++ b/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
> @@ -1,4 +1,4 @@
> -From c9f174b2f7b43e59e91f88c75c8b3e2ee30bfcdd Mon Sep 17 00:00:00 2001
> +From 70fa360e5bf72b28960747da47d9b85e650ad312 Mon Sep 17 00:00:00 2001
> From: Richard Purdie <richard.purdie@linuxfoundation.org>
> Date: Wed, 22 May 2024 13:58:23 +0200
> Subject: [PATCH] qemu: Ensure pip and the python venv aren't used for meson
> @@ -29,10 +29,10 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> -index 84e429409..1a9585e8e 100755
> +index 217af781f..cf8666337 100755
> --- a/configure
> +++ b/configure
> -@@ -981,14 +981,14 @@ python="$(command -v "$python")"
> +@@ -951,14 +951,14 @@ python="$(command -v "$python")"
> echo "python determined to be '$python'"
> echo "python version: $($python --version)"
>
> @@ -47,5 +47,5 @@ index 84e429409..1a9585e8e 100755
> -mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
> +mkvenv=true
>
> - # Finish preparing the virtual environment using vendored .whl files
> -
> + # Finish preparing the virtual environment using vendored .whl files.
> + # Even if PyPI is allowed, we disallow it here to force installation
> diff --git a/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch b/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
> deleted file mode 100644
> index 524e20a3dd..0000000000
> --- a/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
> +++ /dev/null
> @@ -1,35 +0,0 @@
> -From 475dbdbee7ff878d113f45a1a623e9abbf0e55f3 Mon Sep 17 00:00:00 2001
> -From: Natanael Copa <ncopa@alpinelinux.org>
> -Date: Wed, 18 Sep 2024 16:19:37 -0700
> -Subject: [PATCH] target/riscv/kvm: do not use non-portable strerrorname_np()
> -
> -strerrorname_np is non-portable and breaks building with musl libc.
> -
> -Use strerror(errno) instead, like we do other places.
> -
> -Upstream-Status: Submitted [https://mail.gnu.org/archive/html/qemu-stable/2023-12/msg00069.html]
> -
> -Cc: qemu-stable@nongnu.org
> -Fixes: commit 082e9e4a58ba (target/riscv/kvm: improve 'init_multiext_cfg' error
> -msg)
> -Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2041
> -Buglink: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15541
> -Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
> ----
> - target/riscv/kvm/kvm-cpu.c | 3 +--
> - 1 file changed, 1 insertion(+), 2 deletions(-)
> -
> -diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c
> -index e06d2126b..e1cc02fba 100644
> ---- a/target/riscv/kvm/kvm-cpu.c
> -+++ b/target/riscv/kvm/kvm-cpu.c
> -@@ -1994,8 +1994,7 @@ static bool kvm_cpu_realize(CPUState *cs, Error **errp)
> - if (riscv_has_ext(&cpu->env, RVV)) {
> - ret = prctl(PR_RISCV_V_SET_CONTROL, PR_RISCV_V_VSTATE_CTRL_ON);
> - if (ret) {
> -- error_setg(errp, "Error in prctl PR_RISCV_V_SET_CONTROL, code: %s",
> -- strerrorname_np(errno));
> -+ error_setg(errp, "Error in prctl PR_RISCV_V_SET_CONTROL, error %d", errno);
> - return false;
> - }
> - }
> diff --git a/meta/recipes-devtools/qemu/qemu_10.2.0.bb b/meta/recipes-devtools/qemu/qemu_11.0.0.bb
> similarity index 100%
> rename from meta/recipes-devtools/qemu/qemu_10.2.0.bb
> rename to meta/recipes-devtools/qemu/qemu_11.0.0.bb
> --
> 2.49.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#237180): https://lists.openembedded.org/g/openembedded-core/message/237180
> Mute This Topic: https://lists.openembedded.org/mt/119331918/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0
2026-05-15 16:24 ` Alexander Kanavin
@ 2026-05-15 19:15 ` Quan Sun
0 siblings, 0 replies; 13+ messages in thread
From: Quan Sun @ 2026-05-15 19:15 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: openembedded-core
On 5/15/26 12:24, Alexander Kanavin wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Fri, 15 May 2026 at 17:49, Quan Sun via lists.openembedded.org
> <Quan.Sun=windriver.com@lists.openembedded.org> wrote:
>> - Add python3-qemu-qmp recipe (0.0.6) as a separate package. The QMP
>> Python library was removed from the QEMU source tree in 11.0.0 and
>> split into its own upstream project. This is needed by
>> qemu-system-native for testimage integration.
>> +++ b/meta/recipes-devtools/qemu/python3-qemu-qmp_0.0.6.bb
>> @@ -0,0 +1,30 @@
>> +SUMMARY = "QEMU Monitor Protocol Python library"
>> +DESCRIPTION = "An asyncio library for communicating with QEMU Monitor Protocol (QMP). \
>> +This library was split out of the QEMU source tree to provide a reference QMP \
>> +implementation usable both within and outside of the QEMU source tree."
>> +HOMEPAGE = "https://gitlab.com/qemu-project/python-qemu-qmp"
>> +LICENSE = "LGPL-2.0-only & GPL-2.0-only"
>> +LIC_FILES_CHKSUM = "file://LICENSE;md5=4cf66a4984120007c9881cc871cf49db"
>> +
>> +SRC_URI = "git://gitlab.com/qemu-project/python-qemu-qmp.git;protocol=https;branch=main"
>> +SRCREV = "82006cb788d27b090a8b84fc7831feb9c528bcdc"
> Thanks!
>
> This is available on pypi:
> https://pypi.org/project/qemu.qmp/
> so the recipe should use the pypi bbclass to download the appropriate
> package (there's lots of examples in oe-core).
Hi Alex,
Will update.
>
> Also newly added recipes need a maintainers.inc entry:
> https://git.openembedded.org/openembedded-core/tree/meta/conf/distro/include/maintainers.inc
Thanks for pointing out.
Quan
>
>
>> +
>> +inherit python_setuptools_build_meta
>> +
>> +DEPENDS += "python3-setuptools-scm-native"
>> +
>> +# setuptools_scm needs this when building from git without tags in the clone
>> +SETUPTOOLS_SCM_PRETEND_VERSION = "0.0.6"
>> +
>> +RDEPENDS:${PN} += "python3-core python3-asyncio"
>> +
>> +# Install to the custom path expected by oeqa/utils/qemurunner.py
>> +# which imports "qmp.legacy" from ${libdir}/qemu-python/
>> +do_install:append:class-native() {
>> + install -d ${D}${libdir}/qemu-python/qmp/
>> + cp -R --no-dereference --preserve=mode,links ${S}/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
>> +}
>> +
>> +FILES:${PN}:append:class-native = " ${libdir}/qemu-python"
>> +
>> +BBCLASSEXTEND = "native nativesdk"
>> diff --git a/meta/recipes-devtools/qemu/qemu-native_10.2.0.bb b/meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
>> similarity index 99%
>> rename from meta/recipes-devtools/qemu/qemu-native_10.2.0.bb
>> rename to meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
>> index 26fa84c180..a77953529b 100644
>> --- a/meta/recipes-devtools/qemu/qemu-native_10.2.0.bb
>> +++ b/meta/recipes-devtools/qemu/qemu-native_11.0.0.bb
>> @@ -7,4 +7,3 @@ require qemu-native.inc
>> EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} --disable-tools --disable-install-blobs --disable-guest-agent"
>>
>> PACKAGECONFIG ??= "pie"
>> -
>> diff --git a/meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb b/meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
>> similarity index 85%
>> rename from meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb
>> rename to meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
>> index 2e4f7328ad..7947499c5f 100644
>> --- a/meta/recipes-devtools/qemu/qemu-system-native_10.2.0.bb
>> +++ b/meta/recipes-devtools/qemu/qemu-system-native_11.0.0.bb
>> @@ -5,7 +5,7 @@ require qemu-native.inc
>> # As some of the files installed by qemu-native and qemu-system-native
>> # are the same, we depend on qemu-native to get the full installation set
>> # and avoid file clashes
>> -DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native"
>> +DEPENDS += "glib-2.0-native zlib-native pixman-native qemu-native python3-qemu-qmp-native"
>>
>> EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
>>
>> @@ -25,9 +25,4 @@ do_install:append() {
>> rm -rf ${D}${datadir}/qemu/dtb
>> rm -rf ${D}${datadir}/icons/
>> rm -rf ${D}${includedir}/qemu-plugin.h
>> -
>> - # Install qmp.py to be used with testimage
>> - install -d ${D}${libdir}/qemu-python/qmp/
>> - install -D ${S}/python/qemu/qmp/* ${D}${libdir}/qemu-python/qmp/
>> }
>> -
>> diff --git a/meta/recipes-devtools/qemu/qemu-targets.inc b/meta/recipes-devtools/qemu/qemu-targets.inc
>> index 50e5eb6796..937ef1a911 100644
>> --- a/meta/recipes-devtools/qemu/qemu-targets.inc
>> +++ b/meta/recipes-devtools/qemu/qemu-targets.inc
>> @@ -25,6 +25,10 @@ def get_qemu_target_list(d):
>> archs.remove(arch)
>> if 'linux' not in tos:
>> return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',')
>> + # QEMU 11.0.0+ only supports linux-user on 64-bit host architectures
>> + linux_user_hosts = ['aarch64', 'loongarch64', 'mips64', 'ppc64', 'riscv64', 's390x', 'sparc64', 'x86_64']
>> + if tarch not in linux_user_hosts:
>> + return softmmuonly + ''.join([arch + "-softmmu" + "," for arch in archs]).rstrip(',')
>> return softmmuonly + linuxuseronly + ''.join([arch + "-linux-user" + "," + arch + "-softmmu" + "," for arch in archs]).rstrip(',')
>>
>> def get_qemu_usermode_target_list(d):
>> diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
>> index 5f30416a48..1e5890f15a 100644
>> --- a/meta/recipes-devtools/qemu/qemu.inc
>> +++ b/meta/recipes-devtools/qemu/qemu.inc
>> @@ -4,6 +4,7 @@ machine's processor through dynamic binary translation and provides a set \
>> of different hardware and device models for the machine, enabling it to run \
>> a variety of guest operating systems"
>> HOMEPAGE = "http://qemu.org"
>> +BUGTRACKER = "https://gitlab.com/qemu-project/qemu/-/issues"
>> LICENSE = "GPL-2.0-only & LGPL-2.1-only"
>>
>> DEPENDS += "bison-native meson-native ninja-native"
>> @@ -22,7 +23,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=a3b50d8b88dcc0eb3d7d39b760b9e821 \
>> SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
>> file://powerpc_rom.bin \
>> file://run-ptest \
>> - file://fix-strerrorname_np.patch \
>> file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
>> file://0002-apic-fixup-fallthrough-to-PIC.patch \
>> file://0004-qemu-Do-not-include-file-if-not-exists.patch \
>> @@ -32,8 +32,6 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
>> file://0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \
>> file://0010-configure-lookup-meson-exutable-from-PATH.patch \
>> file://0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch \
>> - file://0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch \
>> - file://0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch \
>> file://qemu-guest-agent.init \
>> file://qemu-guest-agent.udev \
>> "
>> @@ -41,7 +39,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
>> UPSTREAM_CHECK_URI = "https://www.qemu.org"
>> UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
>>
>> -SRC_URI[sha256sum] = "9e30ad1b8b9f7b4463001582d1ab297f39cfccea5d08540c0ca6d6672785883a"
>> +SRC_URI[sha256sum] = "c04ca36012653f32d11c674d370cf52a710e7d3f18c2d8b63e4932052a4854d6"
>>
>> CVE_STATUS[CVE-2007-0998] = "not-applicable-config: The VNC server can expose host files uder some circumstances. We don't enable it by default."
>>
>> @@ -61,6 +59,9 @@ COMPATIBLE_HOST:mipsarchn32 = "null"
>> COMPATIBLE_HOST:mipsarchn64 = "null"
>> COMPATIBLE_HOST:riscv32 = "null"
>>
>> +# QEMU 11.0.0+ requires a 64-bit host architecture for emulator builds
>> +COMPATIBLE_HOST:class-target = "(aarch64|x86_64|ppc64|riscv64|loongarch64|mips64|s390x|sparc64).*-linux"
>> +
>> # Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html
>> # upstream states qemu doesn't work without optimization
>> DEBUG_BUILD = "0"
>> @@ -75,7 +76,7 @@ do_install_ptest() {
>> find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcodp]" | xargs -i rm -rf {}
>>
>> # Don't check the file genreated by configure
>> - sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemle-aml.sh
>> + sed -i -e "1s,#!/usr/bin/bash,#!${base_bindir}/bash," ${D}${PTEST_PATH}/tests/data/acpi/disassemble-aml.sh
>>
>> # Strip the paths from the QEMU variable, we can use PATH
>> makfiles=$(find ${D}${PTEST_PATH} -name "*.mak")
>> @@ -119,8 +120,8 @@ EXTRA_OECONF = " \
>> ${PACKAGECONFIG_CONFARGS} \
>> "
>>
>> -EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX}"
>> -EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX}"
>> +EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX} --cpu=${TUNE_ARCH}"
>> +EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX} --cpu=${SDK_ARCH}"
>>
>> B = "${WORKDIR}/build"
>>
>> @@ -130,7 +131,7 @@ do_configure:prepend:class-native() {
>> # Append build host pkg-config paths for native target since the host may provide sdl
>> BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
>> if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
>> - export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:$BHOST_PKGCONFIG_PATH
>> + export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
>> fi
>> }
>>
>> diff --git a/meta/recipes-devtools/qemu/qemu/0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch b/meta/recipes-devtools/qemu/qemu/0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch
>> deleted file mode 100644
>> index d19f872fc3..0000000000
>> --- a/meta/recipes-devtools/qemu/qemu/0001-accel-tcg-Fix-iotlb_to_section-for-different-Address.patch
>> +++ /dev/null
>> @@ -1,274 +0,0 @@
>> -From 858e6bb252e075e09cca6e78299151d3af0bf5fb Mon Sep 17 00:00:00 2001
>> -From: Quan Sun <Quan.Sun@windriver.com>
>> -Date: Tue, 28 Apr 2026 14:56:36 -0400
>> -Subject: [PATCH] accel/tcg: Fix iotlb_to_section() for different AddressSpace
>> -MIME-Version: 1.0
>> -Content-Type: text/plain; charset=UTF-8
>> -Content-Transfer-Encoding: 8bit
>> -
>> -'CPUTLBEntryFull.xlat_section' stores section_index in last 12 bits to
>> -find the correct section when CPU access the IO region over the IOTLB.
>> -However, section_index is only unique inside single AddressSpace. If
>> -address space translation is over IOMMUMemoryRegion, it could return
>> -section from other AddressSpace. 'iotlb_to_section()' API only finds the
>> -sections from CPU's AddressSpace so that it couldn't find section in
>> -other AddressSpace. Thus, using 'iotlb_to_section()' API will find the
>> -wrong section and QEMU will have wrong load/store access.
>> -
>> -To fix this bug of iotlb_to_section(), store complete MemoryRegionSection
>> -pointer in CPUTLBEntryFull to replace the section_index in xlat_section.
>> -Rename 'xlat_section' to 'xlat_offset' as we remove last 12 bits
>> -section_index inside. Also, since we directly use section pointer in the
>> -CPUTLBEntryFull (full->section), we can remove the unused functions:
>> -iotlb_to_section(), memory_region_section_get_iotlb().
>> -
>> -This bug occurs only when
>> -(1) IOMMUMemoryRegion is in the path of CPU access.
>> -(2) IOMMUMemoryRegion returns different target_as and the section is in
>> -the IO region.
>> -
>> -This patch incorporates prerequisite changes from upstream commit
>> -94c6e9cf0440 ("accel/tcg: Send the CPUTLBEntryFull struct into
>> -io_prepare()") needed for the fix to apply cleanly.
>> -
>> -Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/854cd16e318eed12de2995014b28d9f374c64bf7]
>> -
>> -Signed-off-by: Jim Shu <jim.shu@sifive.com>
>> -Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> -Tested-by: Mark Burton <mburton@qti.qualcomm.com>
>> -Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
>> -Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> -Signed-off-by: Quan Sun <Quan.Sun@windriver.com>
>> ----
>> - accel/tcg/cputlb.c | 32 +++++++++++++++-----------------
>> - include/accel/tcg/iommu.h | 15 ---------------
>> - include/exec/cputlb.h | 4 ++--
>> - include/hw/core/cpu.h | 17 +++++++++--------
>> - system/physmem.c | 25 -------------------------
>> - 5 files changed, 26 insertions(+), 67 deletions(-)
>> -
>> -diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c
>> -index fd1606c85..fa0f4d8b3 100644
>> ---- a/accel/tcg/cputlb.c
>> -+++ b/accel/tcg/cputlb.c
>> -@@ -1089,7 +1089,7 @@ void tlb_set_page_full(CPUState *cpu, int mmu_idx,
>> - }
>> - } else {
>> - /* I/O or ROMD */
>> -- iotlb = memory_region_section_get_iotlb(cpu, section) + xlat;
>> -+ iotlb = xlat;
>> - /*
>> - * Writes to romd devices must go through MMIO to enable write.
>> - * Reads to romd devices go through the ram_ptr found above,
>> -@@ -1140,10 +1140,9 @@ void tlb_set_page_full(CPUState *cpu, int mmu_idx,
>> - /*
>> - * When memory region is ram, iotlb contains a TARGET_PAGE_BITS
>> - * aligned ram_addr_t of the page base of the target RAM.
>> -- * Otherwise, iotlb contains
>> -- * - a physical section number in the lower TARGET_PAGE_BITS
>> -- * - the offset within section->mr of the page base (I/O, ROMD) with the
>> -- * TARGET_PAGE_BITS masked off.
>> -+ * Otherwise, iotlb contains a TARGET_PAGE_BITS aligned
>> -+ * offset within section->mr of the page base (I/O, ROMD)
>> -+ *
>> - * We subtract addr_page (which is page aligned and thus won't
>> - * disturb the low bits) to give an offset which can be added to the
>> - * (non-page-aligned) vaddr of the eventual memory access to get
>> -@@ -1153,7 +1152,8 @@ void tlb_set_page_full(CPUState *cpu, int mmu_idx,
>> - */
>> - desc->fulltlb[index] = *full;
>> - full = &desc->fulltlb[index];
>> -- full->xlat_section = iotlb - addr_page;
>> -+ full->xlat_offset = iotlb - addr_page;
>> -+ full->section = section;
>> - full->phys_addr = paddr_page;
>> -
>> - /* Now calculate the new entry */
>> -@@ -1269,14 +1269,14 @@ static inline void cpu_unaligned_access(CPUState *cpu, vaddr addr,
>> - }
>> -
>> - static MemoryRegionSection *
>> --io_prepare(hwaddr *out_offset, CPUState *cpu, hwaddr xlat,
>> -+io_prepare(hwaddr *out_offset, CPUState *cpu, CPUTLBEntryFull *full,
>> - MemTxAttrs attrs, vaddr addr, uintptr_t retaddr)
>> - {
>> - MemoryRegionSection *section;
>> - hwaddr mr_offset;
>> -
>> -- section = iotlb_to_section(cpu, xlat, attrs);
>> -- mr_offset = (xlat & TARGET_PAGE_MASK) + addr;
>> -+ section = full->section;
>> -+ mr_offset = full->xlat_offset + addr;
>> - cpu->mem_io_pc = retaddr;
>> - if (!cpu->neg.can_do_io) {
>> - cpu_io_recompile(cpu, retaddr);
>> -@@ -1335,7 +1335,7 @@ static bool victim_tlb_hit(CPUState *cpu, size_t mmu_idx, size_t index,
>> - static void notdirty_write(CPUState *cpu, vaddr mem_vaddr, unsigned size,
>> - CPUTLBEntryFull *full, uintptr_t retaddr)
>> - {
>> -- ram_addr_t ram_addr = mem_vaddr + full->xlat_section;
>> -+ ram_addr_t ram_addr = mem_vaddr + full->xlat_offset;
>> -
>> - trace_memory_notdirty_write_access(mem_vaddr, ram_addr, size);
>> -
>> -@@ -1592,9 +1592,7 @@ bool tlb_plugin_lookup(CPUState *cpu, vaddr addr, int mmu_idx,
>> -
>> - /* We must have an iotlb entry for MMIO */
>> - if (tlb_addr & TLB_MMIO) {
>> -- MemoryRegionSection *section =
>> -- iotlb_to_section(cpu, full->xlat_section & ~TARGET_PAGE_MASK,
>> -- full->attrs);
>> -+ MemoryRegionSection *section = full->section;
>> - data->is_io = true;
>> - data->mr = section->mr;
>> - } else {
>> -@@ -1980,7 +1978,7 @@ static uint64_t do_ld_mmio_beN(CPUState *cpu, CPUTLBEntryFull *full,
>> - tcg_debug_assert(size > 0 && size <= 8);
>> -
>> - attrs = full->attrs;
>> -- section = io_prepare(&mr_offset, cpu, full->xlat_section, attrs, addr, ra);
>> -+ section = io_prepare(&mr_offset, cpu, full, attrs, addr, ra);
>> - mr = section->mr;
>> -
>> - BQL_LOCK_GUARD();
>> -@@ -2001,7 +1999,7 @@ static Int128 do_ld16_mmio_beN(CPUState *cpu, CPUTLBEntryFull *full,
>> - tcg_debug_assert(size > 8 && size <= 16);
>> -
>> - attrs = full->attrs;
>> -- section = io_prepare(&mr_offset, cpu, full->xlat_section, attrs, addr, ra);
>> -+ section = io_prepare(&mr_offset, cpu, full, attrs, addr, ra);
>> - mr = section->mr;
>> -
>> - BQL_LOCK_GUARD();
>> -@@ -2521,7 +2519,7 @@ static uint64_t do_st_mmio_leN(CPUState *cpu, CPUTLBEntryFull *full,
>> - tcg_debug_assert(size > 0 && size <= 8);
>> -
>> - attrs = full->attrs;
>> -- section = io_prepare(&mr_offset, cpu, full->xlat_section, attrs, addr, ra);
>> -+ section = io_prepare(&mr_offset, cpu, full, attrs, addr, ra);
>> - mr = section->mr;
>> -
>> - BQL_LOCK_GUARD();
>> -@@ -2541,7 +2539,7 @@ static uint64_t do_st16_mmio_leN(CPUState *cpu, CPUTLBEntryFull *full,
>> - tcg_debug_assert(size > 8 && size <= 16);
>> -
>> - attrs = full->attrs;
>> -- section = io_prepare(&mr_offset, cpu, full->xlat_section, attrs, addr, ra);
>> -+ section = io_prepare(&mr_offset, cpu, full, attrs, addr, ra);
>> - mr = section->mr;
>> -
>> - BQL_LOCK_GUARD();
>> -diff --git a/include/accel/tcg/iommu.h b/include/accel/tcg/iommu.h
>> -index 90cfd6c0e..547f8ea0e 100644
>> ---- a/include/accel/tcg/iommu.h
>> -+++ b/include/accel/tcg/iommu.h
>> -@@ -14,18 +14,6 @@
>> - #include "exec/hwaddr.h"
>> - #include "exec/memattrs.h"
>> -
>> --/**
>> -- * iotlb_to_section:
>> -- * @cpu: CPU performing the access
>> -- * @index: TCG CPU IOTLB entry
>> -- *
>> -- * Given a TCG CPU IOTLB entry, return the MemoryRegionSection that
>> -- * it refers to. @index will have been initially created and returned
>> -- * by memory_region_section_get_iotlb().
>> -- */
>> --MemoryRegionSection *iotlb_to_section(CPUState *cpu,
>> -- hwaddr index, MemTxAttrs attrs);
>> --
>> - MemoryRegionSection *address_space_translate_for_iotlb(CPUState *cpu,
>> - int asidx,
>> - hwaddr addr,
>> -@@ -34,8 +22,5 @@ MemoryRegionSection *address_space_translate_for_iotlb(CPUState *cpu,
>> - MemTxAttrs attrs,
>> - int *prot);
>> -
>> --hwaddr memory_region_section_get_iotlb(CPUState *cpu,
>> -- MemoryRegionSection *section);
>> --
>> - #endif
>> -
>> -diff --git a/include/exec/cputlb.h b/include/exec/cputlb.h
>> -index 9bec0e789..16f866990 100644
>> ---- a/include/exec/cputlb.h
>> -+++ b/include/exec/cputlb.h
>> -@@ -43,8 +43,8 @@ void tlb_reset_dirty_range_all(ram_addr_t start, ram_addr_t length);
>> - * @full: the details of the tlb entry
>> - *
>> - * Add an entry to @cpu tlb index @mmu_idx. All of the fields of
>> -- * @full must be filled, except for xlat_section, and constitute
>> -- * the complete description of the translated page.
>> -+ * @full must be filled, except for xlat_offset & section, and
>> -+ * constitute the complete description of the translated page.
>> - *
>> - * This is generally called by the target tlb_fill function after
>> - * having performed a successful page table walk to find the physical
>> -diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
>> -index 961505177..a3db3f66f 100644
>> ---- a/include/hw/core/cpu.h
>> -+++ b/include/hw/core/cpu.h
>> -@@ -214,15 +214,16 @@ typedef uint32_t MMUIdxMap;
>> - */
>> - struct CPUTLBEntryFull {
>> - /*
>> -- * @xlat_section contains:
>> -- * - in the lower TARGET_PAGE_BITS, a physical section number
>> -- * - with the lower TARGET_PAGE_BITS masked off, an offset which
>> -- * must be added to the virtual address to obtain:
>> -- * + the ram_addr_t of the target RAM (if the physical section
>> -- * number is PHYS_SECTION_NOTDIRTY or PHYS_SECTION_ROM)
>> -- * + the offset within the target MemoryRegion (otherwise)
>> -+ * @xlat_offset: TARGET_PAGE_BITS aligned offset which must be added to
>> -+ * the virtual address to obtain:
>> -+ * + the ram_addr_t of the target RAM (if the physical section
>> -+ * number is PHYS_SECTION_NOTDIRTY or PHYS_SECTION_ROM)
>> -+ * + the offset within the target MemoryRegion (otherwise)
>> - */
>> -- hwaddr xlat_section;
>> -+ hwaddr xlat_offset;
>> -+
>> -+ /* @section contains physical section. */
>> -+ MemoryRegionSection *section;
>> -
>> - /*
>> - * @phys_addr contains the physical address in the address space
>> -diff --git a/system/physmem.c b/system/physmem.c
>> -index c9869e404..a21e7ca64 100644
>> ---- a/system/physmem.c
>> -+++ b/system/physmem.c
>> -@@ -748,31 +748,6 @@ translate_fail:
>> - return &d->map.sections[PHYS_SECTION_UNASSIGNED];
>> - }
>> -
>> --MemoryRegionSection *iotlb_to_section(CPUState *cpu,
>> -- hwaddr index, MemTxAttrs attrs)
>> --{
>> -- int asidx = cpu_asidx_from_attrs(cpu, attrs);
>> -- CPUAddressSpace *cpuas = &cpu->cpu_ases[asidx];
>> -- AddressSpaceDispatch *d = address_space_to_dispatch(cpuas->as);
>> -- int section_index = index & ~TARGET_PAGE_MASK;
>> -- MemoryRegionSection *ret;
>> --
>> -- assert(section_index < d->map.sections_nb);
>> -- ret = d->map.sections + section_index;
>> -- assert(ret->mr);
>> -- assert(ret->mr->ops);
>> --
>> -- return ret;
>> --}
>> --
>> --/* Called from RCU critical section */
>> --hwaddr memory_region_section_get_iotlb(CPUState *cpu,
>> -- MemoryRegionSection *section)
>> --{
>> -- AddressSpaceDispatch *d = flatview_to_dispatch(section->fv);
>> -- return section - d->map.sections;
>> --}
>> --
>> - #endif /* CONFIG_TCG */
>> -
>> - void cpu_address_space_init(CPUState *cpu, int asidx,
>> ---
>> -2.43.0
>> diff --git a/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch b/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
>> deleted file mode 100644
>> index 47d6f41385..0000000000
>> --- a/meta/recipes-devtools/qemu/qemu/0001-linux-user-elfload.c-Correction-to-HWCAP2-accessor.patch
>> +++ /dev/null
>> @@ -1,42 +0,0 @@
>> -From c333f9c4ee212297f3b9a8a6ef62396a63c48e61 Mon Sep 17 00:00:00 2001
>> -From: Jim MacArthur <jim.macarthur@linaro.org>
>> -Date: Tue, 6 Jan 2026 15:40:48 +0000
>> -Subject: [PATCH] linux-user/elfload.c: Correction to HWCAP2 accessor
>> -MIME-Version: 1.0
>> -Content-Type: text/plain; charset=UTF-8
>> -Content-Transfer-Encoding: 8bit
>> -
>> -get_elf_hwcap was used when get_elf_hwcap2 should have been.
>> -
>> -Cc: qemu-stable@nongnu.org
>> -Fixes: fcac98d0ba8b ("linux-user: Remove ELF_HWCAP2")
>> -Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3259
>> -Signed-off-by: Jim MacArthur <jim.macarthur@linaro.org>
>> -Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
>> -Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> -Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> -Message-ID: <20260106-fix-hwcap2-sve2-v1-1-1d70dff63370@linaro.org>
>> -
>> -Upstream-Status: Backport [https://gitlab.com/qemu-project/qemu/-/commit/c333f9c4ee212297f3b9a8a6ef62396a63c48e61]
>> -
>> -Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
>> ----
>> - linux-user/elfload.c | 2 +-
>> - 1 file changed, 1 insertion(+), 1 deletion(-)
>> -
>> -diff --git a/linux-user/elfload.c b/linux-user/elfload.c
>> -index 0002d5be2f..35471c0c9a 100644
>> ---- a/linux-user/elfload.c
>> -+++ b/linux-user/elfload.c
>> -@@ -708,7 +708,7 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc,
>> - NEW_AUX_ENT(AT_EXECFN, info->file_string);
>> -
>> - if (HAVE_ELF_HWCAP2) {
>> -- NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap(thread_cpu));
>> -+ NEW_AUX_ENT(AT_HWCAP2, get_elf_hwcap2(thread_cpu));
>> - }
>> - if (u_base_platform) {
>> - NEW_AUX_ENT(AT_BASE_PLATFORM, u_base_platform);
>> ---
>> -2.34.1
>> -
>> diff --git a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
>> index bc8dace013..40b08cd247 100644
>> --- a/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
>> +++ b/meta/recipes-devtools/qemu/qemu/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
>> @@ -1,10 +1,10 @@
>> -From f2d9bc614f7edf66412209aba78aa086e65dc75e Mon Sep 17 00:00:00 2001
>> +From a84184c98cf296954e0c757604e969b8565eb474 Mon Sep 17 00:00:00 2001
>> From: Jason Wessel <jason.wessel@windriver.com>
>> Date: Fri, 28 Mar 2014 17:42:43 +0800
>> Subject: [PATCH] qemu: Add addition environment space to boot loader
>> qemu-system-mips
>>
>> -Upstream-Status: Inappropriate - OE uses deep paths
>> +Upstream-Status: Inappropriate [OE uses deep paths]
>>
>> If you create a project with very long directory names like 128 characters
>> deep and use NFS, the kernel arguments will be truncated. The kernel will
>> @@ -18,10 +18,10 @@ Signed-off-by: Roy Li <rongqing.li@windriver.com>
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/mips/malta.c b/hw/mips/malta.c
>> -index cbdbb2105..62681fdae 100644
>> +index 812ff64d8..daf929943 100644
>> --- a/hw/mips/malta.c
>> +++ b/hw/mips/malta.c
>> -@@ -65,7 +65,7 @@
>> +@@ -66,7 +66,7 @@
>> #define ENVP_PADDR 0x2000
>> #define ENVP_VADDR cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
>> #define ENVP_NB_ENTRIES 16
>> diff --git a/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch b/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
>> index bfc85f4842..ad00f24482 100644
>> --- a/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
>> +++ b/meta/recipes-devtools/qemu/qemu/0002-apic-fixup-fallthrough-to-PIC.patch
>> @@ -1,4 +1,4 @@
>> -From 945af9ecc80653955cbdbb7d3e28dce61795b251 Mon Sep 17 00:00:00 2001
>> +From 0a688e763d91c2e0e11cbe960f405442a9f35417 Mon Sep 17 00:00:00 2001
>> From: Mark Asselstine <mark.asselstine@windriver.com>
>> Date: Tue, 26 Feb 2013 11:43:28 -0500
>> Subject: [PATCH] apic: fixup fallthrough to PIC
>> @@ -33,10 +33,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/intc/apic.c b/hw/intc/apic.c
>> -index aad253a..212b01f 100644
>> +index 8766ed00b..581fc6deb 100644
>> --- a/hw/intc/apic.c
>> +++ b/hw/intc/apic.c
>> -@@ -740,7 +740,7 @@ int apic_accept_pic_intr(APICCommonState *s)
>> +@@ -741,7 +741,7 @@ int apic_accept_pic_intr(APICCommonState *s)
>> {
>> uint32_t lvt0;
>>
>> diff --git a/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch b/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
>> index 2e738abaa3..4b6ac54445 100644
>> --- a/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
>> +++ b/meta/recipes-devtools/qemu/qemu/0004-qemu-Do-not-include-file-if-not-exists.patch
>> @@ -1,4 +1,4 @@
>> -From f8c1614b204c1d64af906dc70dbf4a1534eb6b38 Mon Sep 17 00:00:00 2001
>> +From b38315a5a6f9fc033c72bb94ff258bb4b1ac8dd3 Mon Sep 17 00:00:00 2001
>> From: Oleksiy Obitotskyy <oobitots@cisco.com>
>> Date: Wed, 25 Mar 2020 21:21:35 +0200
>> Subject: [PATCH] qemu: Do not include file if not exists
>> @@ -16,10 +16,10 @@ Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
>> -index c236b2834..2a3527a87 100644
>> +index f4b74ad35..3da51ea83 100644
>> --- a/linux-user/syscall.c
>> +++ b/linux-user/syscall.c
>> -@@ -119,7 +119,9 @@
>> +@@ -117,7 +117,9 @@
>> #include <linux/blkpg.h>
>> #include <netpacket/packet.h>
>> #include <linux/netlink.h>
>> diff --git a/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch b/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
>> index ffbbb1ab32..59236999f9 100644
>> --- a/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
>> +++ b/meta/recipes-devtools/qemu/qemu/0005-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
>> @@ -1,4 +1,4 @@
>> -From 3621615790270449bf9c8a0777e8ef28eb762bf9 Mon Sep 17 00:00:00 2001
>> +From e4abb937ba5a6a476d31886e71e67006df22a664 Mon Sep 17 00:00:00 2001
>> From: Richard Purdie <richard.purdie@linuxfoundation.org>
>> Date: Fri, 8 Jan 2021 17:27:06 +0000
>> Subject: [PATCH] qemu: Add some user space mmap tweaks to address musl 32 bit
>> @@ -16,32 +16,24 @@ A better return value for the other cases of invalid addresses is EINVAL
>> rather than ENOMEM so adjust the other part of the test to this.
>>
>> Upstream-Status: Submitted [https://lists.gnu.org/archive/html/qemu-devel/2021-01/msg01355.html]
>> -Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org
>> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>> ---
>> - linux-user/mmap.c | 10 +++++++---
>> - 1 file changed, 7 insertions(+), 3 deletions(-)
>> + linux-user/mmap.c | 5 +++++
>> + 1 file changed, 5 insertions(+)
>>
>> diff --git a/linux-user/mmap.c b/linux-user/mmap.c
>> -index 002e1e668..912839dec 100644
>> +index b635b6a21..a5a617516 100644
>> --- a/linux-user/mmap.c
>> +++ b/linux-user/mmap.c
>> -@@ -1109,12 +1109,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
>> +@@ -1113,6 +1113,11 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
>> int prot;
>> void *host_addr;
>>
>> -- if (!guest_range_valid_untagged(old_addr, old_size) ||
>> -- ((flags & MREMAP_FIXED) &&
>> + if (!guest_range_valid_untagged(old_addr, old_size)) {
>> + errno = EFAULT;
>> + return -1;
>> + }
>> -+
>> -+ if (((flags & MREMAP_FIXED) &&
>> ++
>> + if (((flags & MREMAP_FIXED) &&
>> !guest_range_valid_untagged(new_addr, new_size)) ||
>> ((flags & MREMAP_MAYMOVE) == 0 &&
>> - !guest_range_valid_untagged(old_addr, new_size))) {
>> -- errno = ENOMEM;
>> -+ errno = EINVAL;
>> - return -1;
>> - }
>> -
>> diff --git a/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch b/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
>> index 5b24c18916..0d7974fcdc 100644
>> --- a/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
>> +++ b/meta/recipes-devtools/qemu/qemu/0006-qemu-Determinism-fixes.patch
>> @@ -1,4 +1,4 @@
>> -From 8b28a9376074067bc2d84d4f77d5c7a42433b31b Mon Sep 17 00:00:00 2001
>> +From e891928d2248e186c65979cf5a2ba0cff9d00824 Mon Sep 17 00:00:00 2001
>> From: Richard Purdie <richard.purdie@linuxfoundation.org>
>> Date: Mon, 1 Mar 2021 13:00:47 +0000
>> Subject: [PATCH] qemu: Determinism fixes
>> @@ -11,6 +11,8 @@ meson to pass relative paths but we can fix that in the script.
>>
>> Upstream-Status: Pending [some version of all/part of this may be accepted]
>> RP 2021/3/1
>> +
>> +Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>> ---
>> scripts/decodetree.py | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> diff --git a/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch b/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
>> index a58c936d06..275c500894 100644
>> --- a/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
>> +++ b/meta/recipes-devtools/qemu/qemu/0007-tests-meson.build-use-relative-path-to-refer-to-file.patch
>> @@ -1,4 +1,4 @@
>> -From 097b75ad8310143decab92f6d1744144e7a4809f Mon Sep 17 00:00:00 2001
>> +From ac9a866ac807cb1542f26df07b4aad3a06342a99 Mon Sep 17 00:00:00 2001
>> From: Changqing Li <changqing.li@windriver.com>
>> Date: Thu, 14 Jan 2021 06:33:04 +0000
>> Subject: [PATCH] tests/meson.build: use relative path to refer to files
>> @@ -17,10 +17,10 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/tests/unit/meson.build b/tests/unit/meson.build
>> -index d5248ae51..2c581f055 100644
>> +index 41e8b06c3..ce5df4957 100644
>> --- a/tests/unit/meson.build
>> +++ b/tests/unit/meson.build
>> -@@ -127,17 +127,17 @@ endif
>> +@@ -124,17 +124,17 @@ endif
>>
>> if have_system
>> tests += {
>> diff --git a/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch b/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
>> index af0eafb65f..f6e563ad80 100644
>> --- a/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
>> +++ b/meta/recipes-devtools/qemu/qemu/0008-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
>> @@ -1,4 +1,4 @@
>> -From 9d5deb767523ea0d1aeecb9960244c702530acad Mon Sep 17 00:00:00 2001
>> +From c0bfd2c5556afcf4413c81b3fda54a62f2bdd8c8 Mon Sep 17 00:00:00 2001
>> From: Khem Raj <raj.khem@gmail.com>
>> Date: Mon, 21 Mar 2022 10:09:38 -0700
>> Subject: [PATCH] Define MAP_SYNC and MAP_SHARED_VALIDATE on needed linux
>> diff --git a/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch b/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
>> index db88766cf6..430b1aa509 100644
>> --- a/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
>> +++ b/meta/recipes-devtools/qemu/qemu/0010-configure-lookup-meson-exutable-from-PATH.patch
>> @@ -1,4 +1,4 @@
>> -From aaec67c133dddda7204d23964732b4b788cbc9ce Mon Sep 17 00:00:00 2001
>> +From e357ac91b04f733148defe8c133ae8b2085a9a23 Mon Sep 17 00:00:00 2001
>> From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= <martin@geanix.com>
>> Date: Wed, 22 May 2024 14:02:55 +0200
>> Subject: [PATCH] configure: lookup meson exutable from PATH
>> @@ -13,10 +13,10 @@ Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> 1 file changed, 1 insertion(+), 4 deletions(-)
>>
>> diff --git a/configure b/configure
>> -index 82cace1..83bbda9 100755
>> +index eea903067..217af781f 100755
>> --- a/configure
>> +++ b/configure
>> -@@ -993,10 +993,7 @@ get_pwd() {
>> +@@ -981,10 +981,7 @@ get_pwd() {
>> fi
>> }
>>
>> @@ -26,5 +26,5 @@ index 82cace1..83bbda9 100755
>> -fi
>> +meson=`which meson`
>>
>> - # Conditionally ensure Sphinx is installed.
>> -
>> + # On Haiku, meson might show up in a "non-packaged" subfolder instead, see
>> + # https://github.com/haiku/haiku/blob/r1beta5/docs/user/storage/storageintro.dox
>> diff --git a/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch b/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
>> index d04596d313..040931a941 100644
>> --- a/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
>> +++ b/meta/recipes-devtools/qemu/qemu/0011-qemu-Ensure-pip-and-the-python-venv-aren-t-used-for-.patch
>> @@ -1,4 +1,4 @@
>> -From c9f174b2f7b43e59e91f88c75c8b3e2ee30bfcdd Mon Sep 17 00:00:00 2001
>> +From 70fa360e5bf72b28960747da47d9b85e650ad312 Mon Sep 17 00:00:00 2001
>> From: Richard Purdie <richard.purdie@linuxfoundation.org>
>> Date: Wed, 22 May 2024 13:58:23 +0200
>> Subject: [PATCH] qemu: Ensure pip and the python venv aren't used for meson
>> @@ -29,10 +29,10 @@ Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/configure b/configure
>> -index 84e429409..1a9585e8e 100755
>> +index 217af781f..cf8666337 100755
>> --- a/configure
>> +++ b/configure
>> -@@ -981,14 +981,14 @@ python="$(command -v "$python")"
>> +@@ -951,14 +951,14 @@ python="$(command -v "$python")"
>> echo "python determined to be '$python'"
>> echo "python version: $($python --version)"
>>
>> @@ -47,5 +47,5 @@ index 84e429409..1a9585e8e 100755
>> -mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
>> +mkvenv=true
>>
>> - # Finish preparing the virtual environment using vendored .whl files
>> -
>> + # Finish preparing the virtual environment using vendored .whl files.
>> + # Even if PyPI is allowed, we disallow it here to force installation
>> diff --git a/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch b/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
>> deleted file mode 100644
>> index 524e20a3dd..0000000000
>> --- a/meta/recipes-devtools/qemu/qemu/fix-strerrorname_np.patch
>> +++ /dev/null
>> @@ -1,35 +0,0 @@
>> -From 475dbdbee7ff878d113f45a1a623e9abbf0e55f3 Mon Sep 17 00:00:00 2001
>> -From: Natanael Copa <ncopa@alpinelinux.org>
>> -Date: Wed, 18 Sep 2024 16:19:37 -0700
>> -Subject: [PATCH] target/riscv/kvm: do not use non-portable strerrorname_np()
>> -
>> -strerrorname_np is non-portable and breaks building with musl libc.
>> -
>> -Use strerror(errno) instead, like we do other places.
>> -
>> -Upstream-Status: Submitted [https://mail.gnu.org/archive/html/qemu-stable/2023-12/msg00069.html]
>> -
>> -Cc: qemu-stable@nongnu.org
>> -Fixes: commit 082e9e4a58ba (target/riscv/kvm: improve 'init_multiext_cfg' error
>> -msg)
>> -Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2041
>> -Buglink: https://gitlab.alpinelinux.org/alpine/aports/-/issues/15541
>> -Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
>> ----
>> - target/riscv/kvm/kvm-cpu.c | 3 +--
>> - 1 file changed, 1 insertion(+), 2 deletions(-)
>> -
>> -diff --git a/target/riscv/kvm/kvm-cpu.c b/target/riscv/kvm/kvm-cpu.c
>> -index e06d2126b..e1cc02fba 100644
>> ---- a/target/riscv/kvm/kvm-cpu.c
>> -+++ b/target/riscv/kvm/kvm-cpu.c
>> -@@ -1994,8 +1994,7 @@ static bool kvm_cpu_realize(CPUState *cs, Error **errp)
>> - if (riscv_has_ext(&cpu->env, RVV)) {
>> - ret = prctl(PR_RISCV_V_SET_CONTROL, PR_RISCV_V_VSTATE_CTRL_ON);
>> - if (ret) {
>> -- error_setg(errp, "Error in prctl PR_RISCV_V_SET_CONTROL, code: %s",
>> -- strerrorname_np(errno));
>> -+ error_setg(errp, "Error in prctl PR_RISCV_V_SET_CONTROL, error %d", errno);
>> - return false;
>> - }
>> - }
>> diff --git a/meta/recipes-devtools/qemu/qemu_10.2.0.bb b/meta/recipes-devtools/qemu/qemu_11.0.0.bb
>> similarity index 100%
>> rename from meta/recipes-devtools/qemu/qemu_10.2.0.bb
>> rename to meta/recipes-devtools/qemu/qemu_11.0.0.bb
>> --
>> 2.49.0
>>
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#237180): https://lists.openembedded.org/g/openembedded-core/message/237180
>> Mute This Topic: https://lists.openembedded.org/mt/119331918/1686489
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2026-05-15 19:15 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-06 21:48 [OE-core][PATCH] qemu: upgrade 10.2.0 -> 11.0.0 Quan.Sun
2026-05-07 10:34 ` Mathieu Dubois-Briand
2026-05-07 20:49 ` Quan Sun
2026-05-07 11:23 ` Alexander Kanavin
2026-05-07 15:01 ` Paul Barker
2026-05-07 20:29 ` Quan Sun
2026-05-08 20:08 ` Alexander Kanavin
2026-05-08 21:35 ` Quan Sun
-- strict thread matches above, loose matches on Subject: below --
2026-05-15 15:48 Quan.Sun
2026-05-15 16:24 ` Alexander Kanavin
2026-05-15 19:15 ` Quan Sun
2026-05-05 0:16 Quan.Sun
2026-05-05 7:43 ` Richard Purdie
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.