qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-arm] [PATCH 02/19] nvic: Add banked exception sta


From: Peter Maydell
Subject: Re: [Qemu-devel] [Qemu-arm] [PATCH 02/19] nvic: Add banked exception states
Date: Tue, 19 Sep 2017 19:31:44 +0100

On 12 September 2017 at 19:13, Peter Maydell <address@hidden> wrote:
> For the v8M security extension, some exceptions must be banked
> between security states. Add the new vecinfo array which holds
> the state for the banked exceptions and migrate it if the
> CPU the NVIC is attached to implements the security extension.
>
> Signed-off-by: Peter Maydell <address@hidden>

> +static const VMStateDescription vmstate_nvic_security = {
> +    .name = "nvic/m-security",
> +    .version_id = 1,
> +    .minimum_version_id = 1,
> +    .needed = nvic_security_needed,
> +    .post_load = &nvic_security_post_load,
> +    .fields = (VMStateField[]) {
> +        VMSTATE_STRUCT_ARRAY(sec_vectors, NVICState, NVIC_INTERNAL_VECTORS, 
> 1,
> +                             vmstate_VecInfo, VecInfo),
> +        VMSTATE_END_OF_LIST()
> +    }
> +};
> +
>  static const VMStateDescription vmstate_nvic = {
>      .name = "armv7m_nvic",
>      .version_id = 4,

This patch needs the following folded in, so that we actually
include the new vmstate subsection in the top level's subsection
list...

diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
index 694b9e0..8793f75 100644
--- a/hw/intc/armv7m_nvic.c
+++ b/hw/intc/armv7m_nvic.c
@@ -1205,6 +1205,10 @@ static const VMStateDescription vmstate_nvic = {
                              vmstate_VecInfo, VecInfo),
         VMSTATE_UINT32(prigroup, NVICState),
         VMSTATE_END_OF_LIST()
+    },
+    .subsections = (const VMStateDescription*[]) {
+        &vmstate_nvic_security,
+        NULL
     }
 };

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]