[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-arm] [PATCH v2 16/16] scripts/qemu.py: allow arches use KVM for th
From: |
Alex Bennée |
Subject: |
[Qemu-arm] [PATCH v2 16/16] scripts/qemu.py: allow arches use KVM for their 32bit cousins |
Date: |
Thu, 7 Feb 2019 18:37:44 +0000 |
A lot of architectures can run their 32 bit cousins on KVM so the
kvm_available function needs to be a little less restricting when
deciding if KVM is available.
Signed-off-by: Alex Bennée <address@hidden>
---
scripts/qemu.py | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 0a5e02eb56..32b00af5cc 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -25,10 +25,18 @@ import tempfile
LOG = logging.getLogger(__name__)
+# Mapping host architecture to any additional architectures it can
+# support which often includes its 32 bit cousin.
+ADDITIONAL_ARCHES = {
+ "x86_64" : "i386",
+ "aarch64" : "armhf"
+}
def kvm_available(target_arch=None):
- if target_arch and target_arch != os.uname()[4]:
- return False
+ host_arch = os.uname()[4]
+ if target_arch and target_arch != host_arch:
+ if target_arch != ADDITIONAL_ARCHES.get(host_arch):
+ return False
return os.access("/dev/kvm", os.R_OK | os.W_OK)
--
2.20.1
- [Qemu-arm] [PATCH v2 04/16] .travis.yml: fold --disable-tcg into alternate coroutine builds, (continued)
- [Qemu-arm] [PATCH v2 04/16] .travis.yml: fold --disable-tcg into alternate coroutine builds, Alex Bennée, 2019/02/07
- [Qemu-arm] [PATCH v2 01/16] .cirrus.yml: basic compile and test for FreeBSD, Alex Bennée, 2019/02/07
- [Qemu-arm] [PATCH v2 05/16] MAINTAINERS: Add an entry for scripts/archive-source.sh, Alex Bennée, 2019/02/07
- [Qemu-arm] [PATCH v2 08/16] tests: make docker.py update use configured binfmt path, Alex Bennée, 2019/02/07
- [Qemu-arm] [PATCH v2 03/16] .travis.yml: separate tools and docs into another entry, Alex Bennée, 2019/02/07
- [Qemu-arm] [PATCH v2 06/16] archive-source.sh: Clone the submodules locally, Alex Bennée, 2019/02/07
- [Qemu-arm] [PATCH v2 07/16] docker: add debian-buster-arm64-cross, Alex Bennée, 2019/02/07
- [Qemu-arm] [PATCH v2 10/16] tests: docker.py be even smarter with persistent binfmt_misc, Alex Bennée, 2019/02/07
- [Qemu-arm] [PATCH v2 14/16] tests/vm: add --build-target option, Alex Bennée, 2019/02/07
- [Qemu-arm] [PATCH v2 12/16] tests/vm: move images to $HOME/.cache/qemu-vm/images, Alex Bennée, 2019/02/07
- [Qemu-arm] [PATCH v2 16/16] scripts/qemu.py: allow arches use KVM for their 32bit cousins,
Alex Bennée <=
- [Qemu-arm] [PATCH v2 09/16] tests: make docker.py check for persistent configs, Alex Bennée, 2019/02/07
- [Qemu-arm] [PATCH v2 11/16] tests: PEP8 cleanup of docker.py, mostly white space, Alex Bennée, 2019/02/07
- [Qemu-arm] [PATCH v2 13/16] tests/vm: call make check directly for netbsd/freebsd/ubuntu.i386, Alex Bennée, 2019/02/07
- [Qemu-arm] [PATCH v2 15/16] tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTS, Alex Bennée, 2019/02/07
- Re: [Qemu-arm] [Qemu-devel] [PATCH v2 00/16] current testing/next queue (with build fixes), Philippe Mathieu-Daudé, 2019/02/07