mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-12 20:39:30 +00:00
Merge pull request #10492 from zvonkok/upgrade-qemu-9.1.0
qemu: Upgrade qemu 9.1.2
This commit is contained in:
0
tools/packaging/qemu/patches/9.1.x/no_patches.txt
Normal file
0
tools/packaging/qemu/patches/9.1.x/no_patches.txt
Normal file
@@ -222,9 +222,6 @@ generate_qemu_options() {
|
|||||||
|
|
||||||
# Disabled options
|
# Disabled options
|
||||||
|
|
||||||
# Disable block migration in the main migration stream
|
|
||||||
qemu_options+=(size:--disable-live-block-migration)
|
|
||||||
|
|
||||||
# braille support not required
|
# braille support not required
|
||||||
qemu_options+=(size:--disable-brlapi)
|
qemu_options+=(size:--disable-brlapi)
|
||||||
|
|
||||||
@@ -397,6 +394,23 @@ generate_qemu_options() {
|
|||||||
qemu_options+=(size:--disable-vhdx)
|
qemu_options+=(size:--disable-vhdx)
|
||||||
qemu_options+=(size:--disable-hv-balloon)
|
qemu_options+=(size:--disable-hv-balloon)
|
||||||
|
|
||||||
|
# Disable various features based on the qemu_version
|
||||||
|
if gt_eq "${qemu_version}" "9.1.0" ; then
|
||||||
|
# Disable Query Processing Library support
|
||||||
|
qemu_options+=(size:--disable-qpl)
|
||||||
|
# Disable UADK Library support
|
||||||
|
qemu_options+=(size:--disable-uadk)
|
||||||
|
# Disable syscall buffer debugging support
|
||||||
|
qemu_options+=(size:--disable-debug-remap)
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Disable gio support
|
||||||
|
qemu_options+=(size:--disable-gio)
|
||||||
|
# Disable libdaxctl part of ndctl support
|
||||||
|
qemu_options+=(size:--disable-libdaxctl)
|
||||||
|
qemu_options+=(size:--disable-oss)
|
||||||
|
|
||||||
#---------------------------------------------------------------------
|
#---------------------------------------------------------------------
|
||||||
# Enabled options
|
# Enabled options
|
||||||
|
|
||||||
@@ -409,6 +423,7 @@ generate_qemu_options() {
|
|||||||
|
|
||||||
# Support Linux AIO (native)
|
# Support Linux AIO (native)
|
||||||
qemu_options+=(size:--enable-linux-aio)
|
qemu_options+=(size:--enable-linux-aio)
|
||||||
|
qemu_options+=(size:--enable-linux-io-uring)
|
||||||
|
|
||||||
# Support Ceph RADOS Block Device (RBD)
|
# Support Ceph RADOS Block Device (RBD)
|
||||||
[ -z "${static}" ] && qemu_options+=(functionality:--enable-rbd)
|
[ -z "${static}" ] && qemu_options+=(functionality:--enable-rbd)
|
||||||
@@ -427,15 +442,14 @@ generate_qemu_options() {
|
|||||||
# for that architecture
|
# for that architecture
|
||||||
if [ "$arch" == x86_64 ]; then
|
if [ "$arch" == x86_64 ]; then
|
||||||
qemu_options+=(speed:--enable-avx2)
|
qemu_options+=(speed:--enable-avx2)
|
||||||
qemu_options+=(speed:--enable-avx512f)
|
qemu_options+=(speed:--enable-avx512bw)
|
||||||
# According to QEMU's nvdimm documentation: When 'pmem' is 'on' and QEMU is
|
|
||||||
# built with libpmem support, QEMU will take necessary operations to guarantee
|
|
||||||
# the persistence of its own writes to the vNVDIMM backend.
|
|
||||||
qemu_options+=(functionality:--enable-libpmem)
|
|
||||||
else
|
else
|
||||||
qemu_options+=(speed:--disable-avx2)
|
qemu_options+=(speed:--disable-avx2)
|
||||||
qemu_options+=(functionality:--disable-libpmem)
|
|
||||||
fi
|
fi
|
||||||
|
# We're disabling pmem support, it is heavilly broken with
|
||||||
|
# Ubuntu's static build of QEMU
|
||||||
|
qemu_options+=(functionality:--disable-libpmem)
|
||||||
|
|
||||||
# Enable libc malloc_trim() for memory optimization.
|
# Enable libc malloc_trim() for memory optimization.
|
||||||
qemu_options+=(speed:--enable-malloc-trim)
|
qemu_options+=(speed:--enable-malloc-trim)
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
# Copyright (c) 2020 Ant Group
|
# Copyright (c) 2020 Ant Group
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
FROM ubuntu:20.04
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
# CACHE_TIMEOUT: date to invalid cache, if the date changes the image will be rebuild
|
# CACHE_TIMEOUT: date to invalid cache, if the date changes the image will be rebuild
|
||||||
# This is required to keep build dependencies with security fixes.
|
# This is required to keep build dependencies with security fixes.
|
||||||
@@ -17,13 +17,13 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|||||||
|
|
||||||
RUN if [ "${ARCH}" != "$(uname -m)" ]; then sed -i 's/^deb/deb [arch=amd64]/g' /etc/apt/sources.list && \
|
RUN if [ "${ARCH}" != "$(uname -m)" ]; then sed -i 's/^deb/deb [arch=amd64]/g' /etc/apt/sources.list && \
|
||||||
dpkg --add-architecture "${DPKG_ARCH#:}" && \
|
dpkg --add-architecture "${DPKG_ARCH#:}" && \
|
||||||
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ focal main restricted" >> /etc/apt/sources.list && \
|
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ jammy main restricted" >> /etc/apt/sources.list && \
|
||||||
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ focal-updates main restricted" >> /etc/apt/sources.list && \
|
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ jammy-updates main restricted" >> /etc/apt/sources.list && \
|
||||||
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ focal universe" >> /etc/apt/sources.list && \
|
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ jammy universe" >> /etc/apt/sources.list && \
|
||||||
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ focal-updates universe" >> /etc/apt/sources.list && \
|
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ jammy-updates universe" >> /etc/apt/sources.list && \
|
||||||
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ focal multiverse" >> /etc/apt/sources.list && \
|
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ jammy multiverse" >> /etc/apt/sources.list && \
|
||||||
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ focal-updates multiverse" >> /etc/apt/sources.list && \
|
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ jammy-updates multiverse" >> /etc/apt/sources.list && \
|
||||||
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ focal-backports main restricted universe multiverse" >> /etc/apt/sources.list; fi
|
echo "deb [arch=${DPKG_ARCH#:}] http://ports.ubuntu.com/ jammy-backports main restricted universe multiverse" >> /etc/apt/sources.list; fi
|
||||||
|
|
||||||
RUN apt-get update && apt-get upgrade -y && \
|
RUN apt-get update && apt-get upgrade -y && \
|
||||||
apt-get --no-install-recommends install -y \
|
apt-get --no-install-recommends install -y \
|
||||||
@@ -53,6 +53,7 @@ RUN apt-get update && apt-get upgrade -y && \
|
|||||||
libpixman-1-dev${DPKG_ARCH} \
|
libpixman-1-dev${DPKG_ARCH} \
|
||||||
libselinux1-dev${DPKG_ARCH} \
|
libselinux1-dev${DPKG_ARCH} \
|
||||||
libtool${DPKG_ARCH} \
|
libtool${DPKG_ARCH} \
|
||||||
|
liburing-dev${DPKG_ARCH} \
|
||||||
make \
|
make \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
pkg-config${DPKG_ARCH} \
|
pkg-config${DPKG_ARCH} \
|
||||||
@@ -62,6 +63,7 @@ RUN apt-get update && apt-get upgrade -y && \
|
|||||||
python3 \
|
python3 \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-venv \
|
python3-venv \
|
||||||
|
python3-tomli \
|
||||||
rsync \
|
rsync \
|
||||||
zlib1g-dev${DPKG_ARCH} && \
|
zlib1g-dev${DPKG_ARCH} && \
|
||||||
if [ "${ARCH}" != s390x ]; then apt-get install -y --no-install-recommends libpmem-dev${DPKG_ARCH}; fi && \
|
if [ "${ARCH}" != s390x ]; then apt-get install -y --no-install-recommends libpmem-dev${DPKG_ARCH}; fi && \
|
||||||
@@ -69,10 +71,3 @@ RUN apt-get update && apt-get upgrade -y && \
|
|||||||
if [ "${ARCH}" != "$(uname -m)" ]; then apt-get install --no-install-recommends -y gcc-"${GCC_ARCH}"-linux-gnu; fi && \
|
if [ "${ARCH}" != "$(uname -m)" ]; then apt-get install --no-install-recommends -y gcc-"${GCC_ARCH}"-linux-gnu; fi && \
|
||||||
apt-get clean && rm -rf /var/lib/apt/lists/
|
apt-get clean && rm -rf /var/lib/apt/lists/
|
||||||
|
|
||||||
RUN git clone https://github.com/axboe/liburing/ ~/liburing && \
|
|
||||||
cd ~/liburing && \
|
|
||||||
git checkout tags/liburing-2.1 && \
|
|
||||||
GCC_ARCH="${ARCH}" && if [ "${ARCH}" = "ppc64le" ]; then GCC_ARCH="powerpc64le"; fi && \
|
|
||||||
if [ "${ARCH}" != "$(uname -m)" ]; then PREFIX="${GCC_ARCH}-linux-gnu"; fi && \
|
|
||||||
./configure --cc=${GCC_ARCH}-linux-gnu-gcc --cxx=${GCC_ARCH}-linux-gnu-cpp --prefix=/usr/${PREFIX}/ && \
|
|
||||||
make && make install && ldconfig
|
|
||||||
|
@@ -59,9 +59,7 @@ ${container_engine} pull ${container_image} || ("${container_engine}" build \
|
|||||||
# No-op unless PUSH_TO_REGISTRY is exported as "yes"
|
# No-op unless PUSH_TO_REGISTRY is exported as "yes"
|
||||||
push_to_registry "${container_image}")
|
push_to_registry "${container_image}")
|
||||||
|
|
||||||
"${container_engine}" run \
|
"${container_engine}" run --rm -i \
|
||||||
--rm \
|
|
||||||
-i \
|
|
||||||
--env BUILD_SUFFIX="${build_suffix}" \
|
--env BUILD_SUFFIX="${build_suffix}" \
|
||||||
--env PKGVERSION="${PKGVERSION}" \
|
--env PKGVERSION="${PKGVERSION}" \
|
||||||
--env QEMU_DESTDIR="${qemu_destdir}" \
|
--env QEMU_DESTDIR="${qemu_destdir}" \
|
||||||
@@ -71,7 +69,9 @@ ${container_engine} pull ${container_image} || ("${container_engine}" build \
|
|||||||
--env HYPERVISOR_NAME="${HYPERVISOR_NAME}" \
|
--env HYPERVISOR_NAME="${HYPERVISOR_NAME}" \
|
||||||
--env QEMU_VERSION_NUM="${qemu_version}" \
|
--env QEMU_VERSION_NUM="${qemu_version}" \
|
||||||
--env ARCH="${ARCH}" \
|
--env ARCH="${ARCH}" \
|
||||||
-v "${repo_root_dir}:/root/kata-containers" \
|
--user "$(id -u)":"$(id -g)" \
|
||||||
|
-w "${PWD}" \
|
||||||
|
-v "${repo_root_dir}:${repo_root_dir}" \
|
||||||
-v "${PWD}":/share "${container_image}" \
|
-v "${PWD}":/share "${container_image}" \
|
||||||
bash -c "/root/kata-containers/tools/packaging/static-build/qemu/build-qemu.sh"
|
bash -c "${qemu_builder}"
|
||||||
|
|
||||||
|
@@ -8,7 +8,9 @@ set -o errexit
|
|||||||
set -o nounset
|
set -o nounset
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
kata_packaging_dir="/root/kata-containers/tools/packaging"
|
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
|
||||||
|
kata_packaging_dir="${script_dir}/../.."
|
||||||
kata_packaging_scripts="${kata_packaging_dir}/scripts"
|
kata_packaging_scripts="${kata_packaging_dir}/scripts"
|
||||||
|
|
||||||
kata_static_build_dir="${kata_packaging_dir}/static-build"
|
kata_static_build_dir="${kata_packaging_dir}/static-build"
|
||||||
|
@@ -88,8 +88,8 @@ assets:
|
|||||||
qemu:
|
qemu:
|
||||||
description: "VMM that uses KVM"
|
description: "VMM that uses KVM"
|
||||||
url: "https://github.com/qemu/qemu"
|
url: "https://github.com/qemu/qemu"
|
||||||
version: "v8.2.4"
|
version: "v9.1.2"
|
||||||
tag: "v8.2.4"
|
tag: "v9.1.2"
|
||||||
# Do not include any non-full release versions
|
# Do not include any non-full release versions
|
||||||
# Break the line *without CR or space being appended*, to appease
|
# Break the line *without CR or space being appended*, to appease
|
||||||
# yamllint, and note the deliberate ' ' at the end of the expression.
|
# yamllint, and note the deliberate ' ' at the end of the expression.
|
||||||
|
Reference in New Issue
Block a user