From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60533) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5FEp-0004LV-GS for qemu-devel@nongnu.org; Tue, 24 May 2016 12:31:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b5FEg-00054F-2l for qemu-devel@nongnu.org; Tue, 24 May 2016 12:31:23 -0400 Received: from mail-vk0-x232.google.com ([2607:f8b0:400c:c05::232]:34068) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b5FEf-00053j-US for qemu-devel@nongnu.org; Tue, 24 May 2016 12:31:14 -0400 Received: by mail-vk0-x232.google.com with SMTP id c189so29097686vkb.1 for ; Tue, 24 May 2016 09:31:13 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1463698459-31312-2-git-send-email-edgar.iglesias@gmail.com> References: <1463698459-31312-1-git-send-email-edgar.iglesias@gmail.com> <1463698459-31312-2-git-send-email-edgar.iglesias@gmail.com> From: Peter Maydell Date: Tue, 24 May 2016 17:30:54 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v1 1/5] xlnx-zynqmp: Add a secure prop to en/disable ARM Security Extensions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Edgar E. Iglesias" Cc: QEMU Developers , Alistair Francis , Peter Crosthwaite , Edgar Iglesias , qemu-arm On 19 May 2016 at 23:54, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add a secure prop to en/disable ARM Security Extensions. > This is particulary useful for KVM runs. "particularly" > Default to disabled to match the behavior of KVM. This is a change in behaviour, though, right? Is that OK? > Signed-off-by: Edgar E. Iglesias > --- > 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; thanks -- PMM