From patchwork Fri Sep 4 16:23:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 53129 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 4001D2159E for ; Fri, 4 Sep 2015 16:23:05 +0000 (UTC) Received: by wicmn1 with SMTP id mn1sf8041035wic.1 for ; Fri, 04 Sep 2015 09:23:04 -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=b8RDWrsTDlh5Mi3ETGTGpzlW4AS3j46beoTlnLD9AO4=; b=U1+j0NU5Sq7tB0qJhH6ePJEXKkachc+LS7V5tHAq7dQvHk9wXahTbUk8/2qbgX+MJx Y2KlLXsyuZ7QmGxSRLl+TNsImHtkkyHYNtGH4rD+hBRCOqw6J+tCeMq9bU4/o3GSuRru gTSeWKM/9xlzuznDeT1PdNlTMGFj0oIUFUArVzak8nVGu7Tm50MoGJEKYFbv+gzANXWM 7NTmH+Rsir5inuI3hX/JzSRakI1yashVnf83Z/VqfqAQBXYk2E9/p61XSstg3BYC0heX 7OEZx2PfMyypcuXIcI/dKTzK+CYzTpezhtl+m17pOIfmf9hzaALSEQlGgI2sWnJ3M5qJ FixQ== X-Gm-Message-State: ALoCoQkuA3/hY3Ox6ZuMMT3xJ7QeiceX5v0L6DmEk0V5HlITdzIBwpC1Ht41YFCGh0gH6ZdB8NUy X-Received: by 10.112.78.101 with SMTP id a5mr1280831lbx.9.1441383784535; Fri, 04 Sep 2015 09:23:04 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.226 with SMTP id e2ls377514laa.108.gmail; Fri, 04 Sep 2015 09:23:04 -0700 (PDT) X-Received: by 10.112.164.4 with SMTP id ym4mr4499866lbb.7.1441383784386; Fri, 04 Sep 2015 09:23:04 -0700 (PDT) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id b2si2715769laa.31.2015.09.04.09.23.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 04 Sep 2015 09:23:04 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by lagj9 with SMTP id j9so17102285lag.2 for ; Fri, 04 Sep 2015 09:23:04 -0700 (PDT) X-Received: by 10.112.131.98 with SMTP id ol2mr4529952lbb.56.1441383784221; Fri, 04 Sep 2015 09:23:04 -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.164.42 with SMTP id yn10csp14593lbb; Fri, 4 Sep 2015 09:23:03 -0700 (PDT) X-Received: by 10.194.87.69 with SMTP id v5mr8516922wjz.140.1441383783580; Fri, 04 Sep 2015 09:23:03 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk. [2001:8b0:1d0::1]) by mx.google.com with ESMTPS id cw7si5659142wib.13.2015.09.04.09.23.03 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 04 Sep 2015 09:23:03 -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 1ZXtlW-0006Ly-NX; Fri, 04 Sep 2015 17:23:02 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, "Edgar E. Iglesias" Subject: [PATCH v3 5/6] hw/arm/virt: Default to not providing TrustZone support Date: Fri, 4 Sep 2015 17:23:01 +0100 Message-Id: <1441383782-24378-6-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1441383782-24378-1-git-send-email-peter.maydell@linaro.org> References: <1441383782-24378-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.46 as permitted sender) smtp.mailfrom=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 Reviewed-by: Peter Crosthwaite --- 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",