[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
- [Qemu-devel] [PATCH 00/19] ARMv8M: support security extn in the NVIC, Peter Maydell, 2017/09/12
- [Qemu-devel] [PATCH 02/19] nvic: Add banked exception states, Peter Maydell, 2017/09/12
- [Qemu-devel] [PATCH 04/19] nvic: Add cached vectpending_prio state, Peter Maydell, 2017/09/12
- [Qemu-devel] [PATCH 03/19] nvic: Add cached vectpending_is_s_banked state, Peter Maydell, 2017/09/12
- [Qemu-devel] [PATCH 06/19] nvic: Make ICSR.RETTOBASE handle banked exceptions, Peter Maydell, 2017/09/12
- [Qemu-devel] [PATCH 11/19] nvic: Compare group priority for escalation to HF, Peter Maydell, 2017/09/12
- [Qemu-devel] [PATCH 08/19] nvic: Handle banked exceptions in nvic_recompute_state(), Peter Maydell, 2017/09/12
- [Qemu-devel] [PATCH 16/19] target/arm: Handle banking in negative-execution-priority check in cpu_mmu_index(), Peter Maydell, 2017/09/12