From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFpfB-0007cZ-Ue for qemu-devel@nongnu.org; Thu, 16 Jul 2015 16:21:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFpfA-0007qk-VO for qemu-devel@nongnu.org; Thu, 16 Jul 2015 16:21:49 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34652) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFpfA-0007lW-Ni for qemu-devel@nongnu.org; Thu, 16 Jul 2015 16:21:48 -0400 From: Peter Maydell Date: Thu, 16 Jul 2015 21:11:12 +0100 Message-Id: <1437077473-4532-6-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1437077473-4532-1-git-send-email-peter.maydell@linaro.org> References: <1437077473-4532-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH v2 5/6] hw/arm/virt: Default to not providing TrustZone support List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Edgar E. Iglesias" , Peter Crosthwaite , =?UTF-8?q?Andreas=20F=C3=A4rber?= , patches@linaro.org 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", -- 1.9.1