[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v1 14/14] scripts/qemu.py: allow arches use KVM for
From: |
Alex Bennée |
Subject: |
[Qemu-devel] [PATCH v1 14/14] scripts/qemu.py: allow arches use KVM for their 32bit cousins |
Date: |
Fri, 25 Jan 2019 14:00:17 +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 | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/scripts/qemu.py b/scripts/qemu.py
index 0a5e02eb56..2934ee12c5 100644
--- a/scripts/qemu.py
+++ b/scripts/qemu.py
@@ -25,9 +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]:
+ host_arch = os.uname()[4]
+ if target_arch and target_arch != host_arch:
+ if target_arch == ADDITIONAL_ARCHES[host_arch]:
+ return True
return False
return os.access("/dev/kvm", os.R_OK | os.W_OK)
--
2.17.1
- [Qemu-devel] [PATCH v1 10/14] tests/vm: move images to $HOME/.cache/qemu-vm/images, (continued)
- [Qemu-devel] [PATCH v1 09/14] tests: PEP8 cleanup of docker.py, mostly white space, Alex Bennée, 2019/01/25
- [Qemu-devel] [PATCH v1 04/14] archive-source.sh: Clone the submodules locally, Alex Bennée, 2019/01/25
- [Qemu-devel] [PATCH v1 12/14] tests/vm: add --build-target option, Alex Bennée, 2019/01/25
- [Qemu-devel] [PATCH v1 14/14] scripts/qemu.py: allow arches use KVM for their 32bit cousins,
Alex Bennée <=
- [Qemu-devel] [PATCH v1 13/14] tests/vm: expose BUILD_TARGET, TARGET_LIST and EXTRA_CONFIGURE_OPTS, Alex Bennée, 2019/01/25