versions: update QEMU to 5.2.0

This change the version of QEMU used in the tests and CI.

The scripts/configure-hypervisor.sh was changed so that:
  - Passing the `--enable-virtiofsd` flag
  - Do not compiling with -O3 to avoid the warning:

    Program python3 found: YES (/usr/bin/python3)
    ../meson.build:104: WARNING: Consider using the built-in optimization level instead of using "-O3".
    ../meson.build:108: WARNING: Consider using the built-in optimization level instead of using "-O3".

The qemu.blacklist files was changed so that new and uneeded firmware files are removed from the
final tarball. Except for qboot.rom which is new but kept, since it can be used with microvm
machine type (in case we want to enable microvm in the future).

The patches which are applied on QEMU sources:
 - 0001-virtiofsd-Allow-to-build-it-without-the-tools.patch
   (Build fix for Meson - allows passing `--disable-tools --enable-virtiofsd`)
 - 0002-virtiofsd-extract-lo_do_open-from-lo_open.patch
   0003-virtiofsd-optionally-return-inode-pointer-from-lo_do.patch
   0004-virtiofsd-prevent-opening-of-special-files-CVE-2020-.patch
   0005-virtiofsd-Add-_llseek-to-the-seccomp-whitelist.patch
   0006-virtiofsd-Add-restart_syscall-to-the-seccomp-whiteli.patch
   (Security fixes for virtiofsd)
 - 0007-9p-removing-coroutines-of-9p-to-increase-the-I-O-per.patch
   (Performance improvement for 9p driver)
 - 0008-hw-s390x-fix-build-for-virtio-9p-ccw.patch
   (Build fix for virtio-9p-ccw machine type)

Fixes: #1238

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This commit is contained in:
Wainer dos Santos Moschetta
2021-01-06 06:53:27 -05:00
parent 74a893f732
commit 88cef33b76
12 changed files with 835 additions and 4 deletions

View File

@@ -334,6 +334,16 @@ generate_qemu_options() {
# Don't build the qemu-io, qemu-nbd and qemu-image tools
qemu_options+=(size:--disable-tools)
# Kata Containers may be configured to use the virtiofs daemon.
#
# But since QEMU 5.2 the daemon is built as part of the tools set
# (disabled with --disable-tools) thus it needs to be explicitely
# enabled.
if gt_eq "${qemu_version}" "5.2.0" ; then
qemu_options+=(functionality:--enable-virtiofsd)
qemu_options+=(functionality:--enable-virtfs)
fi
# Don't build linux-user bsd-user
qemu_options+=(size:--disable-bsd-user)
qemu_options+=(size:--disable-linux-user)
@@ -461,7 +471,10 @@ generate_qemu_options() {
_qemu_cflags=""
# compile with high level of optimisation
_qemu_cflags+=" -O3"
# On version 5.2.0 onward the Meson build system warns to not use -O3
if ! gt_eq "${qemu_version}" "5.2.0" ; then
_qemu_cflags+=" -O3"
fi
# Improve code quality by assuming identical semantics for interposed
# synmbols.