From 7cdf113cf0847571dbffb1ff7fa189a1f973e9d4 Mon Sep 17 00:00:00 2001 From: Jia He Date: Fri, 6 Mar 2020 13:52:31 +0800 Subject: [PATCH] scripts: Relax the version limitation for qemu Currently arm64 kata uses 3.0 qemu version. Hence aarch64 can't use some --disable configure options between [3.1, 4.0]. Besides, due to upstream qemu bug about --disable-replication, still enable the replication on aarch64 for qemu 3.0. Please refer to the commit 3ebb9c4f52 ("migration/colo.c: Fix compilation issue when disable replication") Fixes #926 Signed-off-by: Jia He --- scripts/configure-hypervisor.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/configure-hypervisor.sh b/scripts/configure-hypervisor.sh index 05e485efcc..056602f615 100755 --- a/scripts/configure-hypervisor.sh +++ b/scripts/configure-hypervisor.sh @@ -321,12 +321,15 @@ generate_qemu_options() { # implicitly enabled in Fedora 27). qemu_options+=(size:--disable-linux-aio) - if [[ "${qemu_version_major}" -ge 4 || ( "${qemu_version_major}" -eq 3 && "${qemu_version_minor}" -ge 1 ) ]]; then + if [[ "${qemu_version_major}" -ge 3 ]]; then # Disable graphics qemu_options+=(size:--disable-virglrenderer) - # Disable block replication - qemu_options+=(size:--disable-replication) + # Due to qemu commit 3ebb9c4f52, we can't disable replication in v3.0 + if [[ "${qemu_version_major}" -ge 4 || ( "${qemu_version_major}" -eq 3 && "${qemu_version_minor}" -ge 1 ) ]]; then + # Disable block replication + qemu_options+=(size:--disable-replication) + fi # Disable USB smart card reader qemu_options+=(size:--disable-smartcard)