From patchwork Wed May 25 10:52:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Edgar E. Iglesias" X-Patchwork-Id: 9135193 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2F62560221 for ; Wed, 25 May 2016 11:22:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FF2128164 for ; Wed, 25 May 2016 11:22:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14C33282D4; Wed, 25 May 2016 11:22:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8B49B28164 for ; Wed, 25 May 2016 11:22:36 +0000 (UTC) Received: from localhost ([::1]:59064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5WtX-0004hY-Hs for patchwork-qemu-devel@patchwork.kernel.org; Wed, 25 May 2016 07:22:35 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5WQj-00034L-55 for qemu-devel@nongnu.org; Wed, 25 May 2016 06:52:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5WQc-0000xa-64 for qemu-devel@nongnu.org; Wed, 25 May 2016 06:52:48 -0400 Received: from mail-wm0-x242.google.com ([2a00:1450:400c:c09::242]:34937) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5WQb-0000xW-VG; Wed, 25 May 2016 06:52:42 -0400 Received: by mail-wm0-x242.google.com with SMTP id f75so14168609wmf.2; Wed, 25 May 2016 03:52:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=189A3i11ew1j7sDEnNGCySodJiUUteVXG4JSqYLIKso=; b=pFQ/LYEYeKFPNs0K8op22+KLzNadzl+XR4m0ISJfKXoqxeNzVJoTNSaim4zQyY1Gn2 YbYQ8dDh6rrhGMNde/5GizOaXeahhQTEPreCgYuc0czx7STT2R+YeaaEClkDTkznu8eE 7Wi4FduSduBmRJYv8qAx4lWMDEkBWWD9esYGXECiROnT7zKW0rHfVWuUm3UEGBYdcjnI DiUfXiuGaL3ueO3Ky5+CvFdkWWjBshw7cuBeqFoZgKvQbJaYb53VGwk3N3FA5bUyJ6cb tL+XQqjjHXzrNQ/Pc/iW9xMmho8+nHy0vnfxKx2N89ILv1qqSZFnrrJs/kt1L6p33b6z CnEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=189A3i11ew1j7sDEnNGCySodJiUUteVXG4JSqYLIKso=; b=mwiwlmHhAU/wfGSGJGml++GA+hNlkI+21w7kLERUrspl4ywBR8j9Bi7CoJVErVBunu 5wYunCex3Z6INtd3QM4dN9u3Yn6E3MU93quD8qP+/jp7TqMpXaTdYHz49OHGmAk9zKDZ 8tKxEl2Dz0NLsfeuanQcz0A4oZeBbEkqVEij3wujS+AcQFJeV+E9eFKiO1mNto3N5g/w l4RhxL4QHlRnoi5S30pfDDoO8Ir68Nri0rQ11AUUxKvRMsCJrZ3lBKQHMGMOMdYGra+C gfnEPjuIce9dmQbhKcRBPAurq4tE6vo50vGC77R6pbFzogL5comGxj6TKa2o7olZrzJI nMBQ== X-Gm-Message-State: ALyK8tKv5NrFQw97dXnvbgHBJwgtr/g+UV4Y1ELLJTgG6ddKSecQMmxMvSU26hsRwsXbZg== X-Received: by 10.28.26.200 with SMTP id a191mr2976273wma.55.1464173561281; Wed, 25 May 2016 03:52:41 -0700 (PDT) Received: from localhost (81-231-233-234-no56.tbcn.telia.com. [81.231.233.234]) by smtp.gmail.com with ESMTPSA id y76sm8600151wmd.3.2016.05.25.03.52.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 May 2016 03:52:40 -0700 (PDT) From: "Edgar E. Iglesias" To: qemu-devel@nongnu.org Date: Wed, 25 May 2016 12:52:32 +0200 Message-Id: <1464173555-12800-2-git-send-email-edgar.iglesias@gmail.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1464173555-12800-1-git-send-email-edgar.iglesias@gmail.com> References: <1464173555-12800-1-git-send-email-edgar.iglesias@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::242 Subject: [Qemu-devel] [PATCH v2 1/4] xlnx-zynqmp: Add a secure prop to en/disable ARM Security Extensions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org, crosthwaite.peter@gmail.com, qemu-arm@nongnu.org, alistair.francis@xilinx.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: "Edgar E. Iglesias" Add a secure prop to en/disable ARM Security Extensions. This is particularly useful for KVM runs. Default to disabled to match the behavior of KVM. This changes the default setup from having the ARM Security Extensions to not longer having them. Signed-off-by: Edgar E. Iglesias Reviewed-by: Alistair Francis --- hw/arm/xlnx-zynqmp.c | 3 +++ include/hw/arm/xlnx-zynqmp.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/hw/arm/xlnx-zynqmp.c b/hw/arm/xlnx-zynqmp.c index 4d504da..965a250 100644 --- a/hw/arm/xlnx-zynqmp.c +++ b/hw/arm/xlnx-zynqmp.c @@ -238,6 +238,8 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) } g_free(name); + object_property_set_bool(OBJECT(&s->apu_cpu[i]), + s->secure, "has_el3", NULL); object_property_set_int(OBJECT(&s->apu_cpu[i]), GIC_BASE_ADDR, "reset-cbar", &error_abort); object_property_set_bool(OBJECT(&s->apu_cpu[i]), true, "realized", @@ -370,6 +372,7 @@ static void xlnx_zynqmp_realize(DeviceState *dev, Error **errp) static Property xlnx_zynqmp_props[] = { DEFINE_PROP_STRING("boot-cpu", XlnxZynqMPState, boot_cpu), + DEFINE_PROP_BOOL("secure", XlnxZynqMPState, secure, false), DEFINE_PROP_END_OF_LIST() }; diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h index 2332596..38d4c8c 100644 --- a/include/hw/arm/xlnx-zynqmp.h +++ b/include/hw/arm/xlnx-zynqmp.h @@ -84,6 +84,9 @@ typedef struct XlnxZynqMPState { char *boot_cpu; ARMCPU *boot_cpu_ptr; + + /* Has the ARM Security extensions? */ + bool secure; } XlnxZynqMPState; #define XLNX_ZYNQMP_H