[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH 4/8] xics: add pre_load() hook to ICSStateClass
From: |
Alexey Kardashevskiy |
Subject: |
[Qemu-ppc] [PATCH 4/8] xics: add pre_load() hook to ICSStateClass |
Date: |
Fri, 14 Mar 2014 15:18:05 +1100 |
This adds a hook which will be used to reset ICS state before incoming
migration.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
---
hw/intc/xics.c | 13 +++++++++++++
include/hw/ppc/xics.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/hw/intc/xics.c b/hw/intc/xics.c
index 88ef9ef..39c33bc 100644
--- a/hw/intc/xics.c
+++ b/hw/intc/xics.c
@@ -550,6 +550,18 @@ static void ics_dispatch_pre_save(void *opaque)
}
}
+static int ics_dispatch_pre_load(void *opaque)
+{
+ ICSState *ics = opaque;
+ ICSStateClass *info = ICS_GET_CLASS(ics);
+
+ if (info->pre_load) {
+ return info->pre_load(ics);
+ }
+
+ return 0;
+}
+
static int ics_dispatch_post_load(void *opaque, int version_id)
{
ICSState *ics = opaque;
@@ -582,6 +594,7 @@ static const VMStateDescription vmstate_ics = {
.minimum_version_id = 1,
.minimum_version_id_old = 1,
.pre_save = ics_dispatch_pre_save,
+ .pre_load = ics_dispatch_pre_load,
.post_load = ics_dispatch_post_load,
.fields = (VMStateField []) {
/* Sanity check */
diff --git a/include/hw/ppc/xics.h b/include/hw/ppc/xics.h
index 02bbe31..4b30e9a 100644
--- a/include/hw/ppc/xics.h
+++ b/include/hw/ppc/xics.h
@@ -126,6 +126,7 @@ struct ICSStateClass {
DeviceClass parent_class;
void (*pre_save)(ICSState *s);
+ int (*pre_load)(ICSState *s);
int (*post_load)(ICSState *s, int version_id);
};
--
1.8.4.rc4
- [Qemu-ppc] [PATCH 0/8] spapr: fix IOMMU and XICS/IRQs migration, Alexey Kardashevskiy, 2014/03/14
- [Qemu-ppc] [PATCH 1/8] spapr-iommu: add a bus for spapr-iommu devices, Alexey Kardashevskiy, 2014/03/14
- [Qemu-ppc] [PATCH 7/8] spapr: remove @next_irq, Alexey Kardashevskiy, 2014/03/14
- [Qemu-ppc] [PATCH 6/8] spapr: move interrupt allocator to xics, Alexey Kardashevskiy, 2014/03/14
- [Qemu-ppc] [PATCH 8/8] xics: enable interrupt configuration reset on migration, Alexey Kardashevskiy, 2014/03/14
- [Qemu-ppc] [PATCH 3/8] xics: add find_server, Alexey Kardashevskiy, 2014/03/14
- [Qemu-ppc] [PATCH 5/8] xics: disable flags reset on xics reset, Alexey Kardashevskiy, 2014/03/14
- [Qemu-ppc] [PATCH 4/8] xics: add pre_load() hook to ICSStateClass,
Alexey Kardashevskiy <=
- [Qemu-ppc] [PATCH 2/8] xics: add flags for interrupts, Alexey Kardashevskiy, 2014/03/14
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 0/8] spapr: fix IOMMU and XICS/IRQs migration, Andreas Färber, 2014/03/19