qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 2/2] hw/arm_gic_common: Use vmstate struct ra


From: Igor Mitsyanko
Subject: Re: [Qemu-devel] [PATCH v2 2/2] hw/arm_gic_common: Use vmstate struct rather than save/load functions
Date: Mon, 18 Mar 2013 23:48:20 +0400



On 03/18/2013 09:47 PM, Peter Maydell wrote:
Update the GIC save/restore to use vmstate rather than hand-rolled
save/load functions.

Signed-off-by: Peter Maydell <address@hidden>
---
  hw/arm_gic_common.c |  109 ++++++++++++++++++++-------------------------------
  1 file changed, 42 insertions(+), 67 deletions(-)

diff --git a/hw/arm_gic_common.c b/hw/arm_gic_common.c
index f95bec3..0785a11 100644
--- a/hw/arm_gic_common.c
+++ b/hw/arm_gic_common.c
@@ -20,90 +20,66 @@
 

 
- GIC_INTERNAL),
+        VMSTATE_BUFFER_UNSAFE(last_active, GICState, 0,
+                              GIC_MAXIRQ * NCPU * sizeof(uint16_t)),


 

I'm not sure about this one, do we have any guarantees that it will always be tightly packed? What will happen when we will try to migrate VM between BE and LE hosts?
I successfully tested it on my PC, but I think generally, this macro is OK to use with byte buffers, but not with an array of arbitrary type. That said, I couldn't come up with any alternatives yet.

 


reply via email to

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