subsystem: build

With the ACPI PCI hotplug changes introduced in 2.3, QEMU >= 6.1 is required.
Remove unnecessary qemu version check in build script.

Fixes #3547

Signed-off-by: goodluckbot <tangbo_gl@hotmail.com>
This commit is contained in:
goodluckbot 2022-03-01 01:18:35 +08:00
parent 081a235efe
commit 54d0a672c5

View File

@ -222,11 +222,6 @@ generate_qemu_options() {
# Disabled options # Disabled options
# Disable sheepdog block driver support (deprecated in 5.2.0)
if ! gt_eq ${qemu_version} 5.2.0 ; then
qemu_options+=(size:--disable-sheepdog)
fi
# Disable block migration in the main migration stream # Disable block migration in the main migration stream
qemu_options+=(size:--disable-live-block-migration) qemu_options+=(size:--disable-live-block-migration)
@ -312,9 +307,7 @@ generate_qemu_options() {
# Disable libudev since it is only needed for qemu-pr-helper and USB, # Disable libudev since it is only needed for qemu-pr-helper and USB,
# none of which are used with Kata # none of which are used with Kata
if gt_eq "${qemu_version}" "5.2.0" ; then qemu_options+=(size:--disable-libudev)
qemu_options+=(size:--disable-libudev)
fi
# Disallow network downloads # Disallow network downloads
qemu_options+=(security:--disable-curl) qemu_options+=(security:--disable-curl)
@ -331,10 +324,8 @@ generate_qemu_options() {
# But since QEMU 5.2 the daemon is built as part of the tools set # 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 # (disabled with --disable-tools) thus it needs to be explicitely
# enabled. # enabled.
if gt_eq "${qemu_version}" "5.2.0" ; then qemu_options+=(functionality:--enable-virtiofsd)
qemu_options+=(functionality:--enable-virtiofsd) qemu_options+=(functionality:--enable-virtfs)
qemu_options+=(functionality:--enable-virtfs)
fi
# Don't build linux-user bsd-user # Don't build linux-user bsd-user
qemu_options+=(size:--disable-bsd-user) qemu_options+=(size:--disable-bsd-user)
@ -385,12 +376,6 @@ generate_qemu_options() {
qemu_options+=(size:--disable-dmg) qemu_options+=(size:--disable-dmg)
qemu_options+=(size:--disable-parallels) qemu_options+=(size:--disable-parallels)
# vxhs was deprecated on QEMU 5.1 so it doesn't need to be
# explicitly disabled.
if ! gt_eq "${qemu_version}" "5.1.0" ; then
qemu_options+=(size:--disable-vxhs)
fi
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# Enabled options # Enabled options
@ -449,11 +434,7 @@ generate_qemu_options() {
# compile with high level of optimisation # compile with high level of optimisation
# On version 5.2.0 onward the Meson build system warns to not use -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+=" -O2"
_qemu_cflags+=" -O3"
else
_qemu_cflags+=" -O2"
fi
# Improve code quality by assuming identical semantics for interposed # Improve code quality by assuming identical semantics for interposed
# synmbols. # synmbols.
@ -544,8 +525,8 @@ main() {
[ -n "${qemu_version}" ] || [ -n "${qemu_version}" ] ||
die "cannot determine qemu version from file $qemu_version_file" die "cannot determine qemu version from file $qemu_version_file"
if ! gt_eq "${qemu_version}" "5.0.0" ; then if ! gt_eq "${qemu_version}" "6.1.0" ; then
die "Kata requires QEMU >= 5.0.0" die "Kata requires QEMU >= 6.1.0"
fi fi
local gcc_version_major=$(gcc -dumpversion | cut -f1 -d.) local gcc_version_major=$(gcc -dumpversion | cut -f1 -d.)