diff mbox series

[for-3.0,1/2] armv7m_nvic: Fix m-security subsection name

Message ID 20180727113854.20283-2-peter.maydell@linaro.org
State Superseded
Headers show
Series MPS/v8M bug fixes | expand

Commit Message

Peter Maydell July 27, 2018, 11:38 a.m. UTC
The vmstate save/load code insists that subsections of a VMState must
have names which include their parent VMState's name as a leading
substring.  Unfortunately it neither documents this nor checks it on
device init or state save, but instead fails state load with a
confusing error message ("Missing section footer for armv7m_nvic").

Fix the name of the m-security subsection of the NVIC, so that
state save/load works correctly for the security-enabled NVIC.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

---
 hw/intc/armv7m_nvic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

Richard Henderson July 28, 2018, 4:42 p.m. UTC | #1
On 07/27/2018 04:38 AM, Peter Maydell wrote:
> The vmstate save/load code insists that subsections of a VMState must

> have names which include their parent VMState's name as a leading

> substring.  Unfortunately it neither documents this nor checks it on

> device init or state save, but instead fails state load with a

> confusing error message ("Missing section footer for armv7m_nvic").

> 

> Fix the name of the m-security subsection of the NVIC, so that

> state save/load works correctly for the security-enabled NVIC.

> 

> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

> ---

>  hw/intc/armv7m_nvic.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)


Reviewed-by: Richard Henderson <richard.henderson@linaro.org>



r~
diff mbox series

Patch

diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c
index 6be7fc5266d..cd1e7f17299 100644
--- a/hw/intc/armv7m_nvic.c
+++ b/hw/intc/armv7m_nvic.c
@@ -2064,7 +2064,7 @@  static int nvic_security_post_load(void *opaque, int version_id)
 }
 
 static const VMStateDescription vmstate_nvic_security = {
-    .name = "nvic/m-security",
+    .name = "armv7m_nvic/m-security",
     .version_id = 1,
     .minimum_version_id = 1,
     .needed = nvic_security_needed,