From: Mark Hatle <[email protected]>

The 8.1.x integration is a forward port from poky as of commit
4bb222e0d71a4cb159b8a4f1a90b65b1af32ac10.  We need the 8.1.x version to
match the AMD qemu-xlnx fork version.

Remove all of the older 2022.1 - 2023.2 versions.  No reason to keep these
old versions, as the latest will do everything the older one can.

Note, some of the devicetrees may have changed names, requiring BSPs with
integrated PS and PMU/PMC DTBs to be changed.

This version corrects the QMP integration with the Yocto Project ptest
runner.  There may still be issues with the ptest runner, but qemu itself
should now be compatible.

Signed-off-by: Mark Hatle <[email protected]>
---
 meta-xilinx-core/conf/layer.conf              |   9 -
 .../recipes-devtools/qemu/qemu-8.1.inc        | 290 ++++++++++++++
 ...n-environment-space-to-boot-loader-q.patch |  13 +-
 ...ce-use-of-lfs64-related-functions-an.patch | 355 ++++++++++++++++++
 .../0003-apic-fixup-fallthrough-to-PIC.patch  |  13 +-
 ...dd-pkg-config-handling-for-libgcrypt.patch |  17 +-
 ...mu-Do-not-include-file-if-not-exists.patch |  13 +-
 ...er-space-mmap-tweaks-to-address-musl.patch |  13 +-
 .../0007-qemu-Determinism-fixes.patch         |  11 +-
 ...d-use-relative-path-to-refer-to-file.patch |  29 +-
 ...and-MAP_SHARED_VALIDATE-on-needed-li.patch |  11 +-
 ...t-against-buggy-or-malicious-guest-d.patch |  17 +-
 .../cross.patch                               |  12 +-
 .../qemu/qemu-8.1/fixedmeson.patch            |  20 +
 .../qemu/qemu-8.1/fixmips.patch               |  18 +
 .../qemu/qemu-8.1/no-pip.patch                |  45 +++
 .../powerpc_rom.bin                           | Bin
 .../qemu/qemu-8.1/qemu-guest-agent.init       |  75 ++++
 .../qemu/qemu-8.1/qemu-guest-agent.udev       |   2 +
 .../{qemu-xilinx-7.1.0 => qemu-8.1}/run-ptest |   0
 .../qemu/qemu-devicetrees_2022.1.bb           |   8 -
 .../qemu/qemu-devicetrees_2022.2.bb           |   6 -
 .../qemu/qemu-devicetrees_2023.1.bb           |   6 -
 .../qemu/qemu-devicetrees_2023.2.bb           |   6 -
 .../qemu/qemu-devicetrees_2024.1.bb           |   6 +
 .../recipes-devtools/qemu/qemu-native-8.1.inc |   7 +
 .../qemu/qemu-targets-8.1.inc                 |  28 ++
 .../qemu/qemu-xilinx-2022.1.inc               |   8 -
 .../qemu/qemu-xilinx-2022.2.inc               |   8 -
 .../qemu/qemu-xilinx-2023.1.inc               |   3 -
 .../qemu/qemu-xilinx-2023.2.inc               |   3 -
 .../qemu/qemu-xilinx-2024.1.inc               |   3 +
 ...ulip-Restrict-DMA-engine-to-memories.patch |  64 ----
 ...-connect-socket-to-a-spawned-command.patch | 246 ------------
 .../qemu-xilinx-7.1.0/CVE-2022-3165.patch     |  59 ---
 .../qemu-xilinx-7.1.0/arm-cpreg-fix.patch     |  27 --
 .../qemu-7.0.0-glibc-2.36.patch               |  46 ---
 .../recipes-devtools/qemu/qemu-xilinx-7.1.inc |  65 ----
 .../recipes-devtools/qemu/qemu-xilinx-8.1.inc |  79 ++++
 .../qemu/qemu-xilinx-native-7.1.inc           |   4 -
 .../qemu/qemu-xilinx-native-8.1.inc           |   2 +
 .../qemu/qemu-xilinx-native_2022.1.bb         |  21 --
 .../qemu/qemu-xilinx-native_2022.2.bb         |  21 --
 .../qemu/qemu-xilinx-native_2023.1.bb         |  21 --
 .../qemu/qemu-xilinx-native_2023.2.bb         |  21 --
 .../qemu/qemu-xilinx-native_2024.1.bb         |  11 +
 .../qemu/qemu-xilinx-system-native_2022.1.bb  |  38 --
 .../qemu/qemu-xilinx-system-native_2022.2.bb  |  38 --
 .../qemu/qemu-xilinx-system-native_2023.1.bb  |  38 --
 .../qemu/qemu-xilinx-system-native_2023.2.bb  |  38 --
 .../qemu/qemu-xilinx-system-native_2024.1.bb  |  35 ++
 .../qemu/qemu-xilinx_2022.1.bb                |  38 --
 .../qemu/qemu-xilinx_2022.2.bb                |  36 --
 .../qemu/qemu-xilinx_2023.1.bb                |  38 --
 ...xilinx_2023.2.bb => qemu-xilinx_2024.1.bb} |  42 +--
 .../recipes-devtools/qemu/qemu_8.1.2.bb       |  29 ++
 56 files changed, 1090 insertions(+), 1022 deletions(-)
 create mode 100644 meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc
 rename meta-xilinx-core/recipes-devtools/qemu/{qemu-xilinx-7.1.0 => 
qemu-8.1}/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch (84%)
 create mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch
 rename meta-xilinx-core/recipes-devtools/qemu/{qemu-xilinx-7.1.0 => 
qemu-8.1}/0003-apic-fixup-fallthrough-to-PIC.patch (87%)
 rename meta-xilinx-core/recipes-devtools/qemu/{qemu-xilinx-7.1.0 => 
qemu-8.1}/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch (74%)
 rename meta-xilinx-core/recipes-devtools/qemu/{qemu-xilinx-7.1.0 => 
qemu-8.1}/0005-qemu-Do-not-include-file-if-not-exists.patch (80%)
 rename meta-xilinx-core/recipes-devtools/qemu/{qemu-xilinx-7.1.0 => 
qemu-8.1}/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch (87%)
 rename meta-xilinx-core/recipes-devtools/qemu/{qemu-xilinx-7.1.0 => 
qemu-8.1}/0007-qemu-Determinism-fixes.patch (83%)
 rename meta-xilinx-core/recipes-devtools/qemu/{qemu-xilinx-7.1.0 => 
qemu-8.1}/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch (58%)
 rename meta-xilinx-core/recipes-devtools/qemu/{qemu-xilinx-7.1.0 => 
qemu-8.1}/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch (88%)
 rename meta-xilinx-core/recipes-devtools/qemu/{qemu-xilinx-7.1.0 => 
qemu-8.1}/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch (80%)
 rename meta-xilinx-core/recipes-devtools/qemu/{qemu-xilinx-7.1.0 => 
qemu-8.1}/cross.patch (82%)
 create mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch
 create mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch
 create mode 100644 meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch
 rename meta-xilinx-core/recipes-devtools/qemu/{qemu-xilinx-7.1.0 => 
qemu-8.1}/powerpc_rom.bin (100%)
 create mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init
 create mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev
 rename meta-xilinx-core/recipes-devtools/qemu/{qemu-xilinx-7.1.0 => 
qemu-8.1}/run-ptest (100%)
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb
 create mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb
 create mode 100644 meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc
 create mode 100644 meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc
 create mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch
 delete mode 100644 meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc
 create mode 100644 meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-7.1.inc
 create mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb
 create mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb
 delete mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb
 create mode 100644 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb
 delete mode 100644 meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb
 delete mode 100644 meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb
 delete mode 100644 meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb
 rename meta-xilinx-core/recipes-devtools/qemu/{qemu-xilinx_2023.2.bb => 
qemu-xilinx_2024.1.bb} (50%)
 create mode 100644 meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb

diff --git a/meta-xilinx-core/conf/layer.conf b/meta-xilinx-core/conf/layer.conf
index f7310bf1..ada4e688 100644
--- a/meta-xilinx-core/conf/layer.conf
+++ b/meta-xilinx-core/conf/layer.conf
@@ -46,15 +46,6 @@ XILINX_RELEASE_VERSION ??= "v2023.2"
 
 BUILDCFG_VARS:append = " SOC_VARIANT XILINX_RELEASE_VERSION"
 
-XILINX_QEMU_VERSION[v2022.1] = "v7.1.0-xilinx-v2022.1%"
-XILINX_QEMU_VERSION[v2022.2] = "v7.1.0-xilinx-v2022.2%"
-XILINX_QEMU_VERSION[v2023.1] = "v7.1.0-xilinx-v2023.1%"
-XILINX_QEMU_VERSION[v2023.2] = "v7.1.0-xilinx-v2023.2%"
-PREFERRED_VERSION_qemu-xilinx ?= "${@d.getVarFlag('XILINX_QEMU_VERSION', 
d.getVar('XILINX_RELEASE_VERSION')) or 'undefined'}"
-PREFERRED_VERSION_qemu-xilinx-native ?= 
"${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 
'undefined'}"
-PREFERRED_VERSION_qemu-xilinx-system-native ?= 
"${@d.getVarFlag('XILINX_QEMU_VERSION', d.getVar('XILINX_RELEASE_VERSION')) or 
'undefined'}"
-PREFERRED_VERSION_qemu-devicetrees ?= "xilinx-${XILINX_RELEASE_VERSION}%"
-
 DEFAULT_XILINX_QEMU = "qemu-xilinx"
 DEFAULT_XILINX_QEMU:arm = "qemu"
 PREFERRED_PROVIDER_qemu ?= "${DEFAULT_XILINX_QEMU}"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc
new file mode 100644
index 00000000..5154e247
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1.inc
@@ -0,0 +1,290 @@
+SUMMARY = "Fast open source processor emulator"
+DESCRIPTION = "QEMU is a hosted virtual machine monitor: it emulates the \
+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";
+LICENSE = "GPL-2.0-only & LGPL-2.1-only"
+
+DEPENDS += "bison-native meson-native ninja-native"
+
+RDEPENDS:${PN}-ptest = "bash"
+
+require qemu-targets-8.1.inc
+# 
https://gitlab.com/qemu-project/qemu/-/commit/81e2b198a8cb4ee5fdf108bd438f44b193ee3a36
 means
