From 0538bbfc4956916802d614db5afaeaf312b9cfd7 Mon Sep 17 00:00:00 2001 From: Niteesh Dubey Date: Tue, 13 Feb 2024 15:32:25 +0000 Subject: [PATCH] packaging: qemu-snp-experimental: support host kernel with gmem This is required to allow creation of SNP coco on host kernel (e.g. https://github.com/AMDESE/linux ,branch:snp-host-latest) supporting guest private memory for SNP using gmem. Note: This qemu does not work if the host kernel does not support gmem/UPM. Fixes: #9092 Signed-off-by: Niteesh Dubey --- .../no_patches.txt | 0 .../b6ee1218e6c9b98a556841615dd10d094e648393/no_patches.txt | 0 tools/packaging/scripts/configure-hypervisor.sh | 6 +++++- tools/packaging/static-build/qemu/Dockerfile | 1 + versions.yaml | 4 ++-- 5 files changed, 8 insertions(+), 3 deletions(-) rename tools/packaging/qemu/patches/{tag_patches/3b6a2b6b7466f6dea53243900b7516c3f29027b7 => 8.2.x}/no_patches.txt (100%) create mode 100644 tools/packaging/qemu/patches/tag_patches/b6ee1218e6c9b98a556841615dd10d094e648393/no_patches.txt diff --git a/tools/packaging/qemu/patches/tag_patches/3b6a2b6b7466f6dea53243900b7516c3f29027b7/no_patches.txt b/tools/packaging/qemu/patches/8.2.x/no_patches.txt similarity index 100% rename from tools/packaging/qemu/patches/tag_patches/3b6a2b6b7466f6dea53243900b7516c3f29027b7/no_patches.txt rename to tools/packaging/qemu/patches/8.2.x/no_patches.txt diff --git a/tools/packaging/qemu/patches/tag_patches/b6ee1218e6c9b98a556841615dd10d094e648393/no_patches.txt b/tools/packaging/qemu/patches/tag_patches/b6ee1218e6c9b98a556841615dd10d094e648393/no_patches.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/packaging/scripts/configure-hypervisor.sh b/tools/packaging/scripts/configure-hypervisor.sh index e5ee8bb5a2..8527618778 100755 --- a/tools/packaging/scripts/configure-hypervisor.sh +++ b/tools/packaging/scripts/configure-hypervisor.sh @@ -328,7 +328,11 @@ generate_qemu_options() { # From Kata Containers 2.5.0-alpha2 all arches but powerpc have been # using the new implementation of virtiofs daemon, which is not part # of QEMU. - qemu_options+=(functionality:--disable-virtiofsd) + # + # qemu configure does not support virtiofsd if qemu version >= 8.0.0. + if ! gt_eq "${qemu_version}" "8.0.0" ; then + qemu_options+=(functionality:--disable-virtiofsd) + fi qemu_options+=(functionality:--enable-virtfs) diff --git a/tools/packaging/static-build/qemu/Dockerfile b/tools/packaging/static-build/qemu/Dockerfile index 5ed2d1ad9b..7ed1b8995d 100644 --- a/tools/packaging/static-build/qemu/Dockerfile +++ b/tools/packaging/static-build/qemu/Dockerfile @@ -60,6 +60,7 @@ RUN apt-get update && apt-get upgrade -y && \ patch \ python \ python-dev \ + python3-venv \ rsync \ zlib1g-dev${DPKG_ARCH} && \ if [ "${ARCH}" != s390x ]; then apt-get install -y --no-install-recommends libpmem-dev${DPKG_ARCH}; fi && \ diff --git a/versions.yaml b/versions.yaml index a78f876be3..3cc63531b3 100644 --- a/versions.yaml +++ b/versions.yaml @@ -106,9 +106,9 @@ assets: tag: "b67b00e6b4c7831a3f5bc684bc0df7a9bfd1bd56-plus-TDX-v1.10" qemu-snp-experimental: - description: "QEMU with experimental SNP support (no UPM)" + description: "QEMU with experimental SNP support" url: "https://github.com/AMDESE/qemu" - tag: "3b6a2b6b7466f6dea53243900b7516c3f29027b7" + tag: "b6ee1218e6c9b98a556841615dd10d094e648393" stratovirt: description: "StratoVirt is an lightweight opensource VMM"