Message ID | 20190207183744.5054-17-alex.bennee@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="dV+fTvdA"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43wSS373D4z9s9G for <incoming@patchwork.ozlabs.org>; Fri, 8 Feb 2019 06:05:07 +1100 (AEDT) Received: from localhost ([127.0.0.1]:45494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>) id 1groyv-0004d5-Qy for incoming@patchwork.ozlabs.org; Thu, 07 Feb 2019 14:05:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1groYy-0000WP-7Z for qemu-devel@nongnu.org; Thu, 07 Feb 2019 13:38:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1groYt-0007nC-Sx for qemu-devel@nongnu.org; Thu, 07 Feb 2019 13:38:13 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:55748) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1groYr-0007Yf-Rz for qemu-devel@nongnu.org; Thu, 07 Feb 2019 13:38:11 -0500 Received: by mail-wm1-x344.google.com with SMTP id r17so917409wmh.5 for <qemu-devel@nongnu.org>; Thu, 07 Feb 2019 10:38:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=twEAfdMN/6FjqGGiydr3gUMZzTupENw0qNrtRFI8B3w=; b=dV+fTvdAHXLT+WgMOu4QFBFGF+lghAOVxgnknPgKb96Y09+opDxH+69dseI/I8ztbM aXCulkIh1krTnOeDaMtg1SDmXmI1kmiitA8QJ+8hk8YjYCHNppAB76FFa64MBRu5D2WB DWeMbXN3nZdD6RuEIW+G97vhVBEKbloEdzuUfxxt5U7Ihf+offeYNbRL4EOpXm3cpeMa mEQR4DtYfnKlGx56r0KoQ9Z7BbawUtlluaDnn6d3XbcnkYIC+XxF1D6DUvwdkMQRuEYB YorG6m21kh1ior4s/5wI/lbN7CoT8xYV8w9IrdQq33JRBjDlY7TT7yrE5QoeXzkNDeZe uuAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=twEAfdMN/6FjqGGiydr3gUMZzTupENw0qNrtRFI8B3w=; b=eJ+t7Q3MBTMpR+CxHGmdX6FqKTE5NmUsG5i+VaaNgI1FLms76sxCWPhfoEGp5F24JX Qne0yfXL7essFp45G5NMTPrmX3+BZGEtufbZM6TTPB1rnM3+CSRz4Dou5rK6Hxr1gkuu gW/0+uQHQ6JdFXNgXT18KgO4ZoEz6pbuP4Yzc/Yum7sRvhPCl6ZzBvj9PuFQZ1AS52Tk mYYlQ8ZyOVXYvTpFSb/UN2kdzPj8dbKje4a9NGS8DjwSTqNZ8K3hQ1d03iwY4GK9ccJM 7LLafFbZviWK3l5mwQqjIJ5KCbHqtem022Hva8kWL3+VaeFHZmtTDrTDOUAiDTfs5riL rBNg== X-Gm-Message-State: AHQUAuYvPGZyB4wBIZuUxBCZ4mIk3M/D7/aXyO9LofRDTGK2ILZecXjR DAWDFed5cM8oTw6TL79Hl+fz9g== X-Google-Smtp-Source: AHgI3Iaj9E0ZV2b7z5xIy3MUYidiapZ74y6XcZdWMmFZgQ1yFbMsH39AK5KSQKPlhHcKzNrj9IPXYA== X-Received: by 2002:a7b:c0c5:: with SMTP id s5mr8142082wmh.56.1549564680034; Thu, 07 Feb 2019 10:38:00 -0800 (PST) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id f10sm27930wmb.35.2019.02.07.10.37.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 07 Feb 2019 10:37:55 -0800 (PST) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5FC811FF90; Thu, 7 Feb 2019 18:37:45 +0000 (UTC) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: qemu-devel@nongnu.org Date: Thu, 7 Feb 2019 18:37:44 +0000 Message-Id: <20190207183744.5054-17-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207183744.5054-1-alex.bennee@linaro.org> References: <20190207183744.5054-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 Subject: [Qemu-devel] [PATCH v2 16/16] scripts/qemu.py: allow arches use KVM for their 32bit cousins X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <http://lists.nongnu.org/archive/html/qemu-devel/> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: qemu-arm@nongnu.org, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org> |
Series |
current testing/next queue (with build fixes)
|
expand
|
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)
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 <alex.bennee@linaro.org> --- scripts/qemu.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)