From patchwork Thu Jul 16 20:11:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 51205 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id CC55322A8A for ; Thu, 16 Jul 2015 20:11:25 +0000 (UTC) Received: by lbvb1 with SMTP id b1sf20748888lbv.3 for ; Thu, 16 Jul 2015 13:11:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=QhHFMFqHwr1AF2AHEZnR95d1vsHTifXwVSEQTJGID5w=; b=T6KxcrfgU7LYXIGVTINEZlTFMf/lHKbAkVhs0wUj35f9kWfUktNAzqDqR3v1BbgAdp CVqdJdjhETBHBjEsHYwTvqDnI+p/hpVHAzHYvm1uRR5U/faUBu1mmlQQ6Ht9iGqvIMPF 9YJL9LKjOChbvNRXT/mIgETb56fUf1I5wx/MbKjZ/3cqeLHXN1qskaJ7AQc9cSP2MVRP mYqjdql/6YBH/+ytu5TXS1kWp9Kn97MZyr64jGGQb4YGDXzMzH0+IJBAqDg34qef5Rhh 6lfBtzGsEr8qBd2gxSyrPJCzQirlYa23NXOThcP9N5JY8aJAh7xZ4nkK5hgn5l8QhRFV yIvQ== X-Gm-Message-State: ALoCoQnyJz6SzqFJ+C6tQ48EnXF6FHZTXsLFjlU18LOKRy8a6y1NRnFzr0ABGR3XwgWKFCT6nnVW X-Received: by 10.194.184.6 with SMTP id eq6mr5674915wjc.4.1437077484573; Thu, 16 Jul 2015 13:11:24 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.19.39 with SMTP id b7ls386981lae.85.gmail; Thu, 16 Jul 2015 13:11:24 -0700 (PDT) X-Received: by 10.152.27.197 with SMTP id v5mr11011885lag.64.1437077484413; Thu, 16 Jul 2015 13:11:24 -0700 (PDT) Received: from mail-la0-f44.google.com (mail-la0-f44.google.com. [209.85.215.44]) by mx.google.com with ESMTPS id db5si7871315lac.73.2015.07.16.13.11.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jul 2015 13:11:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) client-ip=209.85.215.44; Received: by lagx9 with SMTP id x9so49956185lag.1 for ; Thu, 16 Jul 2015 13:11:24 -0700 (PDT) X-Received: by 10.112.209.106 with SMTP id ml10mr10836978lbc.112.1437077484282; Thu, 16 Jul 2015 13:11:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp474403lbb; Thu, 16 Jul 2015 13:11:23 -0700 (PDT) X-Received: by 10.69.12.136 with SMTP id eq8mr22045309pbd.88.1437077481298; Thu, 16 Jul 2015 13:11:21 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id rt15si14656175pab.240.2015.07.16.13.11.19 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 16 Jul 2015 13:11:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 2001:8b0:1d0::1 as permitted sender) client-ip=2001:8b0:1d0::1; Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZFpUv-0001Bt-EC; Thu, 16 Jul 2015 21:11:13 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, "Edgar E. Iglesias" , Peter Crosthwaite , =?UTF-8?q?Andreas=20F=C3=A4rber?= Subject: [PATCH v2 5/6] hw/arm/virt: Default to not providing TrustZone support Date: Thu, 16 Jul 2015 21:11:12 +0100 Message-Id: <1437077473-4532-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1437077473-4532-1-git-send-email-peter.maydell@linaro.org> References: <1437077473-4532-1-git-send-email-peter.maydell@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.maydell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.44 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Switch the default for the 'virt' board to not providing TrustZone support in either the CPU or the GIC. This is primarily for the benefit of UEFI, which currently assumes there is no TrustZone support, and does not set the GIC up correctly if it is TZ-aware. It also means the board is consistent about its behaviour whether we're using KVM or TCG (KVM never has TrustZone support). If TrustZone support is required (for instance for running test suites or TZ-aware firmware) it can be enabled with the "-machine secure=on" command line option. Signed-off-by: Peter Maydell --- hw/arm/virt.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 95b1a9a..2bcf565 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -946,8 +946,11 @@ static void virt_instance_init(Object *obj) { VirtMachineState *vms = VIRT_MACHINE(obj); - /* EL3 is enabled by default on virt */ - vms->secure = true; + /* EL3 is disabled by default on virt: this makes us consistent + * between KVM and TCG for this board, and it also allows us to + * boot UEFI blobs which assume no TrustZone support. + */ + vms->secure = false; object_property_add_bool(obj, "secure", virt_get_secure, virt_set_secure, NULL); object_property_set_description(obj, "secure",