diff options
author | Jianjun Duan <duanj@linux.vnet.ibm.com> | 2017-01-19 11:00:50 -0800 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2017-01-24 17:54:47 +0000 |
commit | 2c21ee769e4674348560480cecc7b20f3750ee84 (patch) | |
tree | 250ee21fc200f8901ee437569e153e952e6c1342 /target/ppc | |
parent | d7fc72ceb52ad77f5f29befc04d5215096b8caa8 (diff) |
migration: extend VMStateInfo
Current migration code cannot handle some data structures such as
QTAILQ in qemu/queue.h. Here we extend the signatures of put/get
in VMStateInfo so that customized handling is supported. put now
will return int type.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Jianjun Duan <duanj@linux.vnet.ibm.com>
Message-Id: <1484852453-12728-2-git-send-email-duanj@linux.vnet.ibm.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'target/ppc')
-rw-r--r-- | target/ppc/machine.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/target/ppc/machine.c b/target/ppc/machine.c index 18c16d2512..df9f7a4e05 100644 --- a/target/ppc/machine.c +++ b/target/ppc/machine.c @@ -105,7 +105,7 @@ static int cpu_load_old(QEMUFile *f, void *opaque, int version_id) return 0; } -static int get_avr(QEMUFile *f, void *pv, size_t size) +static int get_avr(QEMUFile *f, void *pv, size_t size, VMStateField *field) { ppc_avr_t *v = pv; @@ -115,12 +115,14 @@ static int get_avr(QEMUFile *f, void *pv, size_t size) return 0; } -static void put_avr(QEMUFile *f, void *pv, size_t size) +static int put_avr(QEMUFile *f, void *pv, size_t size, VMStateField *field, + QJSON *vmdesc) { ppc_avr_t *v = pv; qemu_put_be64(f, v->u64[0]); qemu_put_be64(f, v->u64[1]); + return 0; } static const VMStateInfo vmstate_info_avr = { @@ -353,7 +355,7 @@ static const VMStateDescription vmstate_sr = { }; #ifdef TARGET_PPC64 -static int get_slbe(QEMUFile *f, void *pv, size_t size) +static int get_slbe(QEMUFile *f, void *pv, size_t size, VMStateField *field) { ppc_slb_t *v = pv; @@ -363,12 +365,14 @@ static int get_slbe(QEMUFile *f, void *pv, size_t size) return 0; } -static void put_slbe(QEMUFile *f, void *pv, size_t size) +static int put_slbe(QEMUFile *f, void *pv, size_t size, VMStateField *field, + QJSON *vmdesc) { ppc_slb_t *v = pv; qemu_put_be64(f, v->esid); qemu_put_be64(f, v->vsid); + return 0; } static const VMStateInfo vmstate_info_slbe = { |