From patchwork Tue Sep 8 16:51:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 53288 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f200.google.com (mail-wi0-f200.google.com [209.85.212.200]) by patches.linaro.org (Postfix) with ESMTPS id E28C522A09 for ; Tue, 8 Sep 2015 18:14:55 +0000 (UTC) Received: by wicuu12 with SMTP id uu12sf41074422wic.2 for ; Tue, 08 Sep 2015 11:14:55 -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:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=JOK6Ni3GUGUI8QTFqEfndfvM77/hrbe0Q4J3eFOmesM=; b=Ge6wahODEury3R21B0PHFK7J4T7oitPp64QCpI3A84Q/OqlR4zkLhAqzL5tI2tVwE/ C+WphxMcBfO75cSbutY687D5/fw37DSnfZrFbXCXqx0lo9sSylylTp9d5h4Y9J+ijuRY 3fck9CKYciBMq9FvmEu+jipBO2llYnwinS2/fFg0VJIJMlh94DeP63tftZ03dRPntTCj gX5/eLBv1wsyG+27/JtiCUfPd/V1rFj8EDOfxd4oSBO65KK7sVRLFfIrgygm6e3S4QmQ DI4dNkCIGlHMDHEJiy0dr/zNf9i3IMx/SGQ/4+rL27KvxcYHT6boDcNlErlJkUEPE0lG zBvg== X-Gm-Message-State: ALoCoQkUjM0UVIqnv5Je93C70S2YA6bEJAqg3WFfcD2+E5otDxa538Km0YQgagL3hCR8fSCHJ8vC X-Received: by 10.112.198.33 with SMTP id iz1mr6725893lbc.8.1441736095220; Tue, 08 Sep 2015 11:14:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.70 with SMTP id y6ls716665lay.55.gmail; Tue, 08 Sep 2015 11:14:55 -0700 (PDT) X-Received: by 10.152.19.138 with SMTP id f10mr24444308lae.68.1441736095070; Tue, 08 Sep 2015 11:14:55 -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 dt5si4052173lac.34.2015.09.08.11.14.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 08 Sep 2015 11:14:55 -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 lanb10 with SMTP id b10so74382606lan.3 for ; Tue, 08 Sep 2015 11:14:55 -0700 (PDT) X-Received: by 10.152.9.200 with SMTP id c8mr22349215lab.76.1441736094805; Tue, 08 Sep 2015 11:14:54 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1138356lbq; Tue, 8 Sep 2015 11:14:54 -0700 (PDT) X-Received: by 10.194.78.34 with SMTP id y2mr44926655wjw.91.1441736094081; Tue, 08 Sep 2015 11:14:54 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id gg17si7486136wjc.5.2015.09.08.11.14.53 for (version=TLS1 cipher=RC4-SHA bits=128/128); Tue, 08 Sep 2015 11:14:54 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:35857 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZMFp-000690-40 for patch@linaro.org; Tue, 08 Sep 2015 13:00:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZM7b-0002cU-79 for qemu-devel@nongnu.org; Tue, 08 Sep 2015 12:51:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZZM7V-0007vV-8m for qemu-devel@nongnu.org; Tue, 08 Sep 2015 12:51:51 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:35049) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZZM7V-0007b2-1V for qemu-devel@nongnu.org; Tue, 08 Sep 2015 12:51:45 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZZM7I-0001iA-JL for qemu-devel@nongnu.org; Tue, 08 Sep 2015 17:51:32 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Tue, 8 Sep 2015 17:51:22 +0100 Message-Id: <1441731092-6513-11-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1441731092-6513-1-git-send-email-peter.maydell@linaro.org> References: <1441731092-6513-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Subject: [Qemu-devel] [PULL 10/20] hw/arm/virt: Default to not providing TrustZone support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.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.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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 Reviewed-by: Peter Crosthwaite Reviewed-by: Peter Maydell Reviewed-by: Edgar E. Iglesias Tested-by: Edgar E. Iglesias Message-id: 1441383782-24378-6-git-send-email-peter.maydell@linaro.org --- 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 91e45e0..a067748 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -1044,8 +1044,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",