diff mbox series

[v1,3/6] tests/vm: don't build using TCG by default

Message ID 20211115142915.3797652-4-alex.bennee@linaro.org (mailing list archive)
State New, archived
Headers show
Series current state of for-6.2/misc-fixes | expand

Commit Message

Alex Bennée Nov. 15, 2021, 2:29 p.m. UTC
While it is useful to run these images using TCG their performance
will not be anything like the native guests. Don't do it by default.

Fixes: https://gitlab.com/qemu-project/qemu/-/issues/393
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 tests/vm/Makefile.include | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

Comments

Richard Henderson Nov. 16, 2021, 9:07 a.m. UTC | #1
On 11/15/21 3:29 PM, Alex Bennée wrote:
> While it is useful to run these images using TCG their performance
> will not be anything like the native guests. Don't do it by default.
> 
> Fixes:https://gitlab.com/qemu-project/qemu/-/issues/393
> Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
> ---
>   tests/vm/Makefile.include | 17 +++++++++++++----
>   1 file changed, 13 insertions(+), 4 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Willian Rampazzo Nov. 16, 2021, 12:23 p.m. UTC | #2
On Mon, Nov 15, 2021 at 11:29 AM Alex Bennée <alex.bennee@linaro.org> wrote:
>
> While it is useful to run these images using TCG their performance
> will not be anything like the native guests. Don't do it by default.
>
> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/393
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  tests/vm/Makefile.include | 17 +++++++++++++----
>  1 file changed, 13 insertions(+), 4 deletions(-)
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>
diff mbox series

Patch

diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include
index f8ca619cf2..ae91f5043e 100644
--- a/tests/vm/Makefile.include
+++ b/tests/vm/Makefile.include
@@ -2,14 +2,22 @@ 
 
 .PHONY: vm-build-all vm-clean-all
 
+HOST_ARCH = $(if $(ARCH),$(ARCH),$(shell uname -m))
+
 EFI_AARCH64 = $(wildcard $(BUILD_DIR)/pc-bios/edk2-aarch64-code.fd)
 
-IMAGES := freebsd netbsd openbsd centos fedora haiku.x86_64
+X86_IMAGES := freebsd netbsd openbsd centos fedora haiku.x86_64
 ifneq ($(GENISOIMAGE),)
-IMAGES += ubuntu.i386 centos
+X86_IMAGES += ubuntu.i386 centos
 ifneq ($(EFI_AARCH64),)
-IMAGES += ubuntu.aarch64 centos.aarch64
+ARM64_IMAGES += ubuntu.aarch64 centos.aarch64
+endif
 endif
+
+ifeq ($(HOST_ARCH),x86_64)
+IMAGES=$(X86_IMAGES) $(if $(USE_TCG),$(ARM64_IMAGES))
+else ifeq ($(HOST_ARCH),aarch64)
+IMAGES=$(ARM64_IMAGES) $(if $(USE_TCG),$(X86_IMAGES))
 endif
 
 IMAGES_DIR := $(HOME)/.cache/qemu-vm/images
@@ -43,7 +51,7 @@  else
 endif
 	@echo "  vm-build-haiku.x86_64           - Build QEMU in Haiku VM"
 	@echo ""
-	@echo "  vm-build-all                    - Build QEMU in all VMs"
+	@echo "  vm-build-all                    - Build QEMU in: $(IMAGES)"
 	@echo "  vm-clean-all                    - Clean up VM images"
 	@echo
 	@echo "For trouble-shooting:"
@@ -56,6 +64,7 @@  endif
 	@echo '    EXTRA_CONFIGURE_OPTS="..."   - Pass to configure step'
 	@echo "    J=[0..9]*            	 - Override the -jN parameter for make commands"
 	@echo "    LOG_CONSOLE=1        	 - Log console to file in: ~/.cache/qemu-vm "
+	@echo "    USE_TCG=1        	         - Use TCG for cross-arch images"
 	@echo "    QEMU=/path/to/qemu		 - Change path to QEMU binary"
 ifeq ($(HAVE_PYTHON_YAML),yes)
 	@echo "    QEMU_CONFIG=/path/conf.yml   - Change path to VM configuration .yml file."