All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: qemu-devel@nongnu.org
Cc: edgar.iglesias@xilinx.com, peter.maydell@linaro.org,
	qemu-arm@nongnu.org, alistair.francis@xilinx.com
Subject: [Qemu-arm] [PATCH v1 1/5] xlnx-zynqmp: Add a secure prop to en/disable ARM Security Extensions
Date: Fri, 20 May 2016 00:54:15 +0200	[thread overview]
Message-ID: <1463698459-31312-2-git-send-email-edgar.iglesias@gmail.com> (raw)
In-Reply-To: <1463698459-31312-1-git-send-email-edgar.iglesias@gmail.com>

From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

Add a secure prop to en/disable ARM Security Extensions.
This is particulary useful for KVM runs.

Default to disabled to match the behavior of KVM.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
 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
-- 
2.5.0


WARNING: multiple messages have this Message-ID (diff)
From: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
To: qemu-devel@nongnu.org
Cc: alistair.francis@xilinx.com, crosthwaite.peter@gmail.com,
	peter.maydell@linaro.org, edgar.iglesias@xilinx.com,
	qemu-arm@nongnu.org
Subject: [Qemu-devel] [PATCH v1 1/5] xlnx-zynqmp: Add a secure prop to en/disable ARM Security Extensions
Date: Fri, 20 May 2016 00:54:15 +0200	[thread overview]
Message-ID: <1463698459-31312-2-git-send-email-edgar.iglesias@gmail.com> (raw)
In-Reply-To: <1463698459-31312-1-git-send-email-edgar.iglesias@gmail.com>

From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>

Add a secure prop to en/disable ARM Security Extensions.
This is particulary useful for KVM runs.

Default to disabled to match the behavior of KVM.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
---
 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
-- 
2.5.0

  reply	other threads:[~2016-05-19 22:54 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-19 22:54 [Qemu-devel] [PATCH v1 0/5] xlnx-zynqmp: Fix various issues with KVM runs Edgar E. Iglesias
2016-05-19 22:54 ` Edgar E. Iglesias
2016-05-19 22:54 ` Edgar E. Iglesias [this message]
2016-05-19 22:54   ` [Qemu-devel] [PATCH v1 1/5] xlnx-zynqmp: Add a secure prop to en/disable ARM Security Extensions Edgar E. Iglesias
2016-05-24 16:30   ` [Qemu-arm] " Peter Maydell
2016-05-24 16:30     ` [Qemu-devel] " Peter Maydell
2016-05-24 16:57     ` [Qemu-arm] " Edgar E. Iglesias
2016-05-24 16:57       ` [Qemu-devel] " Edgar E. Iglesias
2016-05-24 17:29       ` [Qemu-arm] " Peter Maydell
2016-05-24 17:29         ` [Qemu-devel] " Peter Maydell
2016-05-19 22:54 ` [Qemu-arm] [PATCH v1 2/5] xlnx-zynqmp: Break out RPU setup into a separate function Edgar E. Iglesias
2016-05-19 22:54   ` [Qemu-devel] " Edgar E. Iglesias
2016-05-24 16:23   ` Peter Maydell
2016-05-24 16:23     ` Peter Maydell
2016-05-19 22:54 ` [Qemu-arm] [PATCH v1 3/5] xlnx-zynqmp: Make the RPU subsystem optional Edgar E. Iglesias
2016-05-19 22:54   ` [Qemu-devel] " Edgar E. Iglesias
2016-05-24 16:26   ` [Qemu-arm] " Peter Maydell
2016-05-24 16:26     ` [Qemu-devel] " Peter Maydell
2016-05-24 16:32     ` [Qemu-arm] " Edgar E. Iglesias
2016-05-24 16:32       ` [Qemu-devel] " Edgar E. Iglesias
2016-05-24 16:37       ` [Qemu-arm] " Peter Maydell
2016-05-24 16:37         ` [Qemu-devel] " Peter Maydell
2016-05-24 16:52         ` [Qemu-arm] " Edgar E. Iglesias
2016-05-24 16:52           ` [Qemu-devel] " Edgar E. Iglesias
2016-05-19 22:54 ` [Qemu-arm] [PATCH v1 4/5] xlnx-zynqmp: Delay realization of GIC until post CPU realization Edgar E. Iglesias
2016-05-19 22:54   ` [Qemu-devel] " Edgar E. Iglesias
2016-05-24 16:28   ` [Qemu-arm] " Peter Maydell
2016-05-24 16:28     ` [Qemu-devel] " Peter Maydell
2016-05-19 22:54 ` [Qemu-devel] [PATCH v1 5/5] xlnx-zynqmp: Use the in kernel GIC model for KVM runs Edgar E. Iglesias
2016-05-19 22:54   ` Edgar E. Iglesias
2016-05-24 16:29   ` [Qemu-arm] " Peter Maydell
2016-05-24 16:29     ` [Qemu-devel] " Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1463698459-31312-2-git-send-email-edgar.iglesias@gmail.com \
    --to=edgar.iglesias@gmail.com \
    --cc=alistair.francis@xilinx.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.