+# we need a full python3-native setup
+inherit pkgconfig ptest update-rc.d systemd python3native
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
+                    
file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"
+
+SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \
+           file://powerpc_rom.bin \
+           file://run-ptest \
+           
file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
+           file://0003-apic-fixup-fallthrough-to-PIC.patch \
+           file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \
+           file://0005-qemu-Do-not-include-file-if-not-exists.patch \
+           
file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \
+           file://0007-qemu-Determinism-fixes.patch \
+           
file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \
+           
file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \
+           
file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \
+           
file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \
+           file://fixedmeson.patch \
+           file://fixmips.patch \
+           file://no-pip.patch \
+           file://qemu-guest-agent.init \
+           file://qemu-guest-agent.udev \
+           "
+UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar"
+
+
+SRC_URI[sha256sum] = 
"541526a764576eb494d2ff5ec46aeb253e62ea29035d1c23c0a8af4e6cd4f087"
+
+SRC_URI:append:class-target = " file://cross.patch"
+SRC_URI:append:class-nativesdk = " file://cross.patch"
+
+CVE_STATUS[CVE-2017-5957] = "cpe-incorrect: Applies against virglrender < 
0.6.0 and not qemu itself"
+
+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."
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=1609015#c11
+CVE_STATUS[CVE-2018-18438] = "disputed: The issues identified by this CVE were 
determined to not constitute a vulnerability."
+
+# As per https://nvd.nist.gov/vuln/detail/CVE-2023-0664
+# https://bugzilla.redhat.com/show_bug.cgi?id=2167423
+CVE_STATUS[CVE-2023-0664] = "not-applicable-platform: Issue only applies on 
Windows"
+
+# As per https://bugzilla.redhat.com/show_bug.cgi?id=2203387
+CVE_STATUS[CVE-2023-2680] = "not-applicable-platform: RHEL specific issue."
+
+COMPATIBLE_HOST:mipsarchn32 = "null"
+COMPATIBLE_HOST:mipsarchn64 = "null"
+COMPATIBLE_HOST:riscv32 = "null"
+
+# Per https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html
+# upstream states qemu doesn't work without optimization
+DEBUG_BUILD = "0"
+
+do_install:append() {
+    # Prevent QA warnings about installed ${localstatedir}/run
+    if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
+}
+
+do_install_ptest() {
+       cp -rL ${B}/tests ${D}${PTEST_PATH}
+       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
+
+       # Strip the paths from the QEMU variable, we can use PATH
+       makfiles=$(find ${D}${PTEST_PATH} -name "*.mak")
+       sed -i -e "s#^QEMU=.*/qemu-#QEMU=qemu-#g" $makfiles
+
+       # Strip compiler flags as they break reproducibility
+       sed -i -e "s,^CC=.*,CC=gcc," \
+              -e "s,^CCAS=.*,CCAS=gcc," \
+              -e "s,^LD=.*,LD=ld," $makfiles
+
+       # Update SRC_PATH variable to the right place on target
+       sed -i -e "s#^SRC_PATH=.*#SRC_PATH=${PTEST_PATH}#g" $makfiles
+
+       # https://gitlab.com/qemu-project/qemu/-/issues/1403
+       rm ${D}${PTEST_PATH}/tests/unit/test-io-channel-command
+}
+
+# QEMU_TARGETS is overridable variable
+QEMU_TARGETS ?= "arm aarch64 i386 loongarch64 mips mipsel mips64 mips64el ppc 
ppc64 ppc64le riscv32 riscv64 sh4 x86_64"
+
+EXTRA_OECONF = " \
+    --prefix=${prefix} \
+    --bindir=${bindir} \
+    --includedir=${includedir} \
+    --libdir=${libdir} \
+    --mandir=${mandir} \
+    --datadir=${datadir} \
+    --docdir=${docdir}/${BPN} \
+    --sysconfdir=${sysconfdir} \
+    --libexecdir=${libexecdir} \
+    --localstatedir=${localstatedir} \
+    --with-suffix=${BPN} \
+    --disable-strip \
+    --disable-werror \
+    --extra-cflags='${CFLAGS}' \
+    --extra-ldflags='${LDFLAGS}' \
+    --disable-download \
+    --disable-docs \
+    --host-cc='${BUILD_CC}' \
+    ${PACKAGECONFIG_CONFARGS} \
+    "
+
+EXTRA_OECONF:append:class-target = " --cross-prefix=${HOST_PREFIX}"
+EXTRA_OECONF:append:class-nativesdk = " --cross-prefix=${HOST_PREFIX}"
+
+B = "${WORKDIR}/build"
+
+#EXTRA_OECONF:append = " --python=${HOSTTOOLS_DIR}/python3"
+
+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_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
+       fi
+}
+
+do_configure() {
+    export PKG_CONFIG=pkg-config
+    ${S}/configure ${EXTRA_OECONF}
+}
+do_configure[cleandirs] += "${B}"
+
+do_install () {
+       export STRIP=""
+       oe_runmake 'DESTDIR=${D}' install
+
+       # If we built the guest agent, also install startup/udev rules
+       if [ -e "${D}${bindir}/qemu-ga" ]; then
+               install -d ${D}${sysconfdir}/init.d/
+               install -m 0755 ${WORKDIR}/qemu-guest-agent.init 
${D}${sysconfdir}/init.d/qemu-guest-agent
+               sed -i 's:@bindir@:${bindir}:' 
${D}${sysconfdir}/init.d/qemu-guest-agent
+
+               install -d ${D}${sysconfdir}/udev/rules.d/
+               install -m 0644 ${WORKDIR}/qemu-guest-agent.udev 
${D}${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules
+
+               install -d ${D}${systemd_unitdir}/system/
+               install -m 0644 ${S}/contrib/systemd/qemu-guest-agent.service 
${D}${systemd_unitdir}/system
+               sed -i -e 's,-/usr/bin/,-${bindir}/,g' 
${D}${systemd_unitdir}/system/qemu-guest-agent.service
+       fi
+       # ELF binary /usr/share/qemu/s390-netboot.img has relocations in .text
+       rm ${D}${datadir}/qemu/s390-netboot.img -f
+       # ELF binary /usr/share/qemu/s390-ccw.img has relocations in .text 
[textrel]
+       rm ${D}${datadir}/qemu/s390-ccw.img -f
+}
+
+# The following fragment will create a wrapper for qemu-mips user emulation
+# binary in order to work around a segmentation fault issue. Basically, by
+# default, the reserved virtual address space for 32-on-64 bit is set to 4GB.
+# This will trigger a MMU access fault in the virtual CPU. With this change,
+# the qemu-mips works fine.
+# IMPORTANT: This piece needs to be removed once the root cause is fixed!
+do_install:append() {
+       if [ -e "${D}/${bindir}/qemu-mips" ]; then
+               create_wrapper ${D}/${bindir}/qemu-mips \
+                       QEMU_RESERVED_VA=0x0
+       fi
+}
+# END of qemu-mips workaround
+
+# Disable kvm/virgl/mesa on targets that do not support it
+PACKAGECONFIG:remove:darwin = "kvm virglrenderer epoxy gtk+"
+PACKAGECONFIG:remove:mingw32 = "kvm virglrenderer epoxy gtk+ pie"
+
+PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl2"
+PACKAGECONFIG[png] = "--enable-png,--disable-png,libpng"
+PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr 
--enable-cap-ng,--disable-virtfs,libcap-ng attr,"
+PACKAGECONFIG[aio] = "--enable-linux-aio,--disable-linux-aio,libaio,"
+PACKAGECONFIG[uring] = 
"--enable-linux-io-uring,--disable-linux-io-uring,liburing"
+PACKAGECONFIG[xen] = 
"--enable-xen,--disable-xen,xen-tools,xen-tools-libxenstore 
xen-tools-libxenctrl xen-tools-libxenguest"
+PACKAGECONFIG[vnc-sasl] = "--enable-vnc 
--enable-vnc-sasl,--disable-vnc-sasl,cyrus-sasl,"
+PACKAGECONFIG[vnc-jpeg] = "--enable-vnc 
--enable-vnc-jpeg,--disable-vnc-jpeg,jpeg,"
+PACKAGECONFIG[libcurl] = "--enable-curl,--disable-curl,curl,"
+PACKAGECONFIG[nss] = "--enable-smartcard,--disable-smartcard,nss,"
+PACKAGECONFIG[curses] = "--enable-curses,--disable-curses,ncurses,"
+PACKAGECONFIG[gtk+] = "--enable-gtk,--disable-gtk,gtk+3 gettext-native"
+PACKAGECONFIG[vte] = "--enable-vte,--disable-vte,vte gettext-native"
+PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng,"
+PACKAGECONFIG[ssh] = "--enable-libssh,--disable-libssh,libssh,"
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt,"
+PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle"
+PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
+PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
+PACKAGECONFIG[alsa] = "--audio-drv-list=default,,alsa-lib"
+PACKAGECONFIG[epoxy] = "--enable-opengl,--disable-opengl,libepoxy"
+PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo"
+PACKAGECONFIG[dax] = "--enable-libdaxctl,--disable-libdaxctl,ndctl"
+PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl"
+PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls"
+PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
+PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi"
+PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm"
+PACKAGECONFIG[virglrenderer] = 
"--enable-virglrenderer,--disable-virglrenderer,virglrenderer"
+# spice will be in meta-networking layer
+PACKAGECONFIG[spice] = "--enable-spice,--disable-spice,spice"
+# usbredir will be in meta-networking layer
+PACKAGECONFIG[dbus-display] = 
"--enable-dbus-display,--disable-dbus-display,glib-2.0-native,dbus"
+PACKAGECONFIG[usb-redir] = "--enable-usb-redir,--disable-usb-redir,usbredir"
+PACKAGECONFIG[snappy] = "--enable-snappy,--disable-snappy,snappy"
+PACKAGECONFIG[glusterfs] = "--enable-glusterfs,--disable-glusterfs,glusterfs"
+PACKAGECONFIG[xkbcommon] = 
"--enable-xkbcommon,--disable-xkbcommon,libxkbcommon"
+PACKAGECONFIG[libudev] = "--enable-libudev,--disable-libudev,udev"
+PACKAGECONFIG[attr] = "--enable-attr,--disable-attr,attr,"
+PACKAGECONFIG[rbd] = "--enable-rbd,--disable-rbd,ceph,ceph"
+PACKAGECONFIG[vhost] = "--enable-vhost-net,--disable-vhost-net,,"
+PACKAGECONFIG[ust] = "--enable-trace-backends=ust,,lttng-ust,"
+PACKAGECONFIG[pie] = "--enable-pie,--disable-pie,,"
+PACKAGECONFIG[seccomp] = "--enable-seccomp,--disable-seccomp,libseccomp"
+# libnfs is currently provided by meta-kodi
+PACKAGECONFIG[libnfs] = "--enable-libnfs,--disable-libnfs,libnfs"
+PACKAGECONFIG[pmem] = "--enable-libpmem,--disable-libpmem,pmdk"
+PACKAGECONFIG[pulseaudio] = "--enable-pa,--disable-pa,pulseaudio"
+PACKAGECONFIG[selinux] = "--enable-selinux,--disable-selinux"
+PACKAGECONFIG[bpf] = "--enable-bpf,--disable-bpf,libbpf"
+PACKAGECONFIG[capstone] = "--enable-capstone,--disable-capstone"
+PACKAGECONFIG[rdma] = "--enable-rdma,--disable-rdma"
+PACKAGECONFIG[vde] = "--enable-vde,--disable-vde"
+PACKAGECONFIG[fuse] = "--enable-fuse --enable-fuse-lseek,--disable-fuse 
--disable-fuse-lseek,fuse3"
+PACKAGECONFIG[slirp] = "--enable-slirp,--disable-slirp,libslirp"
+PACKAGECONFIG[brlapi] = "--enable-brlapi,--disable-brlapi"
+PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack,"
+PACKAGECONFIG[debuginfo] = "--enable-libdw,--disable-libdw,elfutils"
+PACKAGECONFIG[pipewire] = "--enable-pipewire,--disable-pipewire,pipewire"
+PACKAGECONFIG[sndio] = "--enable-sndio,--disable-sndio,sndio"
+
+INSANE_SKIP:${PN}-common = "arch"
+
+FILES:${PN} += "${datadir}/icons"
+
+# For user who want to install all arch packages
+PACKAGES =+ "${PN}-common"
+RDEPENDS:${PN} += "${PN}-common"
+
+ALLOW_EMPTY:${PN} = "1"
+FILES:${PN} = ""
+
+FILES:${PN}-common = "${bindir}/* ${includedir}/* ${libexecdir}/* ${datadir}/* 
${localstatedir}"
+
+PACKAGES_DYNAMIC += "^${PN}-user-.*  ^${PN}-system-.*"
+
+PACKAGESPLITFUNCS =+ "split_qemu_packages"
+
+python split_qemu_packages () {
+    archdir = d.expand('${bindir}/')
+    subpackages = do_split_packages(d, archdir, r'^qemu-system-(.*)$', 
'${PN}-system-%s', 'QEMU full system emulation binaries(%s)' , prepend=True, 
extra_depends='${PN}-common')
+
+    subpackages += do_split_packages(d, archdir, 
r'^qemu-((?!system|edid|ga|img|io|nbd|pr-helper|storage-daemon).*)$', 
'${PN}-user-%s', 'QEMU full user emulation binaries(%s)' , prepend=True, 
extra_depends='${PN}-common')
+    if subpackages:
+        d.appendVar('RDEPENDS:' + d.getVar('PN'), ' ' + ' '.join(subpackages))
+    mipspackage = d.getVar('PN') + "-user-mips"
+    if mipspackage in ' '.join(subpackages):
+        d.appendVar('RDEPENDS:' + mipspackage, ' ' + d.getVar("MLPREFIX") + 
'bash')
+}
+
+# Put the guest agent in a separate package
+PACKAGES =+ "${PN}-guest-agent"
+SUMMARY:${PN}-guest-agent = "QEMU guest agent"
+FILES:${PN}-guest-agent += " \
+    ${bindir}/qemu-ga \
+    ${sysconfdir}/udev/rules.d/60-qemu-guest-agent.rules \
+    ${sysconfdir}/init.d/qemu-guest-agent \
+    ${systemd_unitdir}/system/qemu-guest-agent.service \
+"
+
+INITSCRIPT_PACKAGES = "${PN}-guest-agent"
+INITSCRIPT_NAME:${PN}-guest-agent = "qemu-guest-agent"
+INITSCRIPT_PARAMS:${PN}-guest-agent = "defaults"
+
+SYSTEMD_PACKAGES = "${PN}-guest-agent"
+SYSTEMD_SERVICE:${PN}-guest-agent = "qemu-guest-agent.service"
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
similarity index 84%
rename from 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
rename to 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
index 6fb160e6..c6550801 100644
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
+++ 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch
@@ -18,11 +18,11 @@ Signed-off-by: Roy Li <[email protected]>
  hw/mips/malta.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/hw/mips/malta.c b/hw/mips/malta.c
-index 628851172..12d37f35d 100644
---- a/hw/mips/malta.c
-+++ b/hw/mips/malta.c
-@@ -61,7 +61,7 @@
+Index: qemu-8.0.0/hw/mips/malta.c
+===================================================================
+--- qemu-8.0.0.orig/hw/mips/malta.c
++++ qemu-8.0.0/hw/mips/malta.c
+@@ -64,7 +64,7 @@
  #define ENVP_PADDR          0x2000
  #define ENVP_VADDR          cpu_mips_phys_to_kseg0(NULL, ENVP_PADDR)
  #define ENVP_NB_ENTRIES     16
@@ -31,6 +31,3 @@ index 628851172..12d37f35d 100644
  
  /* Hardware addresses */
  #define FLASH_ADDRESS       0x1e000000ULL
--- 
-2.30.2
-
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch
 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch
new file mode 100644
index 00000000..ceae67be
--- /dev/null
+++ 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch
@@ -0,0 +1,355 @@
+From 71f14902256e3c3529710b713e1ea43100bf4c40 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Sat, 17 Dec 2022 08:37:46 -0800
+Subject: [PATCH 2/2] linux-user: Replace use of lfs64 related functions and
+ macros
+
+Builds defines -D_FILE_OFFSET_BITS=64 which makes the original functions
+anf macros behave same as their 64 suffixed counterparts. This also
+helps in compiling with latest musl C library, where these macros and
+functions are no more available under _GNU_SOURCE feature macro
+
+Upstream-Status: Submitted 
[https://lists.gnu.org/archive/html/qemu-devel/2022-12/msg02841.html]
+Signed-off-by: Khem Raj <[email protected]>
+Cc: Laurent Vivier <[email protected]>
+---
+ linux-user/syscall.c | 153 +++++++++++--------------------------------
+ 1 file changed, 39 insertions(+), 114 deletions(-)
+
+Index: qemu-8.0.0/linux-user/syscall.c
+===================================================================
+--- qemu-8.0.0.orig/linux-user/syscall.c
++++ qemu-8.0.0/linux-user/syscall.c
+@@ -761,8 +761,8 @@ safe_syscall6(ssize_t, copy_file_range,
+  */
+ #define safe_ioctl(...) safe_syscall(__NR_ioctl, __VA_ARGS__)
+ /* Similarly for fcntl. Note that callers must always:
+- *  pass the F_GETLK64 etc constants rather than the unsuffixed F_GETLK
+- *  use the flock64 struct rather than unsuffixed flock
++ *  pass the F_GETLK etc constants rather than the unsuffixed F_GETLK
++ *  use the flock struct rather than unsuffixed flock
+  * This will then work and use a 64-bit offset for both 32-bit and 64-bit 
hosts.
+  */
+ #ifdef __NR_fcntl64
+@@ -6813,13 +6813,13 @@ static int target_to_host_fcntl_cmd(int
+         ret = cmd;
+         break;
+     case TARGET_F_GETLK:
+-        ret = F_GETLK64;
++        ret = F_GETLK;
+         break;
+     case TARGET_F_SETLK:
+-        ret = F_SETLK64;
++        ret = F_SETLK;
+         break;
+     case TARGET_F_SETLKW:
+-        ret = F_SETLKW64;
++        ret = F_SETLKW;
+         break;
+     case TARGET_F_GETOWN:
+         ret = F_GETOWN;
+@@ -6833,17 +6833,6 @@ static int target_to_host_fcntl_cmd(int
+     case TARGET_F_SETSIG:
+         ret = F_SETSIG;
+         break;
+-#if TARGET_ABI_BITS == 32
+-    case TARGET_F_GETLK64:
+-        ret = F_GETLK64;
+-        break;
+-    case TARGET_F_SETLK64:
+-        ret = F_SETLK64;
+-        break;
+-    case TARGET_F_SETLKW64:
+-        ret = F_SETLKW64;
+-        break;
+-#endif
+     case TARGET_F_SETLEASE:
+         ret = F_SETLEASE;
+         break;
+@@ -6895,8 +6884,8 @@ static int target_to_host_fcntl_cmd(int
+      * them to 5, 6 and 7 before making the syscall(). Since we make the
+      * syscall directly, adjust to what is supported by the kernel.
+      */
+-    if (ret >= F_GETLK64 && ret <= F_SETLKW64) {
+-        ret -= F_GETLK64 - 5;
++    if (ret >= F_GETLK && ret <= F_SETLKW) {
++        ret -= F_GETLK - 5;
+     }
+ #endif
+ 
+@@ -6929,55 +6918,11 @@ static int host_to_target_flock(int type
+     return type;
+ }
+ 
+-static inline abi_long copy_from_user_flock(struct flock64 *fl,
+-                                            abi_ulong target_flock_addr)
+-{
+-    struct target_flock *target_fl;
+-    int l_type;
+-
+-    if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) {
+-        return -TARGET_EFAULT;
+-    }
+-
+-    __get_user(l_type, &target_fl->l_type);
+-    l_type = target_to_host_flock(l_type);
+-    if (l_type < 0) {
+-        return l_type;
+-    }
+-    fl->l_type = l_type;
+-    __get_user(fl->l_whence, &target_fl->l_whence);
+-    __get_user(fl->l_start, &target_fl->l_start);
+-    __get_user(fl->l_len, &target_fl->l_len);
+-    __get_user(fl->l_pid, &target_fl->l_pid);
+-    unlock_user_struct(target_fl, target_flock_addr, 0);
+-    return 0;
+-}
+-
+-static inline abi_long copy_to_user_flock(abi_ulong target_flock_addr,
+-                                          const struct flock64 *fl)
+-{
+-    struct target_flock *target_fl;
+-    short l_type;
+-
+-    if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) {
+-        return -TARGET_EFAULT;
+-    }
+-
+-    l_type = host_to_target_flock(fl->l_type);
+-    __put_user(l_type, &target_fl->l_type);
+-    __put_user(fl->l_whence, &target_fl->l_whence);
+-    __put_user(fl->l_start, &target_fl->l_start);
+-    __put_user(fl->l_len, &target_fl->l_len);
+-    __put_user(fl->l_pid, &target_fl->l_pid);
+-    unlock_user_struct(target_fl, target_flock_addr, 1);
+-    return 0;
+-}
+-
+-typedef abi_long from_flock64_fn(struct flock64 *fl, abi_ulong target_addr);
+-typedef abi_long to_flock64_fn(abi_ulong target_addr, const struct flock64 
*fl);
++typedef abi_long from_flock_fn(struct flock *fl, abi_ulong target_addr);
++typedef abi_long to_flock_fn(abi_ulong target_addr, const struct flock *fl);
+ 
+ #if defined(TARGET_ARM) && TARGET_ABI_BITS == 32
+-struct target_oabi_flock64 {
++struct target_oabi_flock {
+     abi_short l_type;
+     abi_short l_whence;
+     abi_llong l_start;
+@@ -6985,10 +6930,10 @@ struct target_oabi_flock64 {
+     abi_int   l_pid;
+ } QEMU_PACKED;
+ 
+-static inline abi_long copy_from_user_oabi_flock64(struct flock64 *fl,
++static inline abi_long copy_from_user_oabi_flock(struct flock *fl,
+                                                    abi_ulong 
target_flock_addr)
+ {
+-    struct target_oabi_flock64 *target_fl;
++    struct target_oabi_flock *target_fl;
+     int l_type;
+ 
+     if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) {
+@@ -7009,10 +6954,10 @@ static inline abi_long copy_from_user_oa
+     return 0;
+ }
+ 
+-static inline abi_long copy_to_user_oabi_flock64(abi_ulong target_flock_addr,
+-                                                 const struct flock64 *fl)
++static inline abi_long copy_to_user_oabi_flock(abi_ulong target_flock_addr,
++                                                 const struct flock *fl)
+ {
+-    struct target_oabi_flock64 *target_fl;
++    struct target_oabi_flock *target_fl;
+     short l_type;
+ 
+     if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) {
+@@ -7030,10 +6975,10 @@ static inline abi_long copy_to_user_oabi
+ }
+ #endif
+ 
+-static inline abi_long copy_from_user_flock64(struct flock64 *fl,
++static inline abi_long copy_from_user_flock(struct flock *fl,
+                                               abi_ulong target_flock_addr)
+ {
+-    struct target_flock64 *target_fl;
++    struct target_flock *target_fl;
+     int l_type;
+ 
+     if (!lock_user_struct(VERIFY_READ, target_fl, target_flock_addr, 1)) {
+@@ -7054,10 +6999,10 @@ static inline abi_long copy_from_user_fl
+     return 0;
+ }
+ 
+-static inline abi_long copy_to_user_flock64(abi_ulong target_flock_addr,
+-                                            const struct flock64 *fl)
++static inline abi_long copy_to_user_flock(abi_ulong target_flock_addr,
++                                            const struct flock *fl)
+ {
+-    struct target_flock64 *target_fl;
++    struct target_flock *target_fl;
+     short l_type;
+ 
+     if (!lock_user_struct(VERIFY_WRITE, target_fl, target_flock_addr, 0)) {
+@@ -7076,7 +7021,7 @@ static inline abi_long copy_to_user_floc
+ 
+ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg)
+ {
+-    struct flock64 fl64;
++    struct flock fl64;
+ #ifdef F_GETOWN_EX
+     struct f_owner_ex fox;
+     struct target_f_owner_ex *target_fox;
+@@ -7089,6 +7034,7 @@ static abi_long do_fcntl(int fd, int cmd
+ 
+     switch(cmd) {
+     case TARGET_F_GETLK:
++    case TARGET_F_OFD_GETLK:
+         ret = copy_from_user_flock(&fl64, arg);
+         if (ret) {
+             return ret;
+@@ -7098,32 +7044,11 @@ static abi_long do_fcntl(int fd, int cmd
+             ret = copy_to_user_flock(arg, &fl64);
+         }
+         break;
+-
+     case TARGET_F_SETLK:
+     case TARGET_F_SETLKW:
+-        ret = copy_from_user_flock(&fl64, arg);
+-        if (ret) {
+-            return ret;
+-        }
+-        ret = get_errno(safe_fcntl(fd, host_cmd, &fl64));
+-        break;
+-
+-    case TARGET_F_GETLK64:
+-    case TARGET_F_OFD_GETLK:
+-        ret = copy_from_user_flock64(&fl64, arg);
+-        if (ret) {
+-            return ret;
+-        }
+-        ret = get_errno(safe_fcntl(fd, host_cmd, &fl64));
+-        if (ret == 0) {
+-            ret = copy_to_user_flock64(arg, &fl64);
+-        }
+-        break;
+-    case TARGET_F_SETLK64:
+-    case TARGET_F_SETLKW64:
+     case TARGET_F_OFD_SETLK:
+     case TARGET_F_OFD_SETLKW:
+-        ret = copy_from_user_flock64(&fl64, arg);
++        ret = copy_from_user_flock(&fl64, arg);
+         if (ret) {
+             return ret;
+         }
+@@ -7348,7 +7273,7 @@ static inline abi_long target_truncate64
+         arg2 = arg3;
+         arg3 = arg4;
+     }
+-    return get_errno(truncate64(arg1, target_offset64(arg2, arg3)));
++    return get_errno(truncate(arg1, target_offset64(arg2, arg3)));
+ }
+ #endif
+ 
+@@ -7362,7 +7287,7 @@ static inline abi_long target_ftruncate6
+         arg2 = arg3;
+         arg3 = arg4;
+     }
+-    return get_errno(ftruncate64(arg1, target_offset64(arg2, arg3)));
++    return get_errno(ftruncate(arg1, target_offset64(arg2, arg3)));
+ }
+ #endif
+ 
+@@ -8598,7 +8523,7 @@ static int do_getdents(abi_long dirfd, a
+     void *tdirp;
+     int hlen, hoff, toff;
+     int hreclen, treclen;
+-    off64_t prev_diroff = 0;
++    off_t prev_diroff = 0;
+ 
+     hdirp = g_try_malloc(count);
+     if (!hdirp) {
+@@ -8651,7 +8576,7 @@ static int do_getdents(abi_long dirfd, a
+              * Return what we have, resetting the file pointer to the
+              * location of the first record not returned.
+              */
+-            lseek64(dirfd, prev_diroff, SEEK_SET);
++            lseek(dirfd, prev_diroff, SEEK_SET);
+             break;
+         }
+ 
+@@ -8685,7 +8610,7 @@ static int do_getdents64(abi_long dirfd,
+     void *tdirp;
+     int hlen, hoff, toff;
+     int hreclen, treclen;
+-    off64_t prev_diroff = 0;
++    off_t prev_diroff = 0;
+ 
+     hdirp = g_try_malloc(count);
+     if (!hdirp) {
+@@ -8727,7 +8652,7 @@ static int do_getdents64(abi_long dirfd,
+              * Return what we have, resetting the file pointer to the
+              * location of the first record not returned.
+              */
+-            lseek64(dirfd, prev_diroff, SEEK_SET);
++            lseek(dirfd, prev_diroff, SEEK_SET);
+             break;
+         }
+ 
+@@ -11158,7 +11083,7 @@ static abi_long do_syscall1(CPUArchState
+                 return -TARGET_EFAULT;
+             }
+         }
+-        ret = get_errno(pread64(arg1, p, arg3, target_offset64(arg4, arg5)));
++        ret = get_errno(pread(arg1, p, arg3, target_offset64(arg4, arg5)));
+         unlock_user(p, arg2, ret);
+         return ret;
+     case TARGET_NR_pwrite64:
+@@ -11175,7 +11100,7 @@ static abi_long do_syscall1(CPUArchState
+                 return -TARGET_EFAULT;
+             }
+         }
+-        ret = get_errno(pwrite64(arg1, p, arg3, target_offset64(arg4, arg5)));
++        ret = get_errno(pwrite(arg1, p, arg3, target_offset64(arg4, arg5)));
+         unlock_user(p, arg2, 0);
+         return ret;
+ #endif
+@@ -11998,14 +11923,14 @@ static abi_long do_syscall1(CPUArchState
+     case TARGET_NR_fcntl64:
+     {
+         int cmd;
+-        struct flock64 fl;
+-        from_flock64_fn *copyfrom = copy_from_user_flock64;
+-        to_flock64_fn *copyto = copy_to_user_flock64;
++        struct flock fl;
++        from_flock_fn *copyfrom = copy_from_user_flock;
++        to_flock_fn *copyto = copy_to_user_flock;
+ 
+ #ifdef TARGET_ARM
+         if (!cpu_env->eabi) {
+-            copyfrom = copy_from_user_oabi_flock64;
+-            copyto = copy_to_user_oabi_flock64;
++            copyfrom = copy_from_user_oabi_flock;
++            copyto = copy_to_user_oabi_flock;
+         }
+ #endif
+ 
+@@ -12015,7 +11940,7 @@ static abi_long do_syscall1(CPUArchState
+         }
+ 
+         switch(arg2) {
+-        case TARGET_F_GETLK64:
++        case TARGET_F_GETLK:
+             ret = copyfrom(&fl, arg3);
+             if (ret) {
+                 break;
+@@ -12026,8 +11951,8 @@ static abi_long do_syscall1(CPUArchState
+             }
+           break;
+ 
+-        case TARGET_F_SETLK64:
+-        case TARGET_F_SETLKW64:
++        case TARGET_F_SETLK:
++        case TARGET_F_SETLKW:
+             ret = copyfrom(&fl, arg3);
+             if (ret) {
+                 break;
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0003-apic-fixup-fallthrough-to-PIC.patch
 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch
similarity index 87%
rename from 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0003-apic-fixup-fallthrough-to-PIC.patch
rename to 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch
index f350ffce..e85f8202 100644
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0003-apic-fixup-fallthrough-to-PIC.patch
+++ 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0003-apic-fixup-fallthrough-to-PIC.patch
@@ -29,11 +29,11 @@ Signed-off-by: He Zhe <[email protected]>
  hw/intc/apic.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/hw/intc/apic.c b/hw/intc/apic.c
-index 3df11c34d..9506c88ce 100644
---- a/hw/intc/apic.c
-+++ b/hw/intc/apic.c
-@@ -605,7 +605,7 @@ int apic_accept_pic_intr(DeviceState *dev)
+Index: qemu-8.0.0/hw/intc/apic.c
+===================================================================
+--- qemu-8.0.0.orig/hw/intc/apic.c
++++ qemu-8.0.0/hw/intc/apic.c
+@@ -607,7 +607,7 @@ int apic_accept_pic_intr(DeviceState *de
      APICCommonState *s = APIC(dev);
      uint32_t lvt0;
  
@@ -42,6 +42,3 @@ index 3df11c34d..9506c88ce 100644
          return -1;
  
      lvt0 = s->lvt[APIC_LVT_LINT0];
--- 
-2.30.2
-
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch
 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch
similarity index 74%
rename from 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch
rename to 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch
index 6faebd4e..f981a64a 100644
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch
+++ 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0004-configure-Add-pkg-config-handling-for-libgcrypt.patch
@@ -14,19 +14,16 @@ Signed-off-by: He Zhe <[email protected]>
  meson.build | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/meson.build b/meson.build
-index 861de93c4..d45ff2d7c 100644
---- a/meson.build
-+++ b/meson.build
-@@ -1063,7 +1063,7 @@ endif
+Index: qemu-8.1.0/meson.build
+===================================================================
+--- qemu-8.1.0.orig/meson.build
++++ qemu-8.1.0/meson.build
+@@ -1481,7 +1481,7 @@ endif
  if not gnutls_crypto.found()
    if (not get_option('gcrypt').auto() or have_system) and not 
get_option('nettle').enabled()
      gcrypt = dependency('libgcrypt', version: '>=1.8',
 -                        method: 'config-tool',
 +                        method: 'pkg-config',
-                         required: get_option('gcrypt'),
-                         kwargs: static_kwargs)
+                         required: get_option('gcrypt'))
      # Debian has removed -lgpg-error from libgcrypt-config
--- 
-2.30.2
-
+     # as it "spreads unnecessary dependencies" which in
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0005-qemu-Do-not-include-file-if-not-exists.patch
 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch
similarity index 80%
rename from 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0005-qemu-Do-not-include-file-if-not-exists.patch
rename to 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch
index 3f3c39f9..38aa4c3b 100644
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0005-qemu-Do-not-include-file-if-not-exists.patch
+++ 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0005-qemu-Do-not-include-file-if-not-exists.patch
@@ -16,11 +16,11 @@ Signed-off-by: Sakib Sajal <[email protected]>
  linux-user/syscall.c | 2 ++
  1 file changed, 2 insertions(+)
 
-diff --git a/linux-user/syscall.c b/linux-user/syscall.c
-index f65045efe..340e0c6f0 100644
---- a/linux-user/syscall.c
-+++ b/linux-user/syscall.c
-@@ -113,7 +113,9 @@
+Index: qemu-8.0.0/linux-user/syscall.c
+===================================================================
+--- qemu-8.0.0.orig/linux-user/syscall.c
++++ qemu-8.0.0/linux-user/syscall.c
+@@ -115,7 +115,9 @@
  #include <linux/blkpg.h>
  #include <netpacket/packet.h>
  #include <linux/netlink.h>
@@ -30,6 +30,3 @@ index f65045efe..340e0c6f0 100644
  #include <linux/rtc.h>
  #include <sound/asound.h>
  #ifdef HAVE_BTRFS_H
--- 
-2.30.2
-
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
similarity index 87%
rename from 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
rename to 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
index 75c03693..5d1d7c68 100644
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
+++ 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch
@@ -23,11 +23,11 @@ Signed-off-by: Richard Purdie 
<[email protected]
  linux-user/mmap.c | 10 +++++++---
  1 file changed, 7 insertions(+), 3 deletions(-)
 
-diff --git a/linux-user/mmap.c b/linux-user/mmap.c
-index c125031b9..e651834a5 100644
---- a/linux-user/mmap.c
-+++ b/linux-user/mmap.c
-@@ -749,12 +749,16 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong 
old_size,
+Index: qemu-8.0.0/linux-user/mmap.c
+===================================================================
+--- qemu-8.0.0.orig/linux-user/mmap.c
++++ qemu-8.0.0/linux-user/mmap.c
+@@ -776,12 +776,16 @@ abi_long target_mremap(abi_ulong old_add
      int prot;
      void *host_addr;
  
@@ -47,6 +47,3 @@ index c125031b9..e651834a5 100644
          return -1;
      }
  
--- 
-2.30.2
-
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0007-qemu-Determinism-fixes.patch
 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch
similarity index 83%
rename from 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0007-qemu-Determinism-fixes.patch
rename to 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch
index 0d7dae36..d3f965e0 100644
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0007-qemu-Determinism-fixes.patch
+++ 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0007-qemu-Determinism-fixes.patch
@@ -16,10 +16,10 @@ RP 2021/3/1
  scripts/decodetree.py | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/scripts/decodetree.py b/scripts/decodetree.py
-index a03dc6b5e..4ea24c1f3 100644
---- a/scripts/decodetree.py
-+++ b/scripts/decodetree.py
+Index: qemu-8.0.0/scripts/decodetree.py
+===================================================================
+--- qemu-8.0.0.orig/scripts/decodetree.py
++++ qemu-8.0.0/scripts/decodetree.py
 @@ -1328,7 +1328,7 @@ def main():
      toppat = ExcMultiPattern(0)
  
@@ -29,6 +29,3 @@ index a03dc6b5e..4ea24c1f3 100644
          f = open(filename, 'rt', encoding='utf-8')
          parse_file(f, toppat)
          f.close()
--- 
-2.30.2
-
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch
 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch
similarity index 58%
rename from 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch
rename to 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch
index 43d3c7cf..a84364cc 100644
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch
+++ 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0008-tests-meson.build-use-relative-path-to-refer-to-file.patch
@@ -17,22 +17,25 @@ Signed-off-by: Changqing Li <[email protected]>
  tests/unit/meson.build | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/tests/unit/meson.build b/tests/unit/meson.build
-index 96b295263..e4c3246dc 100644
---- a/tests/unit/meson.build
-+++ b/tests/unit/meson.build
-@@ -44,9 +44,9 @@ tests = {
+Index: qemu-8.0.0/tests/unit/meson.build
+===================================================================
+--- qemu-8.0.0.orig/tests/unit/meson.build
++++ qemu-8.0.0/tests/unit/meson.build
+@@ -46,7 +46,7 @@ tests = {
    'test-keyval': [testqapi],
    'test-logging': [],
    'test-uuid': [],
 -  'ptimer-test': ['ptimer-test-stubs.c', meson.project_source_root() / 
'hw/core/ptimer.c'],
 +  'ptimer-test': ['ptimer-test-stubs.c', '../../hw/core/ptimer.c'],
    'test-qapi-util': [],
--  'test-smp-parse': [qom, meson.project_source_root() / 
'hw/core/machine-smp.c'],
-+  'test-smp-parse': [qom, '../../hw/core/machine-smp.c'],
- }
- 
- if have_system or have_tools
--- 
-2.30.2
-
+   'test-interval-tree': [],
+   'test-xs-node': [qom],
+@@ -136,7 +136,7 @@ if have_system
+     'test-util-sockets': ['socket-helpers.c'],
+     'test-base64': [],
+     'test-bufferiszero': [],
+-    'test-smp-parse': [qom, meson.project_source_root() / 
'hw/core/machine-smp.c'],
++    'test-smp-parse': [qom, '../../hw/core/machine-smp.c'],
+     'test-vmstate': [migration, io],
+     'test-yank': ['socket-helpers.c', qom, io, chardev]
+   }
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
similarity index 88%
rename from 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
rename to 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
index 23d0a698..4de6cc24 100644
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
+++ 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch
@@ -18,10 +18,10 @@ Cc: Michael S. Tsirkin <[email protected]>
  util/mmap-alloc.c | 10 +++++++---
  1 file changed, 7 insertions(+), 3 deletions(-)
 
-diff --git a/util/mmap-alloc.c b/util/mmap-alloc.c
-index 893d86435..86d3cda24 100644
---- a/util/mmap-alloc.c
-+++ b/util/mmap-alloc.c
+Index: qemu-8.0.0/util/mmap-alloc.c
+===================================================================
+--- qemu-8.0.0.orig/util/mmap-alloc.c
++++ qemu-8.0.0/util/mmap-alloc.c
 @@ -10,14 +10,18 @@
   * later.  See the COPYING file in the top-level directory.
   */
@@ -44,6 +44,3 @@ index 893d86435..86d3cda24 100644
  #include "qemu/mmap-alloc.h"
  #include "qemu/host-utils.h"
  #include "qemu/cutils.h"
--- 
-2.30.2
-
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch
 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch
similarity index 80%
rename from 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch
rename to 
meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch
index 810c74fa..6caf35b6 100644
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch
+++ 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch
@@ -21,13 +21,13 @@ Signed-off-by: Yuval Shaia <[email protected]>
  hw/rdma/vmw/pvrdma_cmd.c | 6 ++++++
  1 file changed, 6 insertions(+)
 
-diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c
-index da7ddfa548..89db963c46 100644
---- a/hw/rdma/vmw/pvrdma_cmd.c
-+++ b/hw/rdma/vmw/pvrdma_cmd.c
-@@ -796,6 +796,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev)
- 
-     dsr_info = &dev->dsr_info;
+Index: qemu-8.0.0/hw/rdma/vmw/pvrdma_cmd.c
+===================================================================
+--- qemu-8.0.0.orig/hw/rdma/vmw/pvrdma_cmd.c
++++ qemu-8.0.0/hw/rdma/vmw/pvrdma_cmd.c
+@@ -782,6 +782,12 @@ int pvrdma_exec_cmd(PVRDMADev *dev)
+             goto out;
+     }
  
 +    if (!dsr_info->dsr) {
 +            /* Buggy or malicious guest driver */
@@ -38,6 +38,3 @@ index da7ddfa548..89db963c46 100644
      if (dsr_info->req->hdr.cmd >= sizeof(cmd_handlers) /
                        sizeof(struct cmd_handler)) {
          rdma_error_report("Unsupported command");
--- 
-2.34.1
-
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/cross.patch 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch
similarity index 82%
rename from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/cross.patch
rename to meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch
index ca2ad361..112eb925 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/cross.patch
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/cross.patch
@@ -14,19 +14,19 @@ Signed-off-by: Richard Purdie 
<[email protected]>
  configure | 4 ----
  1 file changed, 4 deletions(-)
 
-Index: qemu-7.1.0/configure
+Index: qemu-8.0.0/configure
 ===================================================================
---- qemu-7.1.0.orig/configure
-+++ qemu-7.1.0/configure
-@@ -2710,7 +2710,6 @@ if test "$skip_meson" = no; then
-   echo "strip = [$(meson_quote $strip)]" >> $cross
+--- qemu-8.0.0.orig/configure
++++ qemu-8.0.0/configure
+@@ -2590,7 +2590,6 @@ if test "$skip_meson" = no; then
    echo "widl = [$(meson_quote $widl)]" >> $cross
    echo "windres = [$(meson_quote $windres)]" >> $cross
+   echo "windmc = [$(meson_quote $windmc)]" >> $cross
 -  if test "$cross_compile" = "yes"; then
      cross_arg="--cross-file config-meson.cross"
      echo "[host_machine]" >> $cross
      echo "system = '$targetos'" >> $cross
-@@ -2728,9 +2727,6 @@ if test "$skip_meson" = no; then
+@@ -2608,9 +2607,6 @@ if test "$skip_meson" = no; then
      else
          echo "endian = 'little'" >> $cross
      fi
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch
new file mode 100644
index 00000000..0cbaea07
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixedmeson.patch
@@ -0,0 +1,20 @@
+Upstream-Status: Inappropriate [workaround, would need a real fix for upstream]
+
+Index: qemu-8.1.0/configure
+===================================================================
+--- qemu-8.1.0.orig/configure
++++ qemu-8.1.0/configure
+@@ -1032,12 +1032,7 @@ then
+     exit 1
+ fi
+ 
+-# At this point, we expect Meson to be installed and available.
+-# We expect mkvenv or pip to have created pyvenv/bin/meson for us.
+-# We ignore PATH completely here: we want to use the venv's Meson
+-# *exclusively*.
+-
+-meson="$(cd pyvenv/bin; pwd)/meson"
++meson=`which meson`
+ 
+ # Conditionally ensure Sphinx is installed.
+ 
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch
new file mode 100644
index 00000000..01546d10
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/fixmips.patch
@@ -0,0 +1,18 @@
+Patch to fix mips boot hangs where virtio appears broken. Patch under 
discussion upstream. 
+Regression is introduced by other fixes to 8.1.0 to get x86 boots working.
+
+Upstream-Status: Pending 
[https://lore.kernel.org/qemu-devel/[email protected]/]
+
+Index: qemu-8.1.0/softmmu/physmem.c
+===================================================================
+--- qemu-8.1.0.orig/softmmu/physmem.c
++++ qemu-8.1.0/softmmu/physmem.c
+@@ -2517,7 +2517,7 @@ static void tcg_commit(MemoryListener *l
+      * That said, the listener is also called during realize, before
+      * all of the tcg machinery for run-on is initialized: thus halt_cond.
+      */
+-    if (cpu->halt_cond) {
++    if (cpu->halt_cond && !qemu_cpu_is_self(cpu)) {
+         async_run_on_cpu(cpu, tcg_commit_cpu, RUN_ON_CPU_HOST_PTR(cpuas));
+     } else {
+         tcg_commit_cpu(cpu, RUN_ON_CPU_HOST_PTR(cpuas));
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch
new file mode 100644
index 00000000..09e13e8b
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/no-pip.patch
@@ -0,0 +1,45 @@
+qemu: Ensure pip and the python venv aren't used for meson
+
+Qemu wants to use a supported python version and a specific meson version
+to "help" users and uses pip and creates a venv to do this. This is a nightmare
+for us. Our versions stay up to date and should be supported so we don't
+really need/want this wrapping. Tweak things to disable it.
+
+There was breakage from the wrapper shown by:
+
+bitbake qemu-system-native
+<add DISTRO_FEATURES:remove = "opengl" to local.conf>
+bitbake qemu-system-native -c configure
+
+which would crash. The issue is the change in configuration removes pieces
+from the sysroot but pyc files remainm as do pieces of pip which causes
+problems.
+
+Ideally we'd convince upstream to allow some way to disable the venv on
+the understanding that if/when it breaks, we keep the pieces. The patch
+as it stands is a workaround.
+
+Upstream-Status: Inappropriate [oe specific]
+Signed-off-by: Richard Purdie <[email protected]>
+
+Index: qemu-8.1.2/configure
+===================================================================
+--- qemu-8.1.2.orig/configure
++++ qemu-8.1.2/configure
+@@ -1009,7 +1009,7 @@ python="$(command -v "$python")"
+ echo "python determined to be '$python'"
+ echo "python version: $($python --version)"
+ 
+-python="$($python -B "${source_path}/python/scripts/mkvenv.py" create pyvenv)"
++python=python3
+ if test "$?" -ne 0 ; then
+     error_exit "python venv creation failed"
+ fi
+@@ -1017,6 +1017,7 @@ fi
+ # Suppress writing compiled files
+ python="$python -B"
+ mkvenv="$python ${source_path}/python/scripts/mkvenv.py"
++mkvenv=true
+ 
+ mkvenv_flags=""
+ if test "$download" = "enabled" ; then
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/powerpc_rom.bin 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin
similarity index 100%
rename from 
meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/powerpc_rom.bin
rename to meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/powerpc_rom.bin
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init
new file mode 100644
index 00000000..5ebaadde
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.init
@@ -0,0 +1,75 @@
+# SPDX-License-Identifier: GPL-2.0-only
+# Initially written by: Michael Tokarev <[email protected]>
+# For QEMU Debian downstream package
+
+set -e
+
+. /etc/init.d/functions
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="QEMU Guest Agent"
+NAME=qemu-ga
+DAEMON=@bindir@/$NAME
+PIDFILE=/var/run/$NAME.pid
+
+# config
+DAEMON_ARGS=""
+# default transport
+TRANSPORT=virtio-serial:/dev/virtio-ports/org.qemu.guest_agent.0
+NO_START=0
+
+test ! -r /etc/default/qemu-guest-agent || . /etc/default/qemu-guest-agent
+test "$NO_START" = "0" || exit 0
+test -x "$DAEMON" || exit 0
+
+#
+# Function that checks whenever system has necessary environment
+# It also splits $TRANSPORT into $method and $path
+#
+do_check_transport() {
+       method=${TRANSPORT%%:*};
+       path=${TRANSPORT#*:}
+       case "$method" in
+           virtio-serial | isa-serial)
+               if [ ! -e "$path" ]; then
+                   echo "$NAME: transport endpoint not found, not starting"
+                   return 1
+               fi
+               ;;
+       esac
+}
+
+case "$1" in
+  start)
+       do_check_transport || exit 0
+       echo -n "Starting $DESC: "
+       start-stop-daemon -S -p $PIDFILE -x "$DAEMON" -- \
+               $DAEMON_ARGS -d -m "$method" -p "$path"
+       echo "$NAME."
+       ;;
+  stop)
+       echo -n "Stopping $DESC: "
+       start-stop-daemon -K -x "$DAEMON" -p $PIDFILE
+       echo "$NAME."
+       ;;
+  status)
+       status "$DAEMON"
+       exit $?
+       ;;
+  restart|force-reload)
+       do_check_transport || exit 0
+       echo -n "Restarting $DESC: "
+       start-stop-daemon -K -x "$DAEMON" -p $PIDFILE
+       sleep 1
+       start-stop-daemon -S -p $PIDFILE -x "$DAEMON" -- \
+               $DAEMON_ARGS -d -m "$method" -p "$path"
+       echo "$NAME."
+       ;;
+  *)
+       N=/etc/init.d/$NAME
+       echo "Usage: $N {start|stop|status|restart|force-reload}" >&2
+       exit 1
+       ;;
+esac
+
+exit 0
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev
new file mode 100644
index 00000000..47097057
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/qemu-guest-agent.udev
@@ -0,0 +1,2 @@
+SUBSYSTEM=="virtio-ports", ATTR{name}=="org.qemu.guest_agent.0", \
+  TAG+="systemd", ENV{SYSTEMD_WANTS}="qemu-guest-agent.service"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/run-ptest 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest
similarity index 100%
rename from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/run-ptest
rename to meta-xilinx-core/recipes-devtools/qemu/qemu-8.1/run-ptest
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb
deleted file mode 100644
index 7c734cd6..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.1.bb
+++ /dev/null
@@ -1,8 +0,0 @@
-
-require qemu-devicetrees.inc
-
-BRANCH ?= "xlnx_rel_v2022.1"
-SRCREV ?= "0499324af1178057c3730b0989c8fb5c5bbc4cf8"
-
-FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
-SRC_URI:append = " file://0001-Makefile-Use-python3-instead-of-python.patch"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb
deleted file mode 100644
index 6675ba3e..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2022.2.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-
-require qemu-devicetrees.inc
-
-BRANCH ?= "xlnx_rel_v2022.2"
-SRCREV ?= "cf5d357e16c13ac447861f908e83951ffb7b4301"
-
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb
deleted file mode 100644
index dc1feda4..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.1.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-
-require qemu-devicetrees.inc
-
-BRANCH ?= "xlnx_rel_v2023.1"
-SRCREV ?= "56538937584f527fb408347c3b430142e74723e8"
-
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb
deleted file mode 100644
index d41743c1..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2023.2.bb
+++ /dev/null
@@ -1,6 +0,0 @@
-
-require qemu-devicetrees.inc
-
-BRANCH ?= "xlnx_rel_v2023.2"
-SRCREV ?= "d1013382d9a5ef816cd020e7840813b7a2d65c51"
-
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb
new file mode 100644
index 00000000..d10504d3
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-devicetrees_2024.1.bb
@@ -0,0 +1,6 @@
+
+require qemu-devicetrees.inc
+
+BRANCH ?= "xlnx_rel_v2024.1"
+SRCREV ?= "b9c88cbfaaa0c8b8be70ea3c74f4cb69fb02a080"
+
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc
new file mode 100644
index 00000000..22fa9685
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-native-8.1.inc
@@ -0,0 +1,7 @@
+require qemu-8.1.inc
+
+inherit native
+
+EXTRA_OEMAKE:append = " LD='${LD}' AR='${AR}' OBJCOPY='${OBJCOPY}' 
LDFLAGS='${LDFLAGS}'"
+
+LDFLAGS:append = " -fuse-ld=bfd"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc
new file mode 100644
index 00000000..24f9a039
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-targets-8.1.inc
@@ -0,0 +1,28 @@
+# possible arch values are:
+#    aarch64 arm armeb alpha cris i386 x86_64 m68k microblaze
+#    mips mipsel mips64 mips64el ppc ppc64 ppc64abi32 ppcemb
+#    riscv32 riscv64 sparc sparc32 sparc32plus
+
+def get_qemu_target_list(d):
+    import bb
+    archs = d.getVar('QEMU_TARGETS').split()
+    tos = d.getVar('HOST_OS')
+    softmmuonly = ""
+    for arch in ['ppcemb', 'lm32']:
+        if arch in archs:
+            softmmuonly += arch + "-softmmu,"
+            archs.remove(arch)
+    linuxuseronly = ""
+    for arch in ['armeb', 'alpha', 'ppc64abi32', 'ppc64le', 'sparc32plus', 
'aarch64_be']:
+        if arch in archs:
+            linuxuseronly += arch + "-linux-user,"
+            archs.remove(arch)
+    if 'linux' not in tos:
+        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):
+    return ",".join(filter(lambda i: "-linux-user" in i, 
get_qemu_target_list(d).split(',')))
+
+def get_qemu_system_target_list(d):
+    return ",".join(filter(lambda i: "-linux-user" not in i, 
get_qemu_target_list(d).split(',')))
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc
deleted file mode 100644
index bb8fac70..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.1.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-# Note this isn't really the 2022.1 or 2022.2 version of qemu-xilinx
-# Instead it's the current master version, as qemu 6.1.0 doesn't
-# work reliabily anymore.
-
-XILINX_QEMU_VERSION = "v7.1.0"
-BRANCH = "master"
-SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376"
-
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc
deleted file mode 100644
index bb8fac70..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2022.2.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-# Note this isn't really the 2022.1 or 2022.2 version of qemu-xilinx
-# Instead it's the current master version, as qemu 6.1.0 doesn't
-# work reliabily anymore.
-
-XILINX_QEMU_VERSION = "v7.1.0"
-BRANCH = "master"
-SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376"
-
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc
deleted file mode 100644
index 06ac05a1..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.1.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-XILINX_QEMU_VERSION = "v7.1.0"
-BRANCH = "xlnx_rel_v2023.1"
-SRCREV = "21adc9f99e813fb24fb65421259b5b0614938376"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc
deleted file mode 100644
index db6e1528..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2023.2.inc
+++ /dev/null
@@ -1,3 +0,0 @@
-XILINX_QEMU_VERSION = "v7.1.0"
-BRANCH = "xlnx_rel_v2023.2"
-SRCREV = "23b643ba1683a47ef49447a45643fe2172d6f8ca"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc
new file mode 100644
index 00000000..d48350b2
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-2024.1.inc
@@ -0,0 +1,3 @@
+XILINX_QEMU_VERSION = "v8.1.0"
+BRANCH = "xlnx_rel_v2024.1"
+SRCREV = "2319c870e754148ec3b9d40be0d3dbee959c3251"
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch
 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch
deleted file mode 100644
index 6c85a77b..00000000
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0001-net-tulip-Restrict-DMA-engine-to-memories.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-CVE: CVE-2022-2962
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <[email protected]>
-
-From 5c5c50b0a73d78ffe18336c9996fef5eae9bbbb0 Mon Sep 17 00:00:00 2001
-From: Zheyu Ma <[email protected]>
-Date: Sun, 21 Aug 2022 20:43:43 +0800
-Subject: [PATCH] net: tulip: Restrict DMA engine to memories
-
-The DMA engine is started by I/O access and then itself accesses the
-I/O registers, triggering a reentrancy bug.
-
-The following log can reveal it:
-==5637==ERROR: AddressSanitizer: stack-overflow
-    #0 0x5595435f6078 in tulip_xmit_list_update qemu/hw/net/tulip.c:673
-    #1 0x5595435f204a in tulip_write qemu/hw/net/tulip.c:805:13
-    #2 0x559544637f86 in memory_region_write_accessor 
qemu/softmmu/memory.c:492:5
-    #3 0x5595446379fa in access_with_adjusted_size qemu/softmmu/memory.c:554:18
-    #4 0x5595446372fa in memory_region_dispatch_write qemu/softmmu/memory.c
-    #5 0x55954468b74c in flatview_write_continue qemu/softmmu/physmem.c:2825:23
-    #6 0x559544683662 in flatview_write qemu/softmmu/physmem.c:2867:12
-    #7 0x5595446833f3 in address_space_write qemu/softmmu/physmem.c:2963:18
-    #8 0x5595435fb082 in dma_memory_rw_relaxed qemu/include/sysemu/dma.h:87:12
-    #9 0x5595435fb082 in dma_memory_rw qemu/include/sysemu/dma.h:130:12
-    #10 0x5595435fb082 in dma_memory_write qemu/include/sysemu/dma.h:171:12
-    #11 0x5595435fb082 in stl_le_dma qemu/include/sysemu/dma.h:272:1
-    #12 0x5595435fb082 in stl_le_pci_dma qemu/include/hw/pci/pci.h:910:1
-    #13 0x5595435fb082 in tulip_desc_write qemu/hw/net/tulip.c:101:9
-    #14 0x5595435f7e3d in tulip_xmit_list_update qemu/hw/net/tulip.c:706:9
-    #15 0x5595435f204a in tulip_write qemu/hw/net/tulip.c:805:13
-
-Fix this bug by restricting the DMA engine to memories regions.
-
-Signed-off-by: Zheyu Ma <[email protected]>
-Signed-off-by: Jason Wang <[email protected]>
----
- hw/net/tulip.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/hw/net/tulip.c b/hw/net/tulip.c
-index 097e905bec..b9e42c322a 100644
---- a/hw/net/tulip.c
-+++ b/hw/net/tulip.c
-@@ -70,7 +70,7 @@ static const VMStateDescription vmstate_pci_tulip = {
- static void tulip_desc_read(TULIPState *s, hwaddr p,
-         struct tulip_descriptor *desc)
- {
--    const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED;
-+    const MemTxAttrs attrs = { .memory = true };
- 
-     if (s->csr[0] & CSR0_DBO) {
-         ldl_be_pci_dma(&s->dev, p, &desc->status, attrs);
-@@ -88,7 +88,7 @@ static void tulip_desc_read(TULIPState *s, hwaddr p,
- static void tulip_desc_write(TULIPState *s, hwaddr p,
-         struct tulip_descriptor *desc)
- {
--    const MemTxAttrs attrs = MEMTXATTRS_UNSPECIFIED;
-+    const MemTxAttrs attrs = { .memory = true };
- 
-     if (s->csr[0] & CSR0_DBO) {
-         stl_be_pci_dma(&s->dev, p, desc->status, attrs);
--- 
-2.34.1
-
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch
 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch
deleted file mode 100644
index 63a99c96..00000000
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/0002-chardev-connect-socket-to-a-spawned-command.patch
+++ /dev/null
@@ -1,246 +0,0 @@
-From 14cd62607c9de232edf0a9b8503bd02783e03411 Mon Sep 17 00:00:00 2001
-From: Alistair Francis <[email protected]>
-Date: Thu, 21 Dec 2017 11:35:16 -0800
-Subject: [PATCH 02/12] chardev: connect socket to a spawned command
-
-The command is started in a shell (sh -c) with stdin connect to QEMU
-via a Unix domain stream socket. QEMU then exchanges data via its own
-end of the socket, just like it normally does.
-
-"-chardev socket" supports some ways of connecting via protocols like
-telnet, but that is only a subset of the functionality supported by
-tools socat. To use socat instead, for example to connect via a socks
-proxy, use:
-
-  -chardev 'socket,id=socat,cmd=exec socat FD:0 
SOCKS4A:socks-proxy.localdomain:example.com:9999,,socksuser=nobody' \
-  -device usb-serial,chardev=socat
-
-Beware that commas in the command must be escaped as double commas.
-
-Or interactively in the console:
-   (qemu) chardev-add socket,id=cat,cmd=cat
-   (qemu) device_add usb-serial,chardev=cat
-   ^ac
-   # cat >/dev/ttyUSB0
-   hello
-   hello
-
-Another usage is starting swtpm from inside QEMU. swtpm will
-automatically shut down once it looses the connection to the parent
-QEMU, so there is no risk of lingering processes:
-
-  -chardev 'socket,id=chrtpm0,cmd=exec swtpm socket --terminate --ctrl 
type=unixio,,clientfd=0 --tpmstate dir=... --log file=swtpm.log' \
-  -tpmdev emulator,id=tpm0,chardev=chrtpm0 \
-  -device tpm-tis,tpmdev=tpm0
-
-The patch was discussed upstream, but QEMU developers believe that the
-code calling QEMU should be responsible for managing additional
-processes. In OE-core, that would imply enhancing runqemu and
-oeqa. This patch is a simpler solution.
-
-Because it is not going upstream, the patch was written so that it is
-as simple as possible.
-
-Upstream-Status: Inappropriate [embedded specific]
-
-Signed-off-by: Patrick Ohly <[email protected]>
-
----
- chardev/char-socket.c | 100 ++++++++++++++++++++++++++++++++++++++++++
- chardev/char.c        |   3 ++
- qapi/char.json        |   5 +++
- 3 files changed, 108 insertions(+)
-
-diff --git a/chardev/char-socket.c b/chardev/char-socket.c
-index fab2d791d..c79641f24 100644
---- a/chardev/char-socket.c
-+++ b/chardev/char-socket.c
-@@ -1315,6 +1315,67 @@ static bool qmp_chardev_validate_socket(ChardevSocket 
*sock,
-     return true;
- }
- 
-+#ifndef _WIN32
-+static void chardev_open_socket_cmd(Chardev *chr,
-+                                    const char *cmd,
-+                                    Error **errp)
-+{
-+    int fds[2] = { -1, -1 };
-+    QIOChannelSocket *sioc = NULL;
-+    pid_t pid = -1;
-+    const char *argv[] = { "/bin/sh", "-c", cmd, NULL };
-+
-+    /*
-+     * We need a Unix domain socket for commands like swtpm and a single
-+     * connection, therefore we cannot use qio_channel_command_new_spawn()
-+     * without patching it first. Duplicating the functionality is easier.
-+     */
-+    if (socketpair(AF_UNIX, SOCK_STREAM|SOCK_CLOEXEC, 0, fds)) {
-+        error_setg_errno(errp, errno, "Error creating socketpair(AF_UNIX, 
SOCK_STREAM|SOCK_CLOEXEC)");
-+        goto error;
-+    }
-+
-+    pid = qemu_fork(errp);
-+    if (pid < 0) {
-+        goto error;
-+    }
-+
-+    if (!pid) {
-+        /* child */
-+        dup2(fds[1], STDIN_FILENO);
-+        execv(argv[0], (char * const *)argv);
-+        _exit(1);
-+    }
-+
-+    /*
-+     * Hand over our end of the socket pair to the qio channel.
-+     *
-+     * We don't reap the child because it is expected to keep
-+     * running. We also don't support the "reconnect" option for the
-+     * same reason.
-+     */
-+    sioc = qio_channel_socket_new_fd(fds[0], errp);
-+    if (!sioc) {
-+        goto error;
-+    }
-+    fds[0] = -1;
-+
-+    g_free(chr->filename);
-+    chr->filename = g_strdup_printf("cmd:%s", cmd);
-+    tcp_chr_new_client(chr, sioc);
-+
-+ error:
-+    if (fds[0] >= 0) {
-+        close(fds[0]);
-+    }
-+    if (fds[1] >= 0) {
-+        close(fds[1]);
-+    }
-+    if (sioc) {
-+        object_unref(OBJECT(sioc));
-+    }
-+}
-+#endif
- 
- static void qmp_chardev_open_socket(Chardev *chr,
-                                     ChardevBackend *backend,
-@@ -1323,6 +1384,9 @@ static void qmp_chardev_open_socket(Chardev *chr,
- {
-     SocketChardev *s = SOCKET_CHARDEV(chr);
-     ChardevSocket *sock = backend->u.socket.data;
-+#ifndef _WIN32
-+    const char *cmd     = sock->cmd;
-+#endif
-     bool do_nodelay     = sock->has_nodelay ? sock->nodelay : false;
-     bool is_listen      = sock->has_server  ? sock->server  : true;
-     bool is_telnet      = sock->has_telnet  ? sock->telnet  : false;
-@@ -1393,6 +1457,14 @@ static void qmp_chardev_open_socket(Chardev *chr,
- 
-     update_disconnected_filename(s);
- 
-+#ifndef _WIN32
-+    if (cmd) {
-+        chardev_open_socket_cmd(chr, cmd, errp);
-+
-+        /* everything ready (or failed permanently) before we return */
-+        *be_opened = true;
-+    } else
-+#endif
-     if (s->is_listen) {
-         if (qmp_chardev_open_socket_server(chr, is_telnet || is_tn3270,
-                                            is_waitconnect, errp) < 0) {
-@@ -1412,6 +1484,9 @@ static void qemu_chr_parse_socket(QemuOpts *opts, 
ChardevBackend *backend,
-     const char *host = qemu_opt_get(opts, "host");
-     const char *port = qemu_opt_get(opts, "port");
-     const char *fd = qemu_opt_get(opts, "fd");
-+#ifndef _WIN32
-+    const char *cmd = qemu_opt_get(opts, "cmd");
-+#endif
- #ifdef CONFIG_LINUX
-     bool tight = qemu_opt_get_bool(opts, "tight", true);
-     bool abstract = qemu_opt_get_bool(opts, "abstract", false);
-@@ -1419,6 +1494,20 @@ static void qemu_chr_parse_socket(QemuOpts *opts, 
ChardevBackend *backend,
-     SocketAddressLegacy *addr;
-     ChardevSocket *sock;
- 
-+#ifndef _WIN32
-+    if (cmd) {
-+        /*
-+         * Here we have to ensure that no options are set which are 
incompatible with
-+         * spawning a command, otherwise unmodified code that doesn't know 
about
-+         * command spawning (like socket_reconnect_timeout()) might get 
called.
-+         */
-+        if (path || sock->server || sock->has_telnet || sock->has_tn3270 || 
sock->reconnect || host || port || sock->tls_creds) {
-+            error_setg(errp, "chardev: socket: cmd does not support any 
additional options");
-+            return;
-+        }
-+    } else
-+#endif
-+
-     if ((!!path + !!fd + !!host) > 1) {
-         error_setg(errp,
-                    "None or one of 'path', 'fd' or 'host' option required.");
-@@ -1469,13 +1558,24 @@ static void qemu_chr_parse_socket(QemuOpts *opts, 
ChardevBackend *backend,
-     sock->tls_creds = g_strdup(qemu_opt_get(opts, "tls-creds"));
-     sock->has_tls_authz = qemu_opt_get(opts, "tls-authz");
-     sock->tls_authz = g_strdup(qemu_opt_get(opts, "tls-authz"));
-+#ifndef _WIN32
-+    sock->cmd = g_strdup(cmd);
-+#endif
- 
-     addr = g_new0(SocketAddressLegacy, 1);
-+#ifndef _WIN32
-+    if (path || cmd) {
-+#else
-     if (path) {
-+#endif
-         UnixSocketAddress *q_unix;
-         addr->type = SOCKET_ADDRESS_TYPE_UNIX;
-         q_unix = addr->u.q_unix.data = g_new0(UnixSocketAddress, 1);
-+#ifndef _WIN32
-+        q_unix->path = cmd ? g_strdup_printf("cmd:%s", cmd) : g_strdup(path);
-+#else
-         q_unix->path = g_strdup(path);
-+#endif
- #ifdef CONFIG_LINUX
-         q_unix->has_tight = true;
-         q_unix->tight = tight;
-diff --git a/chardev/char.c b/chardev/char.c
-index 0169d8dde..ce9a21f41 100644
---- a/chardev/char.c
-+++ b/chardev/char.c
-@@ -835,6 +835,9 @@ QemuOptsList qemu_chardev_opts = {
-         },{
-             .name = "path",
-             .type = QEMU_OPT_STRING,
-+        },{
-+            .name = "cmd",
-+            .type = QEMU_OPT_STRING,
-         },{
-             .name = "host",
-             .type = QEMU_OPT_STRING,
-diff --git a/qapi/char.json b/qapi/char.json
-index 7b4215157..37feabdac 100644
---- a/qapi/char.json
-+++ b/qapi/char.json
-@@ -250,6 +250,10 @@
- #
- # @addr: socket address to listen on (server=true)
- #        or connect to (server=false)
-+# @cmd: command to run via "sh -c" with stdin as one end of
-+#       a AF_UNIX SOCK_DSTREAM socket pair. The other end
-+#       is used by the chardev. Either an addr or a cmd can
-+#       be specified, but not both.
- # @tls-creds: the ID of the TLS credentials object (since 2.6)
- # @tls-authz: the ID of the QAuthZ authorization object against which
- #             the client's x509 distinguished name will be validated. This
-@@ -276,6 +280,7 @@
- ##
- { 'struct': 'ChardevSocket',
-   'data': { 'addr': 'SocketAddressLegacy',
-+            '*cmd': 'str',
-             '*tls-creds': 'str',
-             '*tls-authz'  : 'str',
-             '*server': 'bool',
--- 
-2.30.2
-
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch
deleted file mode 100644
index 3b4a6694..00000000
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/CVE-2022-3165.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-CVE: CVE-2022-3165
-Upstream-Status: Backport
-Signed-off-by: Ross Burton <[email protected]>
-
-From d307040b18bfcb1393b910f1bae753d5c12a4dc7 Mon Sep 17 00:00:00 2001
-From: Mauro Matteo Cascella <[email protected]>
-Date: Sun, 25 Sep 2022 22:45:11 +0200
-Subject: [PATCH] ui/vnc-clipboard: fix integer underflow in
- vnc_client_cut_text_ext
-
-Extended ClientCutText messages start with a 4-byte header. If len < 4,
-an integer underflow occurs in vnc_client_cut_text_ext. The result is
-used to decompress data in a while loop in inflate_buffer, leading to
-CPU consumption and denial of service. Prevent this by checking dlen in
-protocol_client_msg.
-
-Fixes: CVE-2022-3165
-Fixes: 0bf41cab93e5 ("ui/vnc: clipboard support")
-Reported-by: TangPeng <[email protected]>
-Signed-off-by: Mauro Matteo Cascella <[email protected]>
-Message-Id: <[email protected]>
-Signed-off-by: Gerd Hoffmann <[email protected]>
----
- ui/vnc.c | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/ui/vnc.c b/ui/vnc.c
-index 6a05d06147..acb3629cd8 100644
---- a/ui/vnc.c
-+++ b/ui/vnc.c
-@@ -2442,8 +2442,8 @@ static int protocol_client_msg(VncState *vs, uint8_t 
*data, size_t len)
-         if (len == 1) {
-             return 8;
-         }
-+        uint32_t dlen = abs(read_s32(data, 4));
-         if (len == 8) {
--            uint32_t dlen = abs(read_s32(data, 4));
-             if (dlen > (1 << 20)) {
-                 error_report("vnc: client_cut_text msg payload has %u bytes"
-                              " which exceeds our limit of 1MB.", dlen);
-@@ -2456,8 +2456,13 @@ static int protocol_client_msg(VncState *vs, uint8_t 
*data, size_t len)
-         }
- 
-         if (read_s32(data, 4) < 0) {
--            vnc_client_cut_text_ext(vs, abs(read_s32(data, 4)),
--                                    read_u32(data, 8), data + 12);
-+            if (dlen < 4) {
-+                error_report("vnc: malformed payload (header less than 4 
bytes)"
-+                             " in extended clipboard pseudo-encoding.");
-+                vnc_client_error(vs);
-+                break;
-+            }
-+            vnc_client_cut_text_ext(vs, dlen, read_u32(data, 8), data + 12);
-             break;
-         }
-         vnc_client_cut_text(vs, read_u32(data, 4), data + 8);
--- 
-GitLab
-
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch
deleted file mode 100644
index 071691f8..00000000
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/arm-cpreg-fix.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-target/arm: mark SP_EL1 with ARM_CP_EL3_NO_EL2_KEEP
-
-SP_EL1 must be kept when EL3 is present but EL2 is not. Therefore mark
-it with ARM_CP_EL3_NO_EL2_KEEP.
-
-Fixes: 696ba3771894 ("target/arm: Handle cpreg registration for missing EL")
-Signed-off-by: Jerome Forissier <[email protected]>
-
-Upstream-Status: Submitted 
[https://lists.gnu.org/archive/html/qemu-devel/2022-09/msg04515.html]
-
----
- target/arm/helper.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-Index: qemu-7.1.0/target/arm/helper.c
-===================================================================
---- qemu-7.1.0.orig/target/arm/helper.c
-+++ qemu-7.1.0/target/arm/helper.c
-@@ -4971,7 +4971,7 @@ static const ARMCPRegInfo v8_cp_reginfo[
-       .fieldoffset = offsetof(CPUARMState, sp_el[0]) },
-     { .name = "SP_EL1", .state = ARM_CP_STATE_AA64,
-       .opc0 = 3, .opc1 = 4, .crn = 4, .crm = 1, .opc2 = 0,
--      .access = PL2_RW, .type = ARM_CP_ALIAS,
-+      .access = PL2_RW, .type = ARM_CP_ALIAS | ARM_CP_EL3_NO_EL2_KEEP,
-       .fieldoffset = offsetof(CPUARMState, sp_el[1]) },
-     { .name = "SPSel", .state = ARM_CP_STATE_AA64,
-       .opc0 = 3, .opc1 = 0, .crn = 4, .crm = 2, .opc2 = 0,
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch
 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch
deleted file mode 100644
index abad1cfe..00000000
--- 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.0/qemu-7.0.0-glibc-2.36.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-Avoid conflicts between sys/mount.h and linux/mount.h that are seen
-with glibc 2.36
-
-Source: 
https://github.com/archlinux/svntogit-packages/blob/packages/qemu/trunk/qemu-7.0.0-glibc-2.36.patch
-
-Upstream-Status: Pending
-Signed-off-by: Khem Raj <[email protected]>
---- a/linux-user/syscall.c
-+++ b/linux-user/syscall.c
-@@ -95,7 +95,25 @@
- #include <linux/soundcard.h>
- #include <linux/kd.h>
- #include <linux/mtio.h>
-+
-+#ifdef HAVE_SYS_MOUNT_FSCONFIG
-+/*
-+ * glibc >= 2.36 linux/mount.h conflicts with sys/mount.h,
-+ * which in turn prevents use of linux/fs.h. So we have to
-+ * define the constants ourselves for now.
-+ */
-+#define FS_IOC_GETFLAGS                _IOR('f', 1, long)
-+#define FS_IOC_SETFLAGS                _IOW('f', 2, long)
-+#define FS_IOC_GETVERSION              _IOR('v', 1, long)
-+#define FS_IOC_SETVERSION              _IOW('v', 2, long)
-+#define FS_IOC_FIEMAP                  _IOWR('f', 11, struct fiemap)
-+#define FS_IOC32_GETFLAGS              _IOR('f', 1, int)
-+#define FS_IOC32_SETFLAGS              _IOW('f', 2, int)
-+#define FS_IOC32_GETVERSION            _IOR('v', 1, int)
-+#define FS_IOC32_SETVERSION            _IOW('v', 2, int)
-+#else
- #include <linux/fs.h>
-+#endif
- #include <linux/fd.h>
- #if defined(CONFIG_FIEMAP)
- #include <linux/fiemap.h>
---- a/meson.build
-+++ b/meson.build
-@@ -1686,6 +1686,8 @@ config_host_data.set('HAVE_OPTRESET',
-                      cc.has_header_symbol('getopt.h', 'optreset'))
- config_host_data.set('HAVE_IPPROTO_MPTCP',
-                      cc.has_header_symbol('netinet/in.h', 'IPPROTO_MPTCP'))
-+config_host_data.set('HAVE_SYS_MOUNT_FSCONFIG',
-+                     cc.has_header_symbol('sys/mount.h', 'FSCONFIG_SET_FLAG'))
- 
- # has_member
- config_host_data.set('HAVE_SIGEV_NOTIFY_THREAD_ID',
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc
deleted file mode 100644
index 4b0aceb8..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-7.1.inc
+++ /dev/null
@@ -1,65 +0,0 @@
-SUMMARY = "Xilinx's fork of a fast open source processor emulator"
-HOMEPAGE = "https://github.com/xilinx/qemu/";
-
-# This qemu fork is NOT compatible with running on a 32-bit system
-# See: https://github.com/Xilinx/qemu/issues/35
-COMPATIBLE_HOST:arm = "null"
-
-# x86_64 is needed to build nativesdks
-QEMU_TARGETS = "aarch64 arm microblaze microblazeel x86_64"
-
-LIC_FILES_CHKSUM = " \
-               file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
-               
file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f \
-               "
-DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
-
-FILESEXTRAPATHS:prepend := "${THISDIR}/qemu-xilinx-7.1.0:"
-
-PV = 
"${XILINX_QEMU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', 
False),d)[1] or ''}+git${SRCPV}"
-REPO ?= "gitsm://github.com/Xilinx/qemu.git;protocol=https"
-
-BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != 
'']}"
-SRC_URI = "${REPO};${BRANCHARG}"
-
-FILESEXTRAPATHS:append := ":${COREBASE}/meta/recipes-devtools/qemu/qemu"
-
-SRC_URI += "\
-           file://powerpc_rom.bin \
-           file://run-ptest \
-           
file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
-           file://0002-chardev-connect-socket-to-a-spawned-command.patch \
-           file://0003-apic-fixup-fallthrough-to-PIC.patch \
-           file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \
-           file://0005-qemu-Do-not-include-file-if-not-exists.patch \
-           
file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \
-           file://0007-qemu-Determinism-fixes.patch \
-           
file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \
-           
file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \
-           
file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \
-           file://0001-net-tulip-Restrict-DMA-engine-to-memories.patch \
-           file://arm-cpreg-fix.patch \
-           file://CVE-2022-3165.patch \
-           file://qemu-guest-agent.init \
-           file://qemu-guest-agent.udev \
-           "
-
-# Workaround for 8.2 patch that doesn't apply
-SRC_URI:remove = 
"file://0011-linux-user-workaround-for-missing-MAP_FIXED_NOREPLAC.patch"
-SRC_URI:remove = 
"file://0012-linux-user-workaround-for-missing-MAP_SHARED_VALIDAT.patch"
-
-S = "${WORKDIR}/git"
-
-PACKAGECONFIG ??= " \
-    fdt sdl kvm gcrypt pie slirp \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa xen', d)} \
-    ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \
-"
-PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm gcrypt pie slirp"
-
-# Disable this
-PACKAGECONFIG[debuginfo] = ""
-PACKAGECONFIG[pipewire] = ""
-PACKAGECONFIG[sndio] = ""
-
-DISABLE_STATIC:pn-${PN} = ""
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc
new file mode 100644
index 00000000..ad2af244
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-8.1.inc
@@ -0,0 +1,79 @@
+SUMMARY = "Xilinx's fork of a fast open source processor emulator"
+HOMEPAGE = "https://github.com/xilinx/qemu/";
+
+# This qemu fork is NOT compatible with running on a 32-bit system
+# See: https://github.com/Xilinx/qemu/issues/35
+COMPATIBLE_HOST:arm = "null"
+
+# x86_64 is needed to build nativesdks
+QEMU_TARGETS = "aarch64 arm microblaze microblazeel riscv32 x86_64"
+
+LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
+                    
file://COPYING.LIB;endline=24;md5=8c5efda6cf1e1b03dcfd0e6c0d271c7f"
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/qemu-xilinx-8.1.0:"
+
+PV = 
"${XILINX_QEMU_VERSION}-xilinx-v${@bb.parse.vars_from_file(d.getVar('FILE', 
False),d)[1] or ''}+git${SRCPV}"
+REPO ?= "gitsm://github.com/Xilinx/qemu.git;protocol=https"
+
+BRANCHARG = "${@['nobranch=1', 'branch=${BRANCH}'][d.getVar('BRANCH', True) != 
'']}"
+SRC_URI = "${REPO};${BRANCHARG};name=qemu"
+SRCREV_qemu = "${SRCREV}"
+SRCREV_FORMAT = "qemu"
+
+FILESEXTRAPATHS:append := ":${THISDIR}/qemu-8.1"
+
+# Deal with the broken --disable-download
+SRCREV_berkeley-softfloat-3 = "b64af41c3276f97f0e181920400ee056b9c88037"
+SRCREV_berkeley-testfloat-3 = "40619cbb3bf32872df8c53cc457039229428a263"
+SRCREV_dtc = "b6910bec11614980a21e46fbccc35934b671bd81"
+SRCREV_keycodemapdb = "f5772a62ec52591ff6870b7e8ef32482371f22c6"
+SRCREV_libvfio-user = "0b28d205572c80b568a1003db2c8f37ca333e4d7"
+SRCREV_slirp = "26be815b86e8d49add8c9a8b320239b9594ff03d"
+SRC_URI += "\
+           
git://gitlab.com/qemu-project/berkeley-softfloat-3;protocol=https;nobranch=1;destsuffix=git/subprojects/berkeley-softfloat-3;name=berkeley-softfloat-3
 \
+           
git://gitlab.com/qemu-project/berkeley-testfloat-3;protocol=https;nobranch=1;destsuffix=git/subprojects/berkeley-testfloat-3;name=berkeley-testfloat-3
 \
+           
git://gitlab.com/qemu-project/dtc.git;protocol=https;nobranch=1;destsuffix=git/subprojects/dtc;name=dtc
 \
+           
git://gitlab.com/qemu-project/keycodemapdb.git;protocol=https;nobranch=1;destsuffix=git/subprojects/keycodemapdb;name=keycodemapdb
 \
+           
git://gitlab.com/qemu-project/libvfio-user.git;protocol=https;nobranch=1;destsuffix=git/subprojects/libvfio-user;name=libvfio-user
 \
+           
git://gitlab.freedesktop.org/slirp/libslirp;protocol=https;nobranch=1;destsuffix=git/subprojects/slirp;name=slirp
 \
+"
+
+# Configure meson for disable-download
+do_configure:prepend() {
+       cp ${S}/subprojects/packagefiles/berkeley-softfloat-3/* 
${S}/subprojects/berkeley-softfloat-3/.
+       cp ${S}/subprojects/packagefiles/berkeley-testfloat-3/* 
${S}/subprojects/berkeley-testfloat-3/.
+}
+
+
+# Keep this in sync with the main YP QEMU integration
+SRC_URI += "\
+           file://powerpc_rom.bin \
+           file://run-ptest \
+           
file://0001-qemu-Add-addition-environment-space-to-boot-loader-q.patch \
+           file://0003-apic-fixup-fallthrough-to-PIC.patch \
+           file://0004-configure-Add-pkg-config-handling-for-libgcrypt.patch \
+           file://0005-qemu-Do-not-include-file-if-not-exists.patch \
+           
file://0006-qemu-Add-some-user-space-mmap-tweaks-to-address-musl.patch \
+           file://0007-qemu-Determinism-fixes.patch \
+           
file://0008-tests-meson.build-use-relative-path-to-refer-to-file.patch \
+           
file://0009-Define-MAP_SYNC-and-MAP_SHARED_VALIDATE-on-needed-li.patch \
+           
file://0010-hw-pvrdma-Protect-against-buggy-or-malicious-guest-d.patch \
+           
file://0002-linux-user-Replace-use-of-lfs64-related-functions-an.patch \
+           file://fixedmeson.patch \
+           file://no-pip.patch \
+           file://qemu-guest-agent.init \
+           file://qemu-guest-agent.udev \
+           "
+
+# Patch doesn't apply to 8.1.0
+#           file://fixmips.patch 
+
+S = "${WORKDIR}/git"
+
+# Based on qemu settings in poky/meta/conf/distro/include/no-static-libs.inc
+DISABLE_STATIC:pn-qemu-xilinx = ""
+DISABLE_STATIC:pn-qemu-xilinx-native = ""
+DISABLE_STATIC:pn-nativesdk-qemu-xilinx = ""
+DISABLE_STATIC:pn-qemu-xilinx-system-native = ""
+
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-7.1.inc 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-7.1.inc
deleted file mode 100644
index e664a580..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-7.1.inc
+++ /dev/null
@@ -1,4 +0,0 @@
-require recipes-devtools/qemu/qemu-native.inc
-require qemu-xilinx-7.1.inc
-
-DEPENDS = "glib-2.0-native zlib-native ninja-native meson-native"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc
new file mode 100644
index 00000000..ad00453f
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native-8.1.inc
@@ -0,0 +1,2 @@
+require qemu-native-8.1.inc
+require qemu-xilinx-8.1.inc
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb
deleted file mode 100644
index bfdb916d..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require qemu-xilinx-2022.1.inc
-require qemu-xilinx-native-7.1.inc
-require qemu-native-alt.inc
-
-BPN = "qemu-xilinx"
-
-# Latest poky has changed the defaults, restore them to something compatible
-# with this QEMU.  When we update to QEMU 8.x this won't be necessary.
-EXTRA_OECONF:remove = "--disable-download"
-EXTRA_OECONF:remove = "--disable-docs"
-EXTRA_OECONF:remove = "--disable-af-xdp"
-
-EXTRA_OECONF:append = "\
-    --with-git=/bin/false \
-    --with-git-submodules=ignore \
-    --meson=meson \
-"
-
-EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} 
--disable-tools --disable-blobs --disable-guest-agent"
-
-PACKAGECONFIG ??= "pie"
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb
deleted file mode 100644
index f91eb891..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2022.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require qemu-xilinx-2022.2.inc
-require qemu-xilinx-native-7.1.inc
-require qemu-native-alt.inc
-
-BPN = "qemu-xilinx"
-
-# Latest poky has changed the defaults, restore them to something compatible
-# with this QEMU.  When we update to QEMU 8.x this won't be necessary.
-EXTRA_OECONF:remove = "--disable-download"
-EXTRA_OECONF:remove = "--disable-docs"
-EXTRA_OECONF:remove = "--disable-af-xdp"
-
-EXTRA_OECONF:append = "\
-    --with-git=/bin/false \
-    --with-git-submodules=ignore \
-    --meson=meson \
-"
-
-EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} 
--disable-tools --disable-blobs --disable-guest-agent"
-
-PACKAGECONFIG ??= "pie"
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb
deleted file mode 100644
index a19b2cc3..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.1.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require qemu-xilinx-2023.1.inc
-require qemu-xilinx-native-7.1.inc
-require qemu-native-alt.inc
-
-BPN = "qemu-xilinx"
-
-# Latest poky has changed the defaults, restore them to something compatible
-# with this QEMU.  When we update to QEMU 8.x this won't be necessary.
-EXTRA_OECONF:remove = "--disable-download"
-EXTRA_OECONF:remove = "--disable-docs"
-EXTRA_OECONF:remove = "--disable-af-xdp"
-
-EXTRA_OECONF:append = "\
-    --with-git=/bin/false \
-    --with-git-submodules=ignore \
-    --meson=meson \
-"
-
-EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} 
--disable-tools --disable-blobs --disable-guest-agent"
-
-PACKAGECONFIG ??= "pie"
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb
deleted file mode 100644
index 78ffedca..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2023.2.bb
+++ /dev/null
@@ -1,21 +0,0 @@
-require qemu-xilinx-2023.2.inc
-require qemu-xilinx-native-7.1.inc
-require qemu-native-alt.inc
-
-BPN = "qemu-xilinx"
-
-# Latest poky has changed the defaults, restore them to something compatible
-# with this QEMU.  When we update to QEMU 8.x this won't be necessary.
-EXTRA_OECONF:remove = "--disable-download"
-EXTRA_OECONF:remove = "--disable-docs"
-EXTRA_OECONF:remove = "--disable-af-xdp"
-
-EXTRA_OECONF:append = "\
-    --with-git=/bin/false \
-    --with-git-submodules=ignore \
-    --meson=meson \
-"
-
-EXTRA_OECONF:append = " --target-list=${@get_qemu_usermode_target_list(d)} 
--disable-tools --disable-blobs --disable-guest-agent"
-
-PACKAGECONFIG ??= "pie"
diff --git 
a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb
new file mode 100644
index 00000000..5ffdeb98
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-native_2024.1.bb
@@ -0,0 +1,11 @@
+BPN = "qemu-xilinx"
+
+DEPENDS += "glib-2.0-native zlib-native"
+
+require qemu-xilinx-2024.1.inc
+require qemu-xilinx-native-8.1.inc
+require qemu-native-alt.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-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb
deleted file mode 100644
index ba733ede..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-require qemu-system-native-alt.inc
-require qemu-xilinx-2022.1.inc
-require qemu-xilinx-native-7.1.inc
-
-PROVIDES = "qemu-system-native"
-
-# Latest poky has changed the defaults, restore them to something compatible
-# with this QEMU.  When we update to QEMU 8.x this won't be necessary.
-EXTRA_OECONF:remove = "--disable-download"
-EXTRA_OECONF:remove = "--disable-docs"
-EXTRA_OECONF:remove = "--disable-af-xdp"
-
-EXTRA_OECONF:append = "\
-    --with-git=/bin/false \
-    --with-git-submodules=ignore \
-    --meson=meson \
-"
-
-EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
-
-PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp"
-
-PACKAGECONFIG:remove = "${@'kvm' if not 
os.path.exists('/usr/include/linux/kvm.h') else ''}"
-
-DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native 
meson-native"
-DEPENDS += "qemu-xilinx-multiarch-helper-native"
-
-do_install:append() {
-    # The following is also installed by qemu-native
-    rm -f ${D}${datadir}/qemu/trace-events-all
-    rm -rf ${D}${datadir}/qemu/keymaps
-    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-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb
deleted file mode 100644
index 17386afe..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2022.2.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-require qemu-system-native-alt.inc
-require qemu-xilinx-2022.2.inc
-require qemu-xilinx-native-7.1.inc
-
-PROVIDES = "qemu-system-native"
-
-# Latest poky has changed the defaults, restore them to something compatible
-# with this QEMU.  When we update to QEMU 8.x this won't be necessary.
-EXTRA_OECONF:remove = "--disable-download"
-EXTRA_OECONF:remove = "--disable-docs"
-EXTRA_OECONF:remove = "--disable-af-xdp"
-
-EXTRA_OECONF:append = "\
-    --with-git=/bin/false \
-    --with-git-submodules=ignore \
-    --meson=meson \
-"
-
-EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
-
-PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp"
-
-PACKAGECONFIG:remove = "${@'kvm' if not 
os.path.exists('/usr/include/linux/kvm.h') else ''}"
-
-DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native 
meson-native"
-DEPENDS += "qemu-xilinx-multiarch-helper-native"
-
-do_install:append() {
-    # The following is also installed by qemu-native
-    rm -f ${D}${datadir}/qemu/trace-events-all
-    rm -rf ${D}${datadir}/qemu/keymaps
-    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-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb
deleted file mode 100644
index 3264c260..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-require qemu-system-native-alt.inc
-require qemu-xilinx-2023.1.inc
-require qemu-xilinx-native-7.1.inc
-
-PROVIDES = "qemu-system-native"
-
-# Latest poky has changed the defaults, restore them to something compatible
-# with this QEMU.  When we update to QEMU 8.x this won't be necessary.
-EXTRA_OECONF:remove = "--disable-download"
-EXTRA_OECONF:remove = "--disable-docs"
-EXTRA_OECONF:remove = "--disable-af-xdp"
-
-EXTRA_OECONF:append = "\
-    --with-git=/bin/false \
-    --with-git-submodules=ignore \
-    --meson=meson \
-"
-
-EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
-
-PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp"
-
-PACKAGECONFIG:remove = "${@'kvm' if not 
os.path.exists('/usr/include/linux/kvm.h') else ''}"
-
-DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native 
meson-native"
-DEPENDS += "qemu-xilinx-multiarch-helper-native"
-
-do_install:append() {
-    # The following is also installed by qemu-native
-    rm -f ${D}${datadir}/qemu/trace-events-all
-    rm -rf ${D}${datadir}/qemu/keymaps
-    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-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb
deleted file mode 100644
index fdf3be2e..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2023.2.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-require qemu-system-native-alt.inc
-require qemu-xilinx-2023.2.inc
-require qemu-xilinx-native-7.1.inc
-
-PROVIDES = "qemu-system-native"
-
-# Latest poky has changed the defaults, restore them to something compatible
-# with this QEMU.  When we update to QEMU 8.x this won't be necessary.
-EXTRA_OECONF:remove = "--disable-download"
-EXTRA_OECONF:remove = "--disable-docs"
-EXTRA_OECONF:remove = "--disable-af-xdp"
-
-EXTRA_OECONF:append = "\
-    --with-git=/bin/false \
-    --with-git-submodules=ignore \
-    --meson=meson \
-"
-
-EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
-
-PACKAGECONFIG ??= "fdt alsa kvm gcrypt pie slirp"
-
-PACKAGECONFIG:remove = "${@'kvm' if not 
os.path.exists('/usr/include/linux/kvm.h') else ''}"
-
-DEPENDS += "pixman-native qemu-xilinx-native bison-native ninja-native 
meson-native"
-DEPENDS += "qemu-xilinx-multiarch-helper-native"
-
-do_install:append() {
-    # The following is also installed by qemu-native
-    rm -f ${D}${datadir}/qemu/trace-events-all
-    rm -rf ${D}${datadir}/qemu/keymaps
-    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-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb
new file mode 100644
index 00000000..7e985088
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx-system-native_2024.1.bb
@@ -0,0 +1,35 @@
+BPN = "qemu-xilinx"
+
+require qemu-system-native-alt.inc
+require qemu-xilinx-2024.1.inc
+require qemu-xilinx-native-8.1.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 += "qemu-xilinx-multiarch-helper-native"
+
+EXTRA_OECONF:append = " --target-list=${@get_qemu_system_target_list(d)}"
+
+PACKAGECONFIG ??= "fdt alsa kvm pie slirp png gcrypt \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', 
'', d)} \
+"
+
+# Handle distros such as CentOS 5 32-bit that do not have kvm support
+PACKAGECONFIG:remove = "${@'kvm' if not 
os.path.exists('/usr/include/linux/kvm.h') else ''}"
+
+do_install:append() {
+    install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu-xilinx
+
+    # The following is also installed by qemu-native
+    rm -f ${D}${datadir}/qemu-xilinx/trace-events-all
+    rm -rf ${D}${datadir}/qemu-xilinx/keymaps
+    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-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb
deleted file mode 100644
index 96b26101..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-require qemu-xilinx-2022.1.inc
-require recipes-devtools/qemu/qemu.inc
-require qemu-xilinx-7.1.inc
-require qemu-alt.inc
-
-# Links to libmali-xlnx, so it becomes MACHINE_ARCH specific
-DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}"
-MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH"
-MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if 
d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else 
'${DEFAULT_PACKAGE_ARCH}'}"
-PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH"
-PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy 
virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}"
-
-BBCLASSEXTEND = "nativesdk"
-
-RDEPENDS:${PN}:class-target += "bash"
-
-PROVIDES:class-nativesdk = "nativesdk-qemu"
-RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu"
-
-# Latest poky has changed the defaults, restore them to something compatible
-# with this QEMU.  When we update to QEMU 8.x this won't be necessary.
-EXTRA_OECONF:remove = "--disable-download"
-EXTRA_OECONF:remove = "--disable-docs"
-EXTRA_OECONF:remove = "--disable-af-xdp"
-
-EXTRA_OECONF:append = "\
-    --with-git=/bin/false \
-    --with-git-submodules=ignore \
-    --meson=meson \
-"
-
-EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
-EXTRA_OECONF:append:class-nativesdk = " 
--target-list=${@get_qemu_target_list(d)}"
-EXTRA_OECONF:append:class-target:mipsarcho32 = 
"${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', 
d)}"
-
-do_install:append:class-nativesdk() {
-    ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
-}
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb
deleted file mode 100644
index c6e91fdd..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2022.2.bb
+++ /dev/null
@@ -1,36 +0,0 @@
-require qemu-xilinx-2022.2.inc
-require recipes-devtools/qemu/qemu.inc
-require qemu-xilinx-7.1.inc
-require qemu-alt.inc
-
-# Links to libmali-xlnx, so it becomes MACHINE_ARCH specific
-DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}"
-MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if 
d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else 
'${DEFAULT_PACKAGE_ARCH}'}"
-PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy 
virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}"
-
-BBCLASSEXTEND = "nativesdk"
-
-RDEPENDS:${PN}:class-target += "bash"
-
-PROVIDES:class-nativesdk = "nativesdk-qemu"
-RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu"
-
-# Latest poky has changed the defaults, restore them to something compatible
-# with this QEMU.  When we update to QEMU 8.x this won't be necessary.
-EXTRA_OECONF:remove = "--disable-download"
-EXTRA_OECONF:remove = "--disable-docs"
-EXTRA_OECONF:remove = "--disable-af-xdp"
-
-EXTRA_OECONF:append = "\
-    --with-git=/bin/false \
-    --with-git-submodules=ignore \
-    --meson=meson \
-"
-
-EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
-EXTRA_OECONF:append:class-nativesdk = " 
--target-list=${@get_qemu_target_list(d)}"
-EXTRA_OECONF:append:class-target:mipsarcho32 = 
"${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', 
d)}"
-
-do_install:append:class-nativesdk() {
-    ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
-}
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb
deleted file mode 100644
index fca09883..00000000
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.1.bb
+++ /dev/null
@@ -1,38 +0,0 @@
-require qemu-xilinx-2023.1.inc
-require recipes-devtools/qemu/qemu.inc
-require qemu-xilinx-7.1.inc
-require qemu-alt.inc
-
-# Links to libmali-xlnx, so it becomes MACHINE_ARCH specific
-DEFAULT_PACKAGE_ARCH := "${PACKAGE_ARCH}"
-MALI_PACKAGE_ARCH[vardepsexclude] = "MACHINE_ARCH"
-MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if 
d.getVar('PREFERRED_PROVIDER_virtual/libgles1') == 'libmali-xlnx' else 
'${DEFAULT_PACKAGE_ARCH}'}"
-PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH"
-PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy 
virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}"
-
-BBCLASSEXTEND = "nativesdk"
-
-RDEPENDS:${PN}:class-target += "bash"
-
-PROVIDES:class-nativesdk = "nativesdk-qemu"
-RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu"
-
-# Latest poky has changed the defaults, restore them to something compatible
-# with this QEMU.  When we update to QEMU 8.x this won't be necessary.
-EXTRA_OECONF:remove = "--disable-download"
-EXTRA_OECONF:remove = "--disable-docs"
-EXTRA_OECONF:remove = "--disable-af-xdp"
-
-EXTRA_OECONF:append = "\
-    --with-git=/bin/false \
-    --with-git-submodules=ignore \
-    --meson=meson \
-"
-
-EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
-EXTRA_OECONF:append:class-nativesdk = " 
--target-list=${@get_qemu_target_list(d)}"
-EXTRA_OECONF:append:class-target:mipsarcho32 = 
"${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', 
d)}"
-
-do_install:append:class-nativesdk() {
-    ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
-}
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb
similarity index 50%
rename from meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb
rename to meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb
index 070ae65f..cff60bd6 100644
--- a/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2023.2.bb
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu-xilinx_2024.1.bb
@@ -1,6 +1,8 @@
-require qemu-xilinx-2023.2.inc
-require recipes-devtools/qemu/qemu.inc
-require qemu-xilinx-7.1.inc
+BBCLASSEXTEND = "nativesdk"
+
+require qemu-xilinx-2024.1.inc
+require qemu-8.1.inc
+require qemu-xilinx-8.1.inc
 require qemu-alt.inc
 
 # Links to libmali-xlnx, so it becomes MACHINE_ARCH specific
@@ -10,29 +12,27 @@ MALI_PACKAGE_ARCH = "${@'${MACHINE_ARCH}' if 
d.getVar('PREFERRED_PROVIDER_virtua
 PACKAGE_ARCH[vardepsexclude] = "MALI_PACKAGE_ARCH"
 PACKAGE_ARCH:class-target = "${@bb.utils.contains_any('DEPENDS', 'libepoxy 
virglrenderer', '${MALI_PACKAGE_ARCH}', '${DEFAULT_PACKAGE_ARCH}', d)}"
 
-BBCLASSEXTEND = "nativesdk"
 
-RDEPENDS:${PN}:class-target += "bash"
+DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
 
-PROVIDES:class-nativesdk = "nativesdk-qemu"
-RPROVIDES:${PN}:class-nativesdk = "nativesdk-qemu"
+DEPENDS:append:libc-musl = " libucontext"
 
-# Latest poky has changed the defaults, restore them to something compatible
-# with this QEMU.  When we update to QEMU 8.x this won't be necessary.
-EXTRA_OECONF:remove = "--disable-download"
-EXTRA_OECONF:remove = "--disable-docs"
-EXTRA_OECONF:remove = "--disable-af-xdp"
+CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 
'-DEGL_NO_X11=1', d)}"
 
-EXTRA_OECONF:append = "\
-    --with-git=/bin/false \
-    --with-git-submodules=ignore \
-    --meson=meson \
-"
+RDEPENDS:${PN}-common:class-target += "bash"
 
 EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
-EXTRA_OECONF:append:class-nativesdk = " 
--target-list=${@get_qemu_target_list(d)}"
 EXTRA_OECONF:append:class-target:mipsarcho32 = 
"${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', 
d)}"
+EXTRA_OECONF:append:class-nativesdk = " 
--target-list=${@get_qemu_target_list(d)}"
 
-do_install:append:class-nativesdk() {
-    ${@bb.utils.contains('PACKAGECONFIG', 'gtk+', 'make_qemu_wrapper', '', d)}
-}
+PACKAGECONFIG ??= " \
+    fdt sdl kvm pie slirp gcrypt \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio xen', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', 
'', d)} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \
+"
+PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm pie slirp gcrypt \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', 
'', d)} \
+"
+# ppc32 hosts are no longer supported in qemu
+COMPATIBLE_HOST:powerpc = "null"
diff --git a/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb 
b/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb
new file mode 100644
index 00000000..4722e1f5
--- /dev/null
+++ b/meta-xilinx-core/recipes-devtools/qemu/qemu_8.1.2.bb
@@ -0,0 +1,29 @@
+BBCLASSEXTEND = "nativesdk"
+
+FILESEXTRAPATHS:append := ":${THISDIR}/qemu-8.1"
+
+require qemu-8.1.inc
+
+DEPENDS += "glib-2.0 zlib pixman"
+
+DEPENDS:append:libc-musl = " libucontext"
+
+CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', 
'-DEGL_NO_X11=1', d)}"
+
+RDEPENDS:${PN}-common:class-target += "bash"
+
+EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"
+EXTRA_OECONF:append:class-target:mipsarcho32 = 
"${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', 
d)}"
+EXTRA_OECONF:append:class-nativesdk = " 
--target-list=${@get_qemu_target_list(d)}"
+
+PACKAGECONFIG ??= " \
+    fdt sdl kvm pie slirp \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'alsa pulseaudio xen', d)} \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', 
'', d)} \
+    ${@bb.utils.filter('DISTRO_FEATURES', 'seccomp', d)} \
+"
+PACKAGECONFIG:class-nativesdk ??= "fdt sdl kvm pie slirp \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'virglrenderer epoxy', 
'', d)} \
+"
+# ppc32 hosts are no longer supported in qemu
+COMPATIBLE_HOST:powerpc = "null"
-- 
2.34.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5320): 
https://lists.yoctoproject.org/g/meta-xilinx/message/5320
Mute This Topic: https://lists.yoctoproject.org/mt/106179137/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to