summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/qemu
AgeCommit message (Collapse)Author
2021-01-16qemu: fix do_compile errorChangqing Li
Fix error like: Fatal error: can't create tests/ptimer-test.p/..._qemu-5.2.0_hw_core_ptimer.c.o: File name too long Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-09qemu: Add some user space mmap tweaks to address musl 32 bit build issuesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-09qemu: Fix mingw buildsRichard Purdie
After the recent upgrade, mingw builds failed. Add a hack whilst a solution is discussed upstream. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-09qemu: Drop vm reservation changes to resolve build issuesRichard Purdie
When building with the new version of qemu we see errors like: """ qemu-i386: Unable to reserve 0x7ffff000 bytes of virtual address space at 0x1000 (Success) for use as guest address space (check your virtual memory ulimit setting, min_mmap_addr or reserve less using -R option) ERROR: The postinstall intercept hook 'update_gio_module_cache-nativesdk' failed """ The VM reseration patches we're carrying look suspicious in this context. Drop them since the patches appear to be a liability causing other issues and there is a much simpler fix for the webkitgtk issues on musl on 32 bit (see later linux-user mmap patches). Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-09qemu: Upgrade 5.1.0->5.2.0Richard Purdie
This involves some pretty major changes for qemu. In particular, they switched to meson+ninja so we have to adapt to that. Patch changes: * CVE patches - dropped as backports * cflags fix - upstream code changed significantly, need new patch if still issues * mips TLB entries - dropped as merged upstream * usb fix - dropped as merged upstream * find_datadir - dropped as code no longer present that I could find A patch was added to allow us to force the configure script into "cross" mode without setting cross_prefix which has other effects we don't need/want. Dependencies on meson/ninja were added. Specifying the python interpreter causes the internal meson copy to be built/used which is undesireable for us so don't do that. The correct python is in PATH anyway. Acked-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-03qemu: CVE-2020-28916Li Wang
References: https://nvd.nist.gov/vuln/detail/CVE-2020-28916 backport patch from: https://git.qemu.org/?p=qemu.git;a=commit;h=c2cb511634012344e3d0fe49a037a33b12d8a98a Signed-off-by: Li Wang <li.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-01-03qemu: CVE-2020-25723Li Wang
References: https://nvd.nist.gov/vuln/detail/CVE-2020-25723 https://bugzilla.redhat.com/show_bug.cgi?id=1898579 backport patch from: https://git.qemu.org/?p=qemu.git;a=commit;h=2fdb42d840400d58f2e706ecca82c142b97bcbd6 Signed-off-by: Li Wang <li.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-18qemu.inc: Add seccomp PACKAGECONFIG optionNathan Rossi
Add the seccomp PACKAGECONFIG option to allow building seccomp features in QEMU. The libseccomp library is available in additional layers (e.g. meta-security). Additionally this serves as a way to disable seccomp by default to avoid the configure of QEMU automatically finding it (via pkg-config) on the build host when building qemu-system-native and auto enabling the feature. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-06qemu: CVE-2020-25624Li Wang
References: https://nvd.nist.gov/vuln/detail/CVE-2020-25624 backport patch from: https://git.qemu.org/?p=qemu.git;a=commit;h=1328fe0c32d5474604105b8105310e944976b058 Signed-off-by: Li Wang <li.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-12-03qemu: CVE-2020-29129 CVE-2020-29130Li Wang
References: https://nvd.nist.gov/vuln/detail/CVE-2020-29129 https://nvd.nist.gov/vuln/detail/CVE-2020-29130 backport patch from: https://git.qemu.org/?p=libslirp.git;a=commit;h=2e1dcbc0c2af64fcb17009eaf2ceedd81be2b27f Signed-off-by: Li Wang <li.wang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-11-24qemu: fix CVE-2020-24352Lee Chee Yang
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-20qemu: change TLBs number to 64 in 34Kf mips cpu modelVictor Kamensky
Replace OE private qemu patch with one that got upstreamed and solves the same problem: increase qemumips CI performance by increasing number of TLBs in CPU model and reduce need to run software TLB refill code. Signed-off-by: Victor Kamensky <kamensky@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-20Revert "qemu: add 34Kf-64tlb fictitious cpu type"Victor Kamensky
This reverts commit 4470a04943352224955f17e004962f0f9e1c9b0c. Will be replaced with upstreamed solution instead, that just bumped number of TLBs to 64 in original 34Kf CPU model. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-10-08qemu: add 34Kf-64tlb fictitious cpu typeVictor Kamensky
In Yocto Project PR 13992 it was reported that qemumips in autobuilder runs almost twice slower then qemumips64 and some times hit time out. Upon investigations of qemu-system with perf, gdb, and SystemTap and comparing qemumips and qemumips64 machines behavior it was noticed that qemu soft mmu code behaves quite different and in case if qemumips tlbwr instruction called 16 times more oftern. It happens that in qemumips64 case qemu runs with cpu type that contains 64 TLB, but in case of qemumips qemu runs with cpu type that contains only 16 TLBs. The idea of proposed qemu patch is to introduce fictitious 34Kf-64tlb cpu type that defined exactly as 34Kf but has 64 TLBs, instead of original 16 TLBs. Testing of core-image-full-cmdline:do_testimage with 34Kf-64tlb shows 40% or so test execution real time improvement. Note for future porters of the patch: easiest way to update the patch and be in sync with 34Kf definition is to copy 34Kf machine definition and apply the following changes to it (just change 15 to 63 of CP0C1_MMU bits value) [kamensky@coreos-lnx2 qemu]$ diff ~/34Kf.c ~/34Kf-64tlb.c 2c2 < .name = "34Kf", > .name = "34Kf-64tlb", 6c6 < .CP0_Config1 = MIPS_CONFIG1 | (1 << CP0C1_FP) | (15 << CP0C1_MMU) | > .CP0_Config1 = MIPS_CONFIG1 | (1 << CP0C1_FP) | (63 << CP0C1_MMU) | Fixes https://bugzilla.yoctoproject.org/show_bug.cgi?id=13992 Upstream Status: Inappropriate Signed-off-by: Victor Kamensky <kamensky@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-30Space-comma CleanupsJon Mason
Multiple files have " ," instead of ", " in expressions. This changes them to conform to the way the rest of them are done. Found and corrected via: git ls-files | xargs sed --follow-symlinks -i 's/ ,d/, d/g' Signed-off-by: Jon Mason <jon.mason@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-23meta: add/fix invalid Upstream-Status tagsRoss Burton
Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-16qemu: override DEBUG_BUILDMingli Yu
Override DEBUG_BUILD for qemu as the qemu upstream states it doesn't work without optimization [1] to fix below build failure when debug build enabled. | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: /mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:25: undefined reference to `unknown_lock_type' | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: ../fsdev/qemu-fsdev-throttle.o: in function `fsdev_co_throttle_request': | /mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:103: undefined reference to `unknown_lock_type' | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: ../fsdev/qemu-fsdev-throttle.o:/mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:103: more undefined references to `unknown_lock_type' follow | collect2: error: ld returned 1 exit status [1]: https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-15Revert "qemu: always define unknown_lock_type"Richard Purdie
This reverts commit e442924d9ac4e202aec571b5d26bb959b5faaadd. This was rejected upstream and its been pointed out qemu doesn't work without optimization. Instead we should just error if the user attempts to build it without optimization.
2020-09-14qemu: always define unknown_lock_typeMingli Yu
When use gcc 10.1.0 and debug build is enabled, there comes below build failure: | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: /mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:25: undefined reference to `unknown_lock_type' | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: ../fsdev/qemu-fsdev-throttle.o: in function `fsdev_co_throttle_request': | /mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:103: undefined reference to `unknown_lock_type' | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: ../fsdev/qemu-fsdev-throttle.o:/mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:103: more undefined references to `unknown_lock_type' follow | collect2: error: ld returned 1 exit status So always define unknown_lock_type to fix the above error. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-09-11qemu: fix CVE-2020-14364Ross Burton
Backport a patch from upstream to fix CVE-2020-14364. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-16qemu: Upgrade 5.0.0 -> 5.1.0Richard Purdie
* Drop backported CVE fixes * Drop cpu backtrace patch from 2015 for debugging an issue which we no longer see (patch throws rejects, files have moved) * Update mips patch to account for file renames * Update chardev patch to match upstream code changes * Update webkitgtk patch, qemumips build works ok but qemux86 musl webkitgtk still fails. Need to figure out the correct fix and upstream it for this, current revert patch is not maintainable. Release notes for 5.1.0 mention slight qemumips performance improvements which would be valuable to us. My tests show no improvement in qemumips testimage execution time for core-image-sato-sdk. Fix a ptest issue for a file looking for /usr/bin/bash when we have /bin/bash. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-13qemu.inc: Use virtual/libgl instead of mesaChandana kalluri
Use virtual/libgl instead of mesa within the recipes to provide users the flexibility to specify providers other than mesa. Signed-off-by: Sai Hari Chandana Kalluri <chandana.kalluri@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-08qemu : fix CVE-2020-15863Lee Chee Yang
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-18qemu: fix for virtfs configuration error in qemu 5.0.0Kamil Dziezyk
Add --enable-cap-ng as virtfs dependency in qemu configuration. When using meta-virtualization layer, qemu requires virtfs, but during do_configure stage below error message shows up: ERROR: VirtFS requires libcap-ng devel and libattr devel Signed-off-by: Kamil Dziezyk <kamil.dziezyk@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-18qemu: fix CVE-2020-13791Sakib Sajal
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-18qemu: fix CVE-2020-13800Sakib Sajal
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-18qemu: fix CVE-2020-13659Sakib Sajal
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-18qemu: fix CVE-2020-13362Sakib Sajal
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-07-03qemu: fix CVE-2020-10761Lee Chee Yang
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-30qemu: switches from libcap to libcap-ng for PACAKGECONFIG virtfshongxu
Since upgrading qemu to 5.0.0, it switches from libcap to libcap-ng for virtfs [1] https://git.qemu.org/?p=qemu.git;a=commit;h=7e46261368d129c5ee8be927f5bcadc7ecd800d7 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-23qemu: uprev v4.2.0 -> v5.0.0Sakib Sajal
Major update after v4.2. Changes: - os_find_datadir() was changed after the v4.2 release causing v5.0 to not find the bios and not boot the image. Fix is sent to upstream qemu. See: qemu/find_datadir.patch - v5.0 binary had host contamination for dynamically linked libraries, "--extra-ldflags='${LDFLAGS}'" in EXTRA_OECONF resolved the issue - bluetooth code was removed: qemu.git$ git show 1d4ffe8dc7 hence removed PACKAGECONFIG[bluez] - -show-cursor qemu option is now deprecated, updated scripts/runqemu to use updated option instead - added PACKAGECONFIG definitions - added qemu-ptest to conf/distro/include/ptest-packagelists.inc - increased support for ARM architecture, cpu and board - removed patches merged upstream and refreshed existing ones Testing: Build core-image-minimal against the machines in openembedded-core/meta/conf/machine and succesfully booted with qemu v5.0 Ran qemu-ptest on x86-64 and arm64 with identical results: PASS: 1166 SKIP: 0 FAIL: 0 Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com> Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-10qemu: fix CVE-2020-13361Lee Chee Yang
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-06-04qemu: force build type to productionJoe Slater
qemu will not build for -Og optimization because macros in lockable.h expect dead-code elimination. Override DEBUG_BUILD. Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-27qemu: enable virglrenderer and glx options subject to 'opengl' DISTRO_FEATUREAlexander Kanavin
Note that to actually use accelerated GL passthrough, there are two options 1) a suitable frontend need to be also enabled - gtk+ and SDL both seem to work well. Previously I struggled to make SDL work, but now it seems fine. 2) it is also possible to render off-screen with -display egl-headless option, and see the output with a VNC viewer (for which, qemu needs to be started with a VNC server): $ runqemu kvm egl-headless publicvnc Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-05-19qemu: fix CVE-2020-11869Lee Chee Yang
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-24qemu-system-native: Fix commented out PACKAGECONFIGJeremy Puhlman
Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-04-07qemu: fix CVE-2020-11102Lee Chee Yang
Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-30qemu: Add check for missing headerOleksiy Obitotskyy
Header missing and configure script detect this. Add check before include header (if_alg.h). Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-24qemu.inc: Always disable compile time git updatingMark Hatle
If the SRC_URI is switched to be git based, QEMU will automatically update itself at compile time for select git submodules. This by passes the bitbake git fetcher. These modules are always present in the release tarballs, so only are problematic when used with git based SRC_URIs. These switches will have no effect on a tarball based SRC_URI. Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-23qemu/slirp: fix CVE-2020-7211Chee Yang Lee
fix CVE-2020-7211 for qemu slirp submodule see : https://www.openwall.com/lists/oss-security/2020/01/17/2 https://gitlab.freedesktop.org/slirp/libslirp/commit/14ec36e107a8c9af7d0a80c3571fe39b291ff1d4 Signed-off-by: Chee Yang Lee <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-21qemu-system-native: disable options not included in extended tarballJeremy Puhlman
* Add PACKAGECONFIG option for xkbcommon qemu-keymap.c:16:10: fatal error: xkbcommon/xkbcommon.h: No such file or directory * Add PACKAGECONFIG option and patch for libudev commands-posix.c:53:10: fatal error: libudev.h: No such file or directory * Add PACKAGECONFIG option for libxml2 util/osdep.c:136: undefined reference to `fcntl64' - Without specifying libxml2, configure searches the system and pulls in the system libxml2 if it is present. In the process it adds -L/usr/lib64 which causes the system libc to be linked instead of the one from the extended tarball. None of the above libraries appear to be included in the depends for any of the qemu builds, so if they are getting linked in, its probably not intentionally. Signed-off-by: Jeremy Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12qemu: fix CVE-2020-7039Changqing Li
Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-12qemu: Fix reproducibilty issuesJeremy Puhlman
tests/qemu-iotests/common.env is generated from configure which we pass ${HOSTTOOLS_DIR}/python3 as our python to use, which gets copied into the ptests. Correct python3 path. Signed-off-by: Jeremy A. Puhlman <jpuhlman@mvista.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-06qemu: update Xen packages names for the xen-tools recipeChristopher Clark
The Xen recipe has been divided into separate recipes for the hypervisor and tools in meta-virtualization commit 545461ba, so the package name references in the qemu recipe need to be updated to the new xen-tools packages. This change allows the temporary bbappend applied to qemu in meta-virtualization in that change to be retired. Signed-off-by: Christopher Clark <christopher.w.clark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-28qemu: Fix CVE-2020-1711Lee Chee Yang
see https://git.qemu.org/?p=qemu.git;a=commit;h=693fd2acdf14dd86c0bf852610f1c2cca80a74dc Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-02-14qemu: Upgrade to 4.2.0Alistair Francis
While we are upgrading let's refresh patches and remove the outdated patches. Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-22qemu: Enable ppc64le support for qemu-usermodeKhem Raj
glibc defines minimum kernel needed to be 3.10.0 for LE ppc64 Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-10runqemu: Add network bridge supportJoshua Watt
Qemu supports attaching the virtual machine to an existing network bridge interface via the qemu-bridge-helper program (as long as the system is correctly configured to give the user permissions). Add support for runqemu to do this also via the "bridge=<INTERFACE>" argument. Note that for this to work correctly, the host qemu-bridge-helper must be used, not the one that might have been built by qemu-native. In order for qemu to correctly find this program, a qemu-oe-bridge-helper program has been added to qemu-helper-native, and runqemu will use this helper as the bridge helper. The helper will look for the host qemu-bridge-helper first by looking in the QEMU_BRIDGE_HELPER environment variable, then by search common paths where the helper is installed. Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-30qemu: Replace stime() API with clock_settimeKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-12-28qemu: Add PACKAGECONFIG for glusterfsshohei.maruyama@cybertrust.co.jp
This commit adds PACKAGECONFIG for glusterfs. glusterfs is not required f- or runqemu, so it should be optional to reduce build time. Signed-off-by: Shohei Maruyama <shohei.maruyama@cybertrust.co.jp> Signed-off-by: Ross Burton <ross.burton@intel.com